public PlayerShip(float x, float y) : base(Name.Player, SpriteEnum.Player, Index.Index_Null, new Azul.Color(0, 1.0f, 0), new Azul.Color(0, 1, 0), x, y) { sprite = new ProxySprite(SpriteEnum.Player, Index.Index_Null, x, y); canMoveLeft = true; canMoveRight = true; states = new PlayerState[3]; PlayerState start = new StartState(); PlayerState ready = new ReadyState(); PlayerState noShoot = new NoShootState(); states[(int)PlayerStates.Start] = start; states[(int)PlayerStates.Ready] = ready; states[(int)PlayerStates.NoShoot] = noShoot; playerState = ready; }
public void EnterState(PlayerState newState) { LeaveState(); m_state = newState; switch (m_state) { case PlayerState.Alive: { } break; case PlayerState.Dying: { } break; } }
public void changeState(PlayerStates state) { playerState = states[(int)state]; }