Ejemplo n.º 1
0
        public override void Initialize()
        {
            base.Initialize();

            _currentDamageState = DamageState.Alive;
            CurrentMobState     = _behavior[_currentDamageState];
            CurrentMobState.EnterState(Owner);
            CurrentMobState.UpdateState(Owner);
        }
Ejemplo n.º 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);
        }