Пример #1
0
 private void OnDie(object sender, DieArgs args)
 {
     if (stateMachine.currentState != DyingState)
     {
         stateMachine.SetState(DyingState, new Dictionary<string, object> {{"sender", sender}});
     }
 }
Пример #2
0
 private void OnDieHandler(object sender, DieArgs args)
 {
     myPoolObject.Disable();
 }
Пример #3
0
        private void OnTargetDeath(object sender, DieArgs args)
        {
            (sender as Health).DieEvent -= OnTargetDeath;
            StopAllCoroutines();

            if (target != null)
            {
                FindTarget();
            }
        }
Пример #4
0
 private void OnEnemyDeath(object sender, DieArgs args)
 {
     ShieldHealth enemyHealth = (ShieldHealth)sender;
     enemyHealth.DieEvent -= OnEnemyDeath;
     ActiveEnemies.Remove((Enemy)enemyHealth.GetComponent(typeof(Enemy)));
     if (ActiveEnemies.Count == 0)
     {
         Log("Formation " + (segmentCursor - 1) + " cleared.", Debugger.LogTypes.LevelEvents);
         if (lastSegment)
         {
             SpawnBoss();
         }
         else
         {
             if (spawnJob != null)
             {
                 spawnJob.Kill();
                 spawnJob = null;
             }
             SpawnNextFormation();
         }
     }
 }
Пример #5
0
 /// <summary>
 /// Called when a minion is killed.
 /// </summary>
 /// <param name="sender">Minion.</param>
 /// <param name="args">Death data.</param>
 private void OnMinionDeath(object sender, DieArgs args)
 {
     ShieldHealth minion = (ShieldHealth)sender;
     minions.Remove(minion);
     minion.DieEvent -= OnMinionDeath;
 }
Пример #6
0
        private void OnDie(object sender, DieArgs args)
        {
            Player player = args.killer as Player;
            if (player != null)
            {
                player.RecieveKill(enemyClass, score, money, MyHealth.maxHealth);
            }

            Destroy(path);
        }