コード例 #1
0
        public static Game RunGame(int number)
        {
            switch (number)
            {
            case 1:
                var state1 = new GameState1();

                return(new Game(800, 600, Phaser.AUTO, "phaserRoot", state1));

            case 2:
                var state2 = new GameState2();

                return(new Game(800, 600, Phaser.AUTO, "phaserRoot", state2));

            case 3:
                var state3 = new GameState3();

                return(new Game(800, 600, Phaser.AUTO, "phaserRoot", state3));

            case 4:
                var state4 = new GameState4();
                return(new Game(700, 300, Phaser.CANVAS, "phaserRoot", state4));

            default:
                throw new ArgumentOutOfRangeException(nameof(number));
            }
        }
コード例 #2
0
ファイル: Game.cs プロジェクト: edainne/JumpingApplication
 void GameOver()
 {
     // pause time.
     Time.timeScale = 0.0f;
     // destroy player.
     Destroy(playerTransform.gameObject);
     gameState = GameState1.gameover;
 }
コード例 #3
0
ファイル: Game.cs プロジェクト: edainne/JumpingApplication
 void GameOver()
 {
     // pause time.
     Time.timeScale = 0.0f;
     // destroy player.
     Destroy(playerTransform.gameObject);
     gameState = GameState1.gameover;
 }
コード例 #4
0
        public Game(int limit)
        {
            Random random = new Random(DateTime.Now.Millisecond);

            int number = random.Next(1, limit);

            questions.Add(number);

            gameState = Memorize.GameState1.Questioning;
        }
コード例 #5
0
 void GameStateChangedEvent(GameState1 currentState)
 {
     if (currentState == GameState1.Main)
     {
         SetUIToMainScreen();
     }
     else if (currentState == GameState1.Options)
     {
         SetUIToOptionsScreen();
     }
     else if (currentState == GameState1.Phone)
     {
         SetsUIToPhoneScreen();
     }
 }
コード例 #6
0
ファイル: Game.cs プロジェクト: edainne/JumpingApplication
 void Start()
 {
     // realtime speed.
     Time.timeScale = 1.0f;
     gameState = GameState1.playing;
 }
コード例 #7
0
ファイル: Game.cs プロジェクト: edainne/JumpingApplication
 void Start()
 {
     // realtime speed.
     Time.timeScale = 1.0f;
     gameState      = GameState1.playing;
 }