コード例 #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            MarioStateMachine mario = new MarioStateMachine();

            mario.obtainMushRoom();
            int       score = mario.getScore();
            StateEnum state = mario.getCurrentState();

            Console.WriteLine("mario score: " + score + "; state: " + state);
            mario.obtainCape();
            int       score2 = mario.getScore();
            StateEnum state2 = mario.getCurrentState();

            Console.WriteLine("mario score: " + score2 + "; state: " + state2);
            Console.ReadKey();
        }
コード例 #2
0
 public SuperMario(MarioStateMachine stateMachine)
 {
     this.stateMachine = stateMachine;
 }
コード例 #3
0
 public FireMario(MarioStateMachine stateMachine)
 {
     this.stateMachine = stateMachine;
 }
コード例 #4
0
 public SmallMario(MarioStateMachine stateMachine)
 {
     this.stateMachine = stateMachine;
 }
コード例 #5
0
 public CapeMario(MarioStateMachine stateMachine)
 {
     this.stateMachine = stateMachine;
 }