private void ChangeDamageState(ThresholdType threshold) { if (threshold == currentstate) { return; } CurrentDamageState.ExitState(Owner); CurrentDamageState = DamageTemplates.StateThresholdMap[threshold]; CurrentDamageState.EnterState(Owner); currentstate = threshold; Owner.RaiseEvent(new MobDamageStateChangedMessage(this)); }
private void ChangeDamageState(ThresholdType threshold) { if (threshold == currentstate) { return; } CurrentDamageState.ExitState(Owner); CurrentDamageState = DamageTemplates.StateThresholdMap[threshold]; CurrentDamageState.EnterState(Owner); currentstate = threshold; EntityEventArgs toRaise = new MobDamageStateChangedMessage(this); Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, toRaise); }
bool IActionBlocker.CanUse() { return(CurrentDamageState.CanUse()); }
bool IActionBlocker.CanInteract() { return(CurrentDamageState.CanInteract()); }
bool IActionBlocker.CanAttack() { return(CurrentDamageState.CanAttack()); }
bool IActionBlocker.CanPickup() { return(CurrentDamageState.CanPickup()); }
bool IActionBlocker.CanChangeDirection() { return(CurrentDamageState.CanChangeDirection()); }