Example #1
0
 private void GiveCorrespondingItemToTask(Task task)
 {
     if (task.name == "shelter1")
     {
         PlayerVariables.addToInventory("Lv1 Shelter");
         PlayerVariables.addToInventory("Green Seed");
         PlayerVariables.addToInventory("Green Seed");
         PlayerVariables.addToInventory("Green Seed");
         PlayerVariables.addToInventory("Green Seed");
     }
     if (task.name == "testSoil1")
     {
         PlayerVariables.addToInventory("Dirt Checker");
     }
     if (task.name == "shovelBot")
     {
         PlayerVariables.addToInventory("Shovel Bot");
     }
     if (task.name == "shelter2")
     {
         PlayerVariables.addToInventory("Lv2 Greenhouse");
         PlayerVariables.addToInventory("Brocc Seed");
         PlayerVariables.addToInventory("Brocc Seed");
         PlayerVariables.addToInventory("Brocc Seed");
         PlayerVariables.addToInventory("Brocc Seed");
         PlayerVariables.addToInventory("Green Seed");
         importBot();
     }
 }
Example #2
0
 private void OnTriggerStay2D(Collider2D collision)
 {
     if (collision.gameObject.GetComponent <isHoldable>() == true && robotMoveScript.isGrabbing == false)
     {
         PlayerVariables.sendMessage("System", "Item detected.");
         AudioSource.PlayClipAtPoint(collectSound, Vector3.zero);
         collision.gameObject.SetActive(false);
         PlayerVariables.addToInventory(collision.gameObject.GetComponent <itemIdentifier>().name);
     }
 }
Example #3
0
 private void Start()
 {
     PlayerVariables.addToInventory("Solar Panel");
     PlayerVariables.addToInventory("Storage Box");
 }