Beispiel #1
0
    // Update is called once per frame
    void FixedUpdate()
    {
        if (gameStatus == GameStatus.GameInitializing)
        {
            puyoInventory.Enqueue(creater.PuyoCreate(100, 175));
            puyoInventory.Enqueue(creater.PuyoCreate(100, 143));
            puyoInventory.Enqueue(creater.PuyoCreate(100, 50));
            puyoInventory.Enqueue(creater.PuyoCreate(100, 18));

            gameStatus = GameStatus.PuyoCreating;
        }

        if (gameStatus == GameStatus.PuyoCreating)
        {
            controller.puyoCreate();
            gameStatus = GameStatus.PuyoFalling;
        }

        if (gameStatus == GameStatus.PuyoFalling)
        {
            if (falling)
            {
                StartCoroutine("fallingGap");
                falling = false;
            }
        }

        if (gameStatus == GameStatus.PuyoArranging)
        {
            FindObjectOfType <AudioManager>().Play("placePuyo");
            controller.puyoArrange();
            gameStatus = GameStatus.PuyoLinking;
        }

        if (gameStatus == GameStatus.PuyoLinking)
        {
            controller.resetPuyoStatusAndLinkPuyoList();
            controller.linkSamePuyo();
            gameStatus = GameStatus.ComboCalculating;
        }

        if (gameStatus == GameStatus.ComboCalculating)
        {
            if (controller.readyToEliminatePuyo())
            {
                StartCoroutine("statusChangingGap");
                gameStatus = GameStatus.GamePause;
            }
            else if (controller.countLinearPuyo())
            {
                StartCoroutine("statusChangingGap");
                gameStatus = GameStatus.GamePause;
            }
            else
            {
                gameStatus = GameStatus.PuyoCreating;
            }
        }
    }
Beispiel #2
0
    // Update is called once per frame
    void FixedUpdate()
    {
        if (gameStatus == GameStatus.GameInitializing)
        {
            puyoInventory.Enqueue(PuyoCreater.PuyoCreate(100, 175));
            puyoInventory.Enqueue(PuyoCreater.PuyoCreate(100, 143));
            puyoInventory.Enqueue(PuyoCreater.PuyoCreate(100, 50));
            puyoInventory.Enqueue(PuyoCreater.PuyoCreate(100, 18));

            gameStatus = GameStatus.PuyoCreating;
        }

        if (gameStatus == GameStatus.PuyoCreating)
        {
            PuyoController.puyoCreate();
            gameStatus = GameStatus.PuyoFalling;
        }

        if (gameStatus == GameStatus.PuyoFalling)
        {
            if (falling)
            {
                StartCoroutine("fallingGap");
                falling = false;
            }
        }

        if (gameStatus == GameStatus.PuyoArranging)
        {
            PuyoController.puyoArrange();
            gameStatus = GameStatus.PuyoLinking;
        }

        if (gameStatus == GameStatus.PuyoLinking)
        {
            PuyoController.resetPuyoStatusAndLinkPuyoList();
            PuyoController.linkSamePuyo();
            gameStatus = GameStatus.ComboCalculating;
        }

        if (gameStatus == GameStatus.ComboCalculating)
        {
            if (PuyoController.readyToEliminatePuyo())
            {
                StartCoroutine("statusChangingGap");
                gameStatus = GameStatus.GamePause;
            }
            else
            {
                gameStatus = GameStatus.PuyoCreating;
            }
        }
    }