Example #1
0
 void RegisterEventListeners()
 {
     OnDeath         += new OnDeathEventHandler(GameManager.Instance.ReceiveCurrency);
     OnTargetReached += new OnTargetReachedEventHandler(GameManager.Instance.PlayerTakeDamage);
 }
Example #2
0
 void Awake()
 {
     OnDeath           += new OnDeathEventHandler(TowerManager.Instance.EnemyDied);
     _healthBarRenderer = transform.Find("HealthBG").GetComponent <SpriteRenderer>();
 }
Example #3
0
    /*
     * 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);
    }