you really gotta calm down, marisa...

This commit is contained in:
Sylvia 2026-02-13 00:21:59 -08:00
parent 13bb58ea03
commit b9fb490dce
68 changed files with 990 additions and 44 deletions

View file

@ -0,0 +1,23 @@
using System;
using UnityEngine;
public class BeamCollider : MonoBehaviour
{
public Laser thisLaser;
private void OnTriggerEnter2D(Collider2D other)
{
if (!other.CompareTag(thisLaser.thisPlayer.tag) && other.TryGetComponent(out Entity isEntity))
{
thisLaser.enemyList.Add(isEntity);
}
}
private void OnTriggerExit2D(Collider2D other)
{
if (!other.CompareTag(thisLaser.thisPlayer.tag) && other.TryGetComponent(out Entity isEntity) && thisLaser.enemyList.Contains(isEntity))
{
thisLaser.enemyList.Remove(isEntity);
}
}
}