private void OnDie(object sender, DieArgs args) { if (stateMachine.currentState != DyingState) { stateMachine.SetState(DyingState, new Dictionary<string, object> {{"sender", sender}}); } }
private void OnDieHandler(object sender, DieArgs args) { myPoolObject.Disable(); }
private void OnTargetDeath(object sender, DieArgs args) { (sender as Health).DieEvent -= OnTargetDeath; StopAllCoroutines(); if (target != null) { FindTarget(); } }
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(); } } }
/// <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; }
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); }