Beispiel #1
0
 private void Update()
 {
     if (inCollider)
     {
         if (Input.GetKeyDown("e") && player != null && player.getBots() > 0)
         {
             bot.SetActive(true);
             controller.powerCheck();
         }
         if (Input.GetKeyDown("e") && self.activeSelf)
         {
             bot.SetActive(false);
             controller.powerCheck();
         }
     }
 }
Beispiel #2
0
 void ExitConditions(Collider c)
 {
     if (c.tag.Equals("Player"))
     {
         BotCollector playerInventory = c.GetComponent <BotCollector>();
         if (playerInventory.getBots() == numBots)
         {
             StartCoroutine(ExitScene());
         }
         else
         {
             TipPanel.GetInstance().SetText("You're missing bots.");
             TipPanel.GetInstance().SetVisible(true);
         }
     }
 }
Beispiel #3
0
 // Update is called once per frame
 void Update()
 {
     if (inCollider)
     {
         if (Input.GetKeyDown("e") && player != null && player.getBots() >= botsNeeded && !container.getIsBuilt() && !container.getIsBuilding())
         {
             container.setIsBuilding(true);
             StartCoroutine(delayedBuild());
         }
         if (Input.GetKeyDown("e") && buildObject.activeSelf)
         {
             deactivatePlatform(player);
             deactivateSwitch(player);
         }
     }
 }