示例#1
0
    // Update is called once per frame
    public void OpenKeypad()
    {
        if (isPD)
        {
            if (PlayerState.instance.PdPower == false)
            {
                dialogue.StartDialogue();
                return;
            }
        }
        else
        {
            if (PlayerState.instance.HousePower == false)
            {
                dialogue.StartDialogue();
                return;
            }
        }
        PlayerState.instance.busy = true;
        Cursor.lockState          = CursorLockMode.None;
        GameObject pad = Instantiate(keypad, canvas.transform);

        pad.SetActive(true);
        pad.transform.parent = canvas.transform;
    }
示例#2
0
 // Start is called before the first frame update
 public void clog()
 {
     if (PlayerState.instance.items[6] == true)
     {
         dia.StartDialogue();
         PlayerState.instance.Clogged = true;
     }
 }
示例#3
0
 public void UseKey()
 {
     if (PlayerState.instance.items[itemID] == true)
     {
         PlayerState.instance.GarageLock = true;
         lockedDia.StartDialogue();
     }
     else
     {
         dialogue.StartDialogue();
     }
 }
示例#4
0
 void FixedUpdate()
 {
     if (transform.position.z > -29.5)
     {
         transform.position += transform.forward * Time.deltaTime * 0.25f;
         if (!speach)
         {
             dialogueChain.StartDialogue();
             speach = true;
         }
     }
 }
示例#5
0
 public void Unlock()
 {
     if (playerState.items[itemID] == true)
     {
         moveAi.SetDestination(0);
         Destroy(gameObject);
     }
     else
     {
         dialogue.StartDialogue();
     }
 }
示例#6
0
 // Update is called once per frame
 public void talk()
 {
     if (PlayerState.instance.Clogged == true)
     {
         tp.StartDialogue();
         Destroy(gameObject);
     }
     else if (PlayerState.instance.HousePower == false)
     {
         power.StartDialogue();
     }
     else
     {
         none.StartDialogue();
     }
 }
示例#7
0
 void FixedUpdate()
 {
     if (transform.position.z > -29.5)
     {
         transform.position += transform.forward * Time.deltaTime * 0.25f;
         if (!speach)
         {
             dialogueChain.StartDialogue();
             speach = true;
         }
     }
     else
     {
         transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.Euler(0, 90, -90), Time.deltaTime * 2.5f);
     }
 }
示例#8
0
 public void Unlock()
 {
     if (TimeState.instance.getHour() >= 20)
     {
         if (playerState.items[itemID] == true)
         {
             moveAi.SetDestination(0);
             Destroy(gameObject);
         }
         else
         {
             dialogueAfter.StartDialogue();
         }
     }
     else
     {
         dialogueBefore.StartDialogue();
     }
 }