Exemple #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;
    }
Exemple #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;
     }
 }
Exemple #3
0
 public void UseKey()
 {
     if (PlayerState.instance.items[itemID] == true)
     {
         PlayerState.instance.GarageLock = true;
         lockedDia.StartDialogue();
     }
     else
     {
         dialogue.StartDialogue();
     }
 }
Exemple #4
0
 void FixedUpdate()
 {
     if (transform.position.z > -29.5)
     {
         transform.position += transform.forward * Time.deltaTime * 0.25f;
         if (!speach)
         {
             dialogueChain.StartDialogue();
             speach = true;
         }
     }
 }
Exemple #5
0
 public void Unlock()
 {
     if (playerState.items[itemID] == true)
     {
         moveAi.SetDestination(0);
         Destroy(gameObject);
     }
     else
     {
         dialogue.StartDialogue();
     }
 }
Exemple #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();
     }
 }
Exemple #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);
     }
 }
 public void Unlock()
 {
     if (TimeState.instance.getHour() >= 20)
     {
         if (playerState.items[itemID] == true)
         {
             moveAi.SetDestination(0);
             Destroy(gameObject);
         }
         else
         {
             dialogueAfter.StartDialogue();
         }
     }
     else
     {
         dialogueBefore.StartDialogue();
     }
 }