Exemplo n.º 1
0
    //------------------------------------------------------------------------------------------
    // Start
    //------------------------------------------------------------------------------------------
    private void Start()
    {
        Data.time = 100;

        player           = GameObject.Find(Player.NAME);
        playerController = player.GetComponent <PlayerController>();

        if (Data.stage_number > 0)
        {
            var doors = doorWrapper.GetComponentsInChildren <DoorToStage>();
            foreach (var door in doors)
            {
                if (door.GetStageNumber() == Data.stage_number)
                {
                    player.transform.position = door.transform.position;
                    GameObject.Find(Common.Camera.CONTROLLER).GetComponent <CameraController>().ResetCameraPos(player.transform.position);
                    break;
                }
            }
        }

        GameObject go = GameObject.Find(PauseManager.NAME);

        if (!go)
        {
            Debug.Log("PauseManagerをシーンに追加してください");
        }

        pauseManager = go.GetComponent <PauseManager>();
        // シーン開始時にフェードインする
        FadeManager.FadeIn(0.01f);
        wipeCamera = GameObject.Find(Common.Camera.MAIN_CAMERA).GetComponent <WipeCamera>();
        wipeCamera.StartFadeIn(player.transform.position, 1.0f);
        waitTime = 1.0f;
    }
Exemplo n.º 2
0
    //------------------------------------------------------------------------------------------
    // Start
    //------------------------------------------------------------------------------------------
    private void Start()
    {
        player           = GameObject.Find(Player.NAME);
        playerController = player.GetComponent <PlayerController>();
        GameObject go = GameObject.Find(PauseManager.NAME);

        if (!go)
        {
            Debug.Log("PauseManagerをシーンに追加してください");
        }
        pauseManager = go.GetComponent <PauseManager>();
        go           = GameObject.Find(FailedFrame.NAME);
        if (!go)
        {
            Debug.Log("FailedFrameをシーンに追加してください\nPauseManagerのignoreObjectsにFailedFrameを追加してください");
        }
        failedFrameController = go.GetComponent <FailedFrameController>();

        // シーン開始時にフェードインする
        FadeManager.FadeIn(0.01f);
        wipeCamera = GameObject.Find(Common.Camera.MAIN_CAMERA).GetComponent <WipeCamera>();
        wipeCamera.StartFadeIn(player.transform.position, 1.0f);
        waitTime = 1.0f;
    }