void Init() { _hasInit = true; if (eventDictionary == null) { eventDictionary = new Dictionary <string, UnityEvent>(); } if (TurnStart == null) { turnStart = new TurnStartEvent(); } if (unitDead == null) { unitDead = new UnitDeadEvent(); } }
private void OnUnitDead(object sender, DateTime dateTime) { BattleBase one = sender as BattleBase; if (one != null) { UnitDeadEvent?.Invoke(this, one); lock (_mutex) { if (_battleUnits.Contains(one)) { _battleUnits.Remove(one); one.DeadEvent -= OnUnitDead; } } if (!IsAlive()) { DeadEvent?.Invoke(this, dateTime); } } }
protected internal override void OnBattleActorDead(ZoneActor actor, UnitDeadEvent e) { do_clear_current_seeking(); }