Exemplo n.º 1
0
 public void StartCinematic(IntroControler controler, List <EnemyShip> enemyShipsToStart, OnCinematicEnd actionAfterCinematic, bool keepCamera)
 {
     shipsToStartOnSpecificPart = enemyShipsToStart;
     OnCinematicEnd             = actionAfterCinematic;
     keepLastCameraAtTheEnd     = keepCamera;
     StartCinematic(controler);
 }
Exemplo n.º 2
0
 public override void ReceiveDamage(IDamageSource damageSource, DamagesParameters damagesParameters, ProjectileSpecialParameters projSpecialParameters)
 {
     if (damageSource.GetDamageTag == AttackTag.Player)
     {
         if (!GameManager.gameManager.CinematicMng.CinematicProcessing)
         {
             IntroControler dialogue = dialoguesToLaunchOnFleeingEnemyHitByShot[Random.Range(0, dialoguesToLaunchOnFleeingEnemyHitByShot.Length)];
             dialogue.PlayCinematic();
         }
     }
 }
Exemplo n.º 3
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;
        }
    }
Exemplo n.º 4
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();
        }
    }
Exemplo n.º 5
0
 public void StartCinematic(IntroControler controler, OnCinematicEnd actionAfterCinematic, bool keepCamera)
 {
     OnCinematicEnd         = actionAfterCinematic;
     keepLastCameraAtTheEnd = keepCamera;
     StartCinematic(controler);
 }
Exemplo n.º 6
0
 public void StartCinematic(IntroControler controler, List <EnemyShip> enemyShipsToStart)
 {
     shipsToStartOnSpecificPart = enemyShipsToStart;
     StartCinematic(controler);
 }