void RegisterEventListeners() { OnDeath += new OnDeathEventHandler(GameManager.Instance.ReceiveCurrency); OnTargetReached += new OnTargetReachedEventHandler(GameManager.Instance.PlayerTakeDamage); }
void Awake() { OnDeath += new OnDeathEventHandler(TowerManager.Instance.EnemyDied); _healthBarRenderer = transform.Find("HealthBG").GetComponent <SpriteRenderer>(); }
/* * Kill a unit, removing it, but also running OnDeath effects. */ //public event OnDeath onDeath; // Use this for initialization public static void Init() { _onDeathEvent += new OnDeathEventHandler(onDeathEvent); }