Esempio n. 1
0
 public void BottomButtonFunction()
 {
     if (typeSelected == 3)
     {
         //call in a MOED
         if (ore.eternal)
         {
             Collider2D[] tars = Physics2D.OverlapCircleAll(ore.transform.position, 2);
             foreach (Collider2D t in tars)
             {
                 if (t.transform.parent.GetComponent <OreEternalizer>())
                 {
                     Destroy(t.transform.parent.gameObject);
                     ore.Detonate();
                     Close();
                     return;
                 }
             }
         }
         else if (metaInventory.eternalizers > 0)
         {
             Instantiate(eternalizerPrefab, ore.transform.position, Quaternion.identity);
             metaInventory.ModifyEternalizers(-1);
         }
     }
 }
Esempio n. 2
0
    IEnumerator LaunchLogic()
    {
        GameObject.FindObjectOfType <GameConsole>()?.AddLine("Rocket launched. Command has allocated you a MOED, use it as you see best");
        int temp = storedFuel;

        storedIron = 0; storedFuel = 0; storedCopper = 0;

        hatch.SetTrigger("Open");
        aud.Play();
        yield return(new WaitForSeconds(1f));

        rocket.SetTrigger("Launch");
        metaInventory.ModifyInventory(temp);
        metaInventory.ModifyEternalizers(1);//give the player a new etenalizer
    }