Example #1
0
    //切り替え終了
    public IEnumerator FieldChangeEnd(FieldPop fpMethod)
    {
        if (animationObject)
            Destroy(animationObject);

        audioSource.Play();

        levelChange.levelPanel.PanelSlide();

        animationObject = Instantiate(animationPrefab);
        animationObject.transform.rotation = Quaternion.identity;
        animationObject.transform.SetParent(Camera.main.transform);
        levelState = _eLevelState.CHANGE;
        lyingAngle = 0;

        //各オブジェクトの表示復帰
           GameScene gameScene = transform.root.gameObject.GetComponent<AppliController>().GetCurrentScene().GetComponent<GameScene>();

        yield return new WaitForSeconds(changePopTime);
        fChangeScript.Delete();
        gameScene.gameUI.ojityanAnimator.gameObject.SetActive(true);

        yield return new WaitForSeconds(changeEndTime);
        //アニメーションを消去
        Destroy(animationObject);
        animationObject = null;
        if (NextLevel != -1)
        {
            gameController.nodeController.currentLevel = NextLevel;
            //gameScene.directionalLight.color = levelTableScript.GetFieldLevel(nextLevel).lightColor;
        }
        else
        {
            //gameScene.directionalLight.color = levelTableScript.GetFieldLevel(gameController.nodeController.currentLevel).lightColor;
        //            print("レベル変更なし");
        }
        LevelState = _eLevelState.STAND;
    }
Example #2
0
    //難易度切り替え状態へ
    public IEnumerator FieldChangeStart(FieldPop fpMethod)
    {
        GameScene gameScene = transform.root.gameObject.GetComponent<AppliController>().GetCurrentScene().GetComponent<GameScene>();
        //アニメーターを生成
        levelState = _eLevelState.CHANGE;
        if (animationObject)
            Destroy(animationObject);
        animationObject = Instantiate(animationPrefab);
        animationObject.transform.SetParent(Camera.main.transform);

        //時間を止める
        gameScene.gameUI.gameInfoCanvas.limitTime.eventRatio = 0;

        audioSource.Play();

        //手前にあるオブジェクトを非表示
        gameScene.gameUI.ojityanAnimator.gameObject.SetActive(false);
        gameScene.gameUI.gamePause.optionButton.SetActive(false);

        yield return new WaitForSeconds(changePopTime);
        fpMethod();

        yield return new WaitForSeconds(changeEndTime);
        //アニメーションを消去
        Destroy(animationObject);
        animationObject = null;
        levelState = _eLevelState.LIE;
    }