コード例 #1
0
 public static void EnterDialogue(NPC npc, bool fromQueue = false)
 {
     Hitstop.Interrupt();
     if (dialogueOpen)
     {
         queuedNPCs.Enqueue(npc);
         return;
     }
     if (!pc.IsFacing(npc.gameObject))
     {
         pc.ForceFlip();
     }
     pc.EndCombatStanceCooldown();
     if (!fromQueue)
     {
         dialogueUI.Open();
     }
     currentNPC = npc;
     dialogueOpenedThisFrame = true;
     dialogueUI.ShowNameAndPicture(npc.GetCurrentLine());
     if (npc.centerCameraInDialogue)
     {
         playerFollower.LookAtPoint(npc.gameObject);
     }
     pc.EnterCutscene();
 }
コード例 #2
0
ファイル: CloseableUI.cs プロジェクト: cliftech/vapor-trails
    virtual public void Open()
    {
        if ((exclusive && GlobalController.openUIs > 0))
        {
            return;
        }

        if (!open)
        {
            GlobalController.openUIs += 1;
        }
        this.open = true;
        Hitstop.Interrupt();
        if (interactSound)
        {
            SoundManager.InteractSound();
        }
        GlobalController.pc.EnterCutscene(invincible: invincibleDuring);
        if (targetUI != null)
        {
            targetUI.SetActive(true);
        }
        if (stopTime)
        {
            Time.timeScale = 0f;
        }
        if (soloUISound)
        {
            SoundManager.SoloUIAudio();
        }
    }
コード例 #3
0
 public static void EnterDialogue(NPC npc)
 {
     Hitstop.Interrupt();
     if (dialogueOpen)
     {
         queuedNPCs.Enqueue(npc);
         return;
     }
     dialogueUI.Show();
     pc.EnterDialogue();
     currentNPC = npc;
     dialogueOpenedThisFrame = true;
     dialogueUI.ShowNameAndPicture(npc.GetCurrentLine());
 }
コード例 #4
0
 public static void Pause()
 {
     if (pc.inCutscene)
     {
         return;
     }
     Hitstop.Interrupt();
     pc.Freeze();
     pc.inCutscene = true;
     pauseUI.SetBool("Shown", true);
     //manually first select
     pauseUI.transform.Find("EventSystem").GetComponent <EventSystem>().SetSelectedGameObject(pauseUI.transform.Find("Resume").gameObject);
     paused = true;
     SoundManager.InteractSound();
     Time.timeScale = 0f;
 }
コード例 #5
0
 public static void EnterSlowMotion()
 {
     Hitstop.Interrupt();
     Time.timeScale = 0.3f;
 }