protected void Kill(ActorDiedEventArgs args) { Alive = false; if (args.Killer != null) { ActorGainedExperienceEventArgs tempArgs = new ActorGainedExperienceEventArgs(args.Killer, this.ExpReward); args.Killer.GainExperience(tempArgs); } }
protected IEnumerator WatchForDeath() { while (Mechanics == null || Mechanics.Health == null || Mechanics.Health.IsAlive) { yield return(null); } ActorDiedEventArgs arg = new ActorDiedEventArgs(ExpReward, LastAttacker, this); OnActorDied(arg); }
private void PlayerDeath(ActorDiedEventArgs args) { //Debug.Log ("YOU DIED"); StopCoroutine("CheckExperience"); }
private void EnemyDeath(ActorDiedEventArgs args) { StopCoroutine("WatchForDeath"); Destroy(gameObject); }