Esempio n. 1
0
 void Update()
 {
     //roomManager.GetComponent<RoomManagerScript>().doorLocked = true;
     if (dialogue.currentLine == 6)
     {
         npcCollider.enabled = true;
         tutorialBox.SetActive(true);
     }
     if (floor1.step && floor2.step && floor3.step && floor4.step)
     {
         interactButton.DisableInteract();
         if (dialogue2.currentLine == 7)
         {
             tutorialBox.SetActive(false);
             npcCollider.radius           = 4;
             dialogue2.requireButtonPress = false;
             dialogue2.currentLine        = 10;
         }
         dialogue2.startLine = 10;
         dialogue2.endAtLine = 10;
         if (dialogue2.currentLine == 11)
         {
             roomManager.GetComponent <RoomManagerScript>().doorLocked = false;
             npcCollider.enabled = false;
         }
     }
 }
Esempio n. 2
0
 // Update is called once per frame
 void Update()
 {
     /*if(dialogue.currentLine == closeDoorLine)
      * {
      *      roomManager.GetComponent<RoomManagerScript> ().doorLocked = true;
      * }*/
     if (dialogue.currentLine == activateAirGolemLine)
     {
         airGolem.canAct = true;
         tutorialBoxAir.SetActive(true);
     }
     if (Input.GetMouseButton(0) && tutorialBoxAir.activeSelf)
     {
         tutorialBoxAir.SetActive(false);
         tutorialBoxAir2.SetActive(true);
     }
     if (AirGolem == null)
     {
         tutorialBoxAir2.SetActive(false);
         if (dialogue.currentLine == closeDoorLine)
         {
             dialogue.currentLine = earthGolemLineStart;
         }
         dialogue.startLine = earthGolemLineStart;
         dialogue.endAtLine = earthGolemLineEnd;
     }
     if (dialogue.currentLine == activateEarthGolemLine)
     {
         earthGolem.canAct = true;
         tutorialBoxEarth.SetActive(true);
     }
     if (Input.GetKeyDown(KeyCode.Alpha2) || Input.GetAxis("Mouse ScrollWheel") < 0f && tutorialBoxEarth.activeSelf)
     {
         tutorialBoxEarth.SetActive(false);
         tutorialBoxEarth2.SetActive(true);
     }
     if (EarthGolem == null)
     {
         tutorialBoxEarth.SetActive(false);
         tutorialBoxEarth2.SetActive(false);
         if (dialogue.currentLine == earthGolemLineStart)
         {
             dialogue.currentLine = waterGolemLineStart;
         }
         dialogue.startLine = waterGolemLineStart;
         dialogue.endAtLine = waterGolemLineEnd;
     }
     if (dialogue.currentLine == activateWaterGolemLine)
     {
         waterGolem.canAct = true;
         tutorialBoxWater.SetActive(true);
     }
     if (WaterGolem == null)
     {
         tutorialBoxWater.SetActive(false);
         if (dialogue.currentLine == waterGolemLineStart)
         {
             dialogue.currentLine = fireGolemLineStart;
         }
         dialogue.startLine = fireGolemLineStart;
         dialogue.endAtLine = fireGolemLineEnd;
     }
     if (dialogue.currentLine == activateFireGolemLine)
     {
         tutorialBoxFire.SetActive(true);
         fireGolem.canAct    = true;
         fireGolem.canAttack = true;
     }
     if (FireGolem == null)
     {
         tutorialBoxFire.SetActive(false);
         npcCollider.radius          = 2.5f;
         dialogue.requireButtonPress = false;
         interactButton.DisableInteract();
         if (dialogue.currentLine == fireGolemLineStart)
         {
             dialogue.currentLine = finalStartLine;
         }
         dialogue.startLine = finalStartLine;
         dialogue.endAtLine = doorOpenLine;
     }
     if (dialogue.currentLine == activateJarLine)
     {
         if (GameObject.Find("Jar(Clone)") == null)
         {
             Instantiate(Jar, this.transform.position + new Vector3(0, 1, 0), Quaternion.identity);
             roomManager.GetComponent <RoomManagerScript> ().doorLocked = true;
         }
     }
     if (dialogue.currentLine == doorOpenLine)
     {
         arrowPointer.SetActive(true);
         npcCollider.enabled = false;
     }
     if (dialogue.currentLine == 40)
     {
         if (GameObject.Find("Jar(Clone)") == null)
         {
             arrowPointer.SetActive(false);
             roomManager.GetComponent <RoomManagerScript> ().doorLocked = false;
         }
     }
 }