public override void Initialize() { base.Initialize(); CurrentMobState = Behavior[CurrentDamageState]; CurrentMobState.EnterState(Owner); CurrentMobState.UpdateState(Owner); }
public void OnHealthChanged(HealthChangedEventArgs e) { if (e.Damageable.CurrentDamageState != CurrentDamageState) { CurrentDamageState = e.Damageable.CurrentDamageState; CurrentMobState.ExitState(Owner); CurrentMobState = Behavior[CurrentDamageState]; CurrentMobState.EnterState(Owner); } CurrentMobState.UpdateState(Owner); }
bool IActionBlocker.CanChangeDirection() { return(CurrentMobState.CanChangeDirection()); }
bool IActionBlocker.CanUnequip() { return(CurrentMobState.CanUnequip()); }
bool IActionBlocker.CanAttack() { return(CurrentMobState.CanAttack()); }
bool IActionBlocker.CanEmote() { return(CurrentMobState.CanEmote()); }
bool IActionBlocker.CanPickup() { return(CurrentMobState.CanPickup()); }
bool IActionBlocker.CanSpeak() { return(CurrentMobState.CanSpeak()); }
bool IActionBlocker.CanThrow() { return(CurrentMobState.CanThrow()); }
bool IActionBlocker.CanInteract() { return(CurrentMobState.CanInteract()); }