this idiot forgot to commit an entire month's worth of code

This commit is contained in:
Sylvia 2026-04-22 18:23:31 -07:00
parent c67146ea1a
commit a3321d361c
51 changed files with 3644 additions and 84 deletions

View file

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using UnityEngine;
public class EnemyCountRuntime : MonoBehaviour
{
private List<Collider2D> enemiesInRange = new(); //was supposed to be entity list but trygetcomponent isn't needed because we aren't using the actual entity values
public EnemyCountPowerup baseSO;
public PlayerAbility thisAbility;
private void OnTriggerEnter2D(Collider2D other)
{
if (!other.CompareTag(tag))
{
enemiesInRange.Add(other);
}
thisAbility.powerMultiplier = 1 + baseSO.damageIncreasePercentage * enemiesInRange.Count; //does not stack with other multipliers and must be fixed
}
private void OnTriggerExit2D(Collider2D other)
{
if (!other.CompareTag(tag) && enemiesInRange.Contains(other))
{
enemiesInRange.Remove(other);
}
}
}