public EnemyState HandleInput(Elements.Enemy enemy, EStateInput input, EnemyState state) { switch (input) { case EStateInput.Move: return new EnemyRunning(direction); case EStateInput.SwitchDir: if (direction != 0) { enemy.velocity.X = 0; direction = (EDirection)((int)direction * -1); } return state; case EStateInput.Dead: return new EnemyDead(); case EStateInput.Hit: break; case EStateInput.AnimEnd: break; case EStateInput.PlayerCollision: enemy.velocity = Vector2.Zero; return new EnemyAttack(direction); case EStateInput.Stop: if (state.GetType() != typeof(EnemyIdle)) return new EnemyIdle(); return this; default: break; } return state; }
public override EnemyState HandleInput(Elements.Enemy enemy, EStateInput input) { switch(input) { case EStateInput.AnimEnd: animState = EAnimState.Idle; break; default: break; } return base.HandleInput(enemy, input, this); }
public override EnemyState HandleInput(Elements.Enemy enemy, EStateInput input) { switch (input) { case EStateInput.AnimEnd: return new EnemyIdle(); case EStateInput.Dead: return new EnemyDead(); default: break; } return this; }
public abstract EnemyState HandleInput(Elements.Enemy enemy, EStateInput input);
public override EnemyState HandleInput(Elements.Enemy enemy, EStateInput input) { if (input == EStateInput.AnimEnd) Managers.Executive.level.removeQueue.Enqueue(enemy); return this; }
public override EnemyState HandleInput(Elements.Enemy enemy, EStateInput input) { throw new NotImplementedException(); }