Ejemplo n.º 1
0
    public IEnumerator StartCutScene()
    {
        Debug.Log("Playing Cutscene...");

        CutSceneInfo OnStartCutScene = new CutSceneInfo
        {
            description    = "Scanning ... Scanning ... I detect weapons. \n Maybe I can blast the door open.",
            obj            = gameObject,
            cutSceneName   = "Door",
            cutSceneNumber = 2
        };

        OnStartCutScene.FireEvent();

        cutSceneInProgress = true;

        yield return(new WaitForSeconds(0.25f));

        Camera.main.transform.position = new Vector3(19f, -7f, -10f);
        FindObjectOfType <PlayerPower>().transform.position = otherDoor.transform.position;
        FindObjectOfType <PlayerMovement>().gotoFloorPoint  = otherDoor.transform.position;

        while (cutSceneInProgress)
        {
            yield return(new WaitForSeconds(1f));
        }

        yield return(new WaitForSeconds(0.1f));

        //ReturnFromCutScene();
    }
Ejemplo n.º 2
0
    IEnumerator RocketPowerUse()
    {
        while (inFlight)
        {
            FindObjectOfType <PlayerPower>().PlayerPowerLevel -= 1;

            if (FindObjectOfType <PlayerPower>().PlayerPowerLevel <= 0)
            {
                CutSceneInfo OnStartCutScene = new CutSceneInfo
                {
                    description  = "",
                    obj          = gameObject,
                    cutSceneName = "Death"
                };
                OnStartCutScene.FireEvent();

                Debug.Log("End Of Game");
                this.enabled = false;
                inFlight     = false;
                yield break;
            }

            yield return(new WaitForSeconds(3f));
        }

        yield return(new WaitForSeconds(0.1f));
    }
Ejemplo n.º 3
0
    public IEnumerator StartCutScene()
    {
        //yield return StartCoroutine(FindObjectOfType<DialogMaster>().Say("What's This?... An Underground Passage?"));
        FindObjectOfType <DialogMaster>().CloseDialog();

        Debug.Log("Playing Cutscene...");

        CutSceneInfo OnStartCutScene = new CutSceneInfo
        {
            description    = "The hatch led to an elevator. \n I wonder how deep underground it goes.",
            obj            = gameObject,
            cutSceneName   = "Hatch",
            cutSceneNumber = 1
        };

        OnStartCutScene.FireEvent();

        cutSceneInProgress = true;

        yield return(new WaitForSeconds(4f));

        Camera.main.transform.position = Vector3.back * 10;

        if (soundEffect2 != null)
        {
            RuntimeManager.PlayOneShotAttached(soundEffect2, gameObject);
        }

        yield return(new WaitForSeconds(0.5f));

        FindObjectOfType <PlayerPower>().transform.position = destination.transform.position;
        FindObjectOfType <PlayerMovement>().gotoFloorPoint  = destination.transform.position;

        foreach (GameObject g in hideThese)
        {
            g.SetActive(false);
        }

        foreach (GameObject g in showThese)
        {
            g.SetActive(true);
        }

        while (cutSceneInProgress)
        {
            yield return(new WaitForSeconds(0.5f));
        }

        //yield return StartCoroutine(FindObjectOfType<DialogMaster>().Say("This lift looks dead \n Maybe I can charge it"));
        //FindObjectOfType<DialogMaster>().CloseDialog();
        //ReturnFromCutScene();
    }
Ejemplo n.º 4
0
    public IEnumerator StartCutScene()
    {
        Debug.Log("Playing Cutscene...");

        CutSceneInfo OnStartCutScene = new CutSceneInfo
        {
            description    = "",
            obj            = gameObject,
            cutSceneName   = "Charging Room",
            cutSceneNumber = 3
        };

        OnStartCutScene.FireEvent();

        yield return(new WaitForSeconds(0.25f));

        Debug.Log("Final...");
    }