virtual public void OnMove() { if (this.playerName == Characters.CHAR_PLAYER) { User.MoveRequest req = User.GetMoveRequest(); switch (req) { case User.MoveRequest.Left: playerPoint.XPos -= 1; break; case User.MoveRequest.Right: playerPoint.XPos += 1; break; case User.MoveRequest.Up: playerPoint.YPos -= 1; break; case User.MoveRequest.Down: playerPoint.YPos += 1; break; } if (ScreenCell2D.IsOnScreen(this.playerPoint) == false) { state = ObjectStatus.ActiveState.Dead; } } }
public void DoDeInit() { this.state = ObjectStatus.ActiveState.Dead; this.speed = ObjectStatus.RelativeSpeed.Stopped; }
public static void Set(Noun noun, ObjectStatus.ActiveState state) { noun.state = state; }
virtual public void DoInit() { state = ObjectStatus.ActiveState.Alive; speed = ObjectStatus.RelativeSpeed.Slow; }