Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        //フェードアウト
        SFadeScene.FadeOut();
        hideImage();
        cursor.transform.Rotate(0, 0, speedRot);

        if (Input.GetButtonDown("AButton"))
        {
            nextMenu = true;
        }

        if (nextMenu)
        {
            //フェードイン
            SFadeBack.FadeIn();

            if (SFadeBack.ImageAlpha >= 1)
            {
                if (!fade)
                {
                    //選択肢移動
                    selectMove();
                    //選択肢画像の明暗処理
                    lightAndDark();
                }
                //シーン遷移
                changeScene();
            }
        }
    }
Exemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKey(KeyCode.A))
     {
         SceneFade.FadeOut(1);
     }
 }
Exemplo n.º 3
0
    void Start()
    {
        _spawner      = GetComponent <Spawn>();
        _pointSpawner = GetComponent <SpawnPoints>();
        _scoreHandler = GetComponent <ScoreGUI>();
        _sceneFade    = FindObjectOfType <SceneFade>();
        if (_sceneFade != null)
        {
            _sceneFade.FadeOut();
        }
        InputManager.Instance.Swipe += OnSwipe;

        if (PositiveSound != null)
        {
            PositiveSound = GameObject.Find("Positive").GetComponent <AudioSource>();
        }
        if (NeutralSound != null)
        {
            NeutralSound = GameObject.Find("Netural").GetComponent <AudioSource>();
        }
        if (NegativeSound != null)
        {
            NegativeSound = GameObject.Find("Negative").GetComponent <AudioSource>();
        }
    }
Exemplo n.º 4
0
 // Update is called once per frame
 void Update()
 {
     nextSceneCount -= Time.deltaTime;
     if (nextSceneCount < 0)
     {
         SceneFade.FadeOut(2);
     }
 }
Exemplo n.º 5
0
 public void SwitchScene()
 {
     if (!Activated)
     {
         return;
     }
     Activated = false;
     Application.LoadLevel(ChangeTo);
     _sceneFade.FadeOut();
 }
Exemplo n.º 6
0
 public static void FadeOutStatic(Action pCallback = null)
 {
     if (s_instance == null)
     {
         Debug.LogError(NO_INSTANCE_ERROR);
     }
     else
     {
         s_instance.FadeOut(pCallback);
     }
 }
Exemplo n.º 7
0
    // Update is called once per frame
    void FixedUpdate()
    {
        //フェードアウト
        SFade.FadeOut();
        select.transform.Rotate(0, 0, speedRot);

        if (!fade)
        {
            //選択肢移動
            selectMove();
            //選択肢画像の明暗処理
            lightAndDark();
        }
    }
Exemplo n.º 8
0
    IEnumerator NextSceneDelayed()
    {
        sceneFade.FadeOut();

        var sceneLoading = SceneManager.LoadSceneAsync(nextScene);

        sceneLoading.allowSceneActivation = false;

        var progress = 0f;

        while (sceneLoading.progress < 0.9f || progress < sceneSwitchDelay)
        {
            progress += Time.deltaTime;
            yield return(null);
        }

        sceneLoading.allowSceneActivation = true;
    }
Exemplo n.º 9
0
    // Update is called once per frame


    void Update()
    {
        step_timer += Time.deltaTime;    // 経過時間を取得.
        Now_Trash   = getTags_Obj("Trash");
        Now_Living  = getTags_Obj("Living");

        // (1)ステップ変化時のみ.
        if (next_step != STEP.NONE)
        {
            step       = next_step; // 現状に反映.
            next_step  = STEP.NONE; // 変化待ち.
            step_timer = 0.0f;      // 経過時間リセット.

            switch (step)
            {
            case STEP.SET:
                next_step = STEP.PLAY;      // 次はPLAYステップに.
                break;
            }
        }

        // (2)繰り返し実行.
        switch (step)
        {
        case STEP.PLAY:    //Player操作
            if (limitTime < step_timer)
            {
                next_step = STEP.GAMEOVER;
            }
            if (Now_Trash <= leftOver)
            {
                next_step = STEP.FINISH;
            }
            break;

        case STEP.FINISH:
            SceneFade.FadeOut(5);
            break;

        case STEP.GAMEOVER:
            SceneFade.FadeOut(5);
            break;
        }
    }
Exemplo n.º 10
0
 private void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.tag == "MissionLiving")
     {
         IrukaTime.count  = false;
         KameTime.count   = false;
         RuteAreaSet.judg = false;
         if (MissionTuchJudg.Trashnum <= TrashRecovery)
         {
             //なんかの値に変化させてシーンの読み込みを変えさせる(時間制限で)
             SceneFade.FadeOut(5); //ミッションクリアシーンへ移動
             Debug.Log("成功!!!");
         }
         else
         {
             SceneFade.FadeOut(5); //ミッション失敗シーンへ移動
             Debug.Log("失敗...");
         }
     }
 }
Exemplo n.º 11
0
 void Update()
 {
     if (SceneCount == 0)
     {
         life -= Time.deltaTime;
         if (life < 0)
         {
             TextTransparence();
             SceneCount = 1;
             life       = 10.0f;
             TextDisplay_1();
         }
     }
     if (SceneCount == 1)
     {
         life -= Time.deltaTime;
         if (life < 0)
         {
             TextTransparence_1();
             SceneCount = 2;
             life       = 10.0f;
             TextDisplay_2();
         }
     }
     if (SceneCount == 2)
     {
         life -= Time.deltaTime;
         if (life < 0)
         {
             Debug.Log("ResultFin");
             scene -= Time.deltaTime;
         }
         if (scene < 0)
         {
             SceneFade.FadeOut(0);
         }
     }
 }
Exemplo n.º 12
0
    void Update()
    {
        //フラグ有効なら毎フレームフェードイン/アウト処理
        if (isFadeIn)
        {
            //経過時間から透明度計算
            alpha -= Time.deltaTime / fadeTime;

            //フェードイン終了判定
            if (alpha <= 0.0f)
            {
                isFadeIn           = false;
                alpha              = 0.0f;
                fadeCanvas.enabled = false;
            }

            //フェード用Imageの透明度設定
            fadeImage.color = new Color(0.0f, 0.0f, 0.0f, alpha);
        }
        else if (isFadeOut)
        {
            //経過時間から透明度計算
            alpha += Time.deltaTime / fadeTime;

            //フェードアウト終了判定
            if (alpha >= 1.0f)
            {
                isFadeOut = false;
                alpha     = 1.0f;

                //次のシーンへ遷移
                SceneFade.FadeOut(5);  //リザルトに遷移するのにここをいじりました。不具合があれば修正宜しくお願いします
            }

            //フェード用Imageの透明度設定
            fadeImage.color = new Color(0.0f, 0.0f, 0.0f, alpha);
        }
    }
Exemplo n.º 13
0
 // Start is called before the first frame update
 public void OnStartButtonClicked()
 {
     SceneFade.FadeOut(1);
 }
Exemplo n.º 14
0
 public void Restart()
 {
     sceneFade.FadeOut();
     StartCoroutine(WaitFade(true));
 }
Exemplo n.º 15
0
 public void OnButtonFadeOut()
 {
     SceneFade.FadeOut();
 }
Exemplo n.º 16
0
 void SceneChangeTurtle()
 {
     SceneFade.FadeOut(4);
     Debug.Log(NextSceneNameTurtle);
 }
Exemplo n.º 17
0
 public void SwitchScene()
 {
     Application.LoadLevel(ChangeTo);
     _sceneFade.FadeOut();
 }
Exemplo n.º 18
0
 void SceneChange()
 {
     SceneFade.FadeOut(3);
     Debug.Log(NextSceneName);
 }
Exemplo n.º 19
0
 void SceneChange()
 {
     SceneFade.FadeOut(2);
 }
Exemplo n.º 20
0
 void SceneChangeCoral()
 {
     SceneFade.FadeOut(5);
     Debug.Log(NextSceneNameCoral);
 }
Exemplo n.º 21
0
 void SceneChangeTurtle()
 {
     SceneFade.FadeOut(3);
 }
Exemplo n.º 22
0
    // Update is called once per frame
    void Update()
    {
        //Debug.Log(rounds);

        //シーン開始時のフェードアウト
        if (disF)
        {
            fade.FadeOut();

            //フェードアウト終了
            if (fade.ImageAlpha <= 0 && !fade.FFlag)
            {
                //ラウンド表示&fight表示
                Round.RoundsDisplay(rounds);
                if (Round.AppearRound && Round.RoundAlpha(rounds) <= 0)
                {
                    Fight.FightDisplay();
                }

                if (!soundPlayed)
                {
                    audio.PlayOneShot(sounds[rounds], 1.0f);
                    soundPlayed = true;
                }

                //対戦が終了したら
                Finish.FinishVS();
            }
        }

        if (!Finish.GetF && disF)
        {
            //アイコン点灯
            GetGame.DisplayGame();
            disF = false;
        }

        if (!disF)
        {
            fade.FFlag = true;
            fade.FadeIn();

            if (fade.ImageAlpha >= 1)
            {
                //どちらかが2勝したらりざるとへ
                if (GetGame.P1win == 2 || GetGame.P2win == 2)
                {
                    for (int i = 0; i < intentions.Count; i++)
                    {
                        if (intentions[i].IsTrain)
                        {
                            loadCanvas.SetActive(true);
                            intentions[i].LearningSpeed = 5;
                            return;
                        }
                    }

                    loadCanvas.SetActive(false);
                    GetGame.ResetGame(gameImage);
                    for (int i = 0; i < intentions.Count; i++)
                    {
                        intentions[i].Learning(false);
                    }
                    SceneManager.LoadScene(SMane.Scenes("Result"));
                }

                //ラウンドを進める
                if (!Finish.GetDraw)
                {
                    rounds += 1;
                }

                Round.Initialize();
                Fight.Initialize();
                Finish.Initialize();
                Winner.Initialize();
                TimeUp.Initialize();
                Director.Initialize();

                PController1P.Initialize();
                PController2P.Initialize();

                disF       = true;
                fade.FFlag = false;
                timer.ResetGameTimer();
                soundPlayed = false;
            }
        }
    }
Exemplo n.º 23
0
 void SceneChangeCoral()
 {
     SceneFade.FadeOut(4);
 }