Esempio n. 1
0
        public override void OnFadeOutDone()
        {
            StageLeft   = float.PositiveInfinity;
            StageRight  = float.NegativeInfinity;
            StageBottom = float.PositiveInfinity;
            StageMinMax("Ground");
            StageMinMax("DeadZone");

            SoundController.PlayBGM(SoundController.BgmType.Game0, true);
            SceneManager.SetActiveScene(gameObject.scene);

            // プレイヤーを入れ替える
            GameObject stabPlayer = GameObject.FindGameObjectWithTag("Player");
            GameObject myp        = Instantiate(stellaPrefab, stabPlayer.transform.position, stabPlayer.transform.rotation);

            Destroy(stabPlayer);

            // カメラにターゲットを設定
            FollowCamera fcam = Camera.main.gameObject.GetComponent <FollowCamera>();

            fcam.SetTarget(myp.transform);

            // 苗の数を数える
            Grow[] gr = GameObject.FindObjectsOfType <Grow>();
            NaeCount = gr.Length;

            Grow.Init();
        }
Esempio n. 2
0
        /// <summary>
        /// 追うカメラにターゲットを設定します。
        /// </summary>
        /// <param name="target"></param>
        public static void SetFollowCameraTarget(Transform target)
        {
            followCamera.SetTarget(target);

            if (stabPlayer != null)
            {
                Destroy(stabPlayer);
                stabPlayer = null;
            }
        }
Esempio n. 3
0
        public override void OnFadeOutDone()
        {
            SoundController.PlayBGM(SoundController.BgmType.Title, true);
            SceneManager.SetActiveScene(gameObject.scene);

            // プレイヤーを入れ替える
            GameObject stabPlayer = GameObject.FindGameObjectWithTag("Player");
            GameObject myp        = Instantiate(stellaPrefab, stabPlayer.transform.position, stabPlayer.transform.rotation);

            Destroy(stabPlayer);

            // カメラにターゲットを設定
            FollowCamera fcam = Camera.main.gameObject.GetComponent <FollowCamera>();

            fcam.SetTarget(myp.transform);
        }
Esempio n. 4
0
        public override void OnFadeOutDone()
        {
            StageLeft   = float.PositiveInfinity;
            StageRight  = float.NegativeInfinity;
            StageBottom = float.PositiveInfinity;
            StageMinMax("Ground");
            StageMinMax("DeadZone");

            SoundController.PlayBGM(bgm, true);
            SceneManager.SetActiveScene(gameObject.scene);

            // プレイヤーを入れ替える
            stabPlayer = GameObject.FindGameObjectWithTag("Player");
            stabPlayer.SetActive(false);
            Instantiate(stellaPrefab, stabPlayer.transform.position, stabPlayer.transform.rotation);

            // カメラにターゲットを設定
            followCamera = Camera.main.gameObject.GetComponent <FollowCamera>();
            followCamera.SetTarget(stabPlayer.transform);      // 一度設定してから解除

            // 苗の数を数える
            Grow[] gr = GameObject.FindObjectsOfType <Grow>();
            NaeCount = 0;
            for (int i = 0; i < gr.Length; i++)
            {
                if (gr[i].state == Grow.StateType.Nae)
                {
                    NaeCount++;
                }
            }

            Grow.Init();

            StellaMove.instance.ChangeAction(StellaMove.ActionType.Start);

            stageNameText.text = Messages.GetMessage(Messages.MessageType.Stage1Name + GameParams.SelectedStage);
        }