예제 #1
0
    public void StartCinematic(IntroControler controler)
    {
        currentIntroControler      = controler;
        currentCinematicParameters = currentIntroControler.GetCinematicParameters;
        currentCinematicAllParts   = currentCinematicParameters.GetAllCinematicsParts;
        currentCinematicPartIndex  = 0;

        if (currentCinematicAllParts.Length == 0)
        {
            EndCinematic();
            return;
        }

        foreach (CinematicPart part in currentCinematicAllParts)
        {
            if (firstCinematicCam == null)
            {
                if (part.cam != null)
                {
                    firstCinematicCam = part.cam;
                    lastCinematicCam  = firstCinematicCam;
                }
            }
            else
            {
                if (part.cam != null)
                {
                    lastCinematicCam = part.cam;
                }
            }
        }

        cinematicProcessing = true;

        StartCinematicPart();

        if (controler.Skippable)
        {
            skipCinematicButton.Interaction = SkipCinematicPart;
        }
        else
        {
            skipCinematicButton.Interaction = ShowNotSkippable;
        }
    }
예제 #2
0
    public void EndCinematic()
    {
        if (OnCinematicEnd != null)
        {
            OnCinematicEnd();
            OnCinematicEnd = null;
        }

        currentCinematicParameters = default;
        firstCinematicCam          = null;
        lastCinematicCam           = null;
        currentCinematicPartIndex  = 0;

        currentIntroControler.SetCinematicEnded();
        currentIntroControler = null;

        skipCinematicButton.gameObject.SetActive(false);

        cinematicProcessing = false;

        if (currentMessageToType != null)
        {
            EndDialogue();
        }

        if (waitingToGetControlBackToPlayer)
        {
            waitingToGetControlBackToPlayer = false;
            ShipMovements playerMovements = GameManager.gameManager.Player.ShipMvt;

            if (stoppedPlayer)
            {
                playerMovements.StartShip();
                stoppedPlayer = false;
            }

            playerInterface.ShowPlayerInterface();
        }
    }