Пример #1
0
        public override void Initialize()
        {
            base.Initialize();

            CurrentMobState = Behavior[CurrentDamageState];
            CurrentMobState.EnterState(Owner);
            CurrentMobState.UpdateState(Owner);
        }
Пример #2
0
        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);
        }