Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        CheckGameState();
        TextUpdate();
        if (!buttleState.isButtleStart)
        {
            if (PlayerInput.touched)
            {
                startText.text            = "";
                buttleState.isButtleStart = true;
                buttleState.nextDirection();
                buttleState.isEnemyTurn = true;
            }
        }

        if (buttleState.isGameClear)
        {
            // TODO: リザルト画面へ
            sceneLoader.LoadClearScene();
        }

        if (buttleState.isGameOver)
        {
            // TODO: リザルト画面へ
            sceneLoader.LoadOverScene();
        }

        if (!buttleState.isGameEnd)
        {
            PlayerAction();
            EnemyAction();
        }

        /*
         * if (buttleState.isButtleStart && !buttleState.isGameEnd)
         * {
         *  PlayerAction();
         *  EnemyAction();
         *  if (buttleState.isEnemyTurnEnd)
         *  {
         *      buttleState.isPlayerTurn = true;
         *      buttleState.isEnemyTurnEnd = false;
         *  }
         *
         *  if (buttleState.isPlayerTurnEnd)
         *  {
         *      buttleState.isEnemyTurn = true;
         *      buttleState.isPlayerTurnEnd = false;
         *      buttleState.nextDirection();
         *  }
         *
         * }
         */
    }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        CheckGameState();
        TextUpdate();
        if (PlayerInput.touched)
        {
            if (!buttleState.isButtleStart)
            {
                buttleState.isButtleStart = true;
                buttleState.nextDirection();
                buttleState.isEnemyTurn = true;
            }
        }

        if (buttleState.isEnemyTurnEnd)
        {
            enemy.DoPosing(PlayerInput.DirectionType.IDLE);
            buttleState.isPlayerTurn   = true;
            buttleState.isEnemyTurnEnd = false;
        }

        if (buttleState.isPlayerTurnEnd)
        {
            buttleState.isEnemyTurn     = true;
            buttleState.isPlayerTurnEnd = false;
            buttleState.nextDirection();
        }

        if (buttleState.isButtleStart)
        {
            PlayerAction();
            EnemyAction();
            if (buttleState.isGameClear)
            {
                // TODO: リザルト画面へ
            }

            if (buttleState.isGameOver)
            {
                // TODO: リザルト画面へ
            }
        }
    }