Beispiel #1
0
    public void CheckContents()
    {
        // Try to find any recipe that includes these contents
        bool partialFound = false;

        foreach (Potion r in book.potions)
        {
            switch (r.Compare(contents))
            {
            case Potion.MatchType.Full:
                contents.Clear();
                if (!newSpot.IsEmpty(null))
                {
                    StartCoroutine(WaitForSpotClear(r));
                }
                else
                {
                    CreateFromRecipe(r);
                }
                return;

            case Potion.MatchType.Partial:
                partialFound = true;
                break;

            case Potion.MatchType.None:
                break;
            }
        }

        if (!partialFound)
        {
            SpitOut();
        }
    }
Beispiel #2
0
 // Update is called once per frame
 void Update()
 {
     if (!spawning)
     {
         if (pad.IsEmpty(null))
         {
             StartCoroutine(DoSpawn());
         }
     }
 }