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