Exemplo n.º 1
0
    //Just for populating inv to start
    public static void Testing()
    {
        ResourceLoader rl  = GameObject.FindGameObjectWithTag("loader").GetComponent <ResourceLoader>();
        Brewing        b   = new Brewing();
        Potion         p   = b.Brew(rl.ingredients["poppy"], rl.ingredients["dandylion"], rl.ingredients["emerald"]);
        Potion         pp  = b.Brew(rl.ingredients["mugwort"], rl.ingredients["fly_agaric"], rl.ingredients["selenite"]);
        Potion         ppp = b.Brew(rl.ingredients["ghostcap"], rl.ingredients["morel"], rl.ingredients["amber"]);
        Seed           s   = rl.seeds["thistle"];
        Seed           ss  = rl.seeds["poppy"];
        Seed           sss = rl.seeds["nightshade"];
        Ingredient     i   = rl.ingredients["thistle"];
        Ingredient     ii  = rl.ingredients["catnip"];
        Ingredient     iii = rl.ingredients["lambsgrass"];

        Add(p, 1, false);
        Add(pp, 10, false);
        Add(ppp, 1, false);
        Add(s, 4, false);
        Add(ss, 4, false);
        Add(sss, 4, false);
        Add(i, 8, false);
        Add(i, 3, false);
        Add(ii, 8, false);
        Add(iii, 8, false);
    }
Exemplo n.º 2
0
    public void BrewPotion()
    {
        GetComponent <AudioSource>().Play();
        Brewing b = new Brewing();

        pot = b.Brew(rl.brewingIngredients[0], rl.brewingIngredients[1], rl.brewingIngredients[2]);
        manager.Begin(pot.brewingTime, pot);

        bubbles.GetComponent <SpriteRenderer>().enabled  = true;
        sparkles.GetComponent <SpriteRenderer>().enabled = true;
        foreach (Animator a in anims)
        {
            a.SetBool("idle", false);
        }

        first.GetComponentsInChildren <Image>()[1].sprite  = second.GetComponentsInChildren <Image>()[1].sprite = third.GetComponentsInChildren <Image>()[1].sprite = null;
        first.GetComponentsInChildren <Image>()[1].enabled = second.GetComponentsInChildren <Image>()[1].enabled = third.GetComponentsInChildren <Image>()[1].enabled = false;
        first.GetComponentInChildren <CanvasGroup>().alpha = second.GetComponentInChildren <CanvasGroup>().alpha = third.GetComponentInChildren <CanvasGroup>().alpha = 0;
        for (int i = 0; i < 3; i++)
        {
            rl.brewingIngredients[i] = null;
        }
        rl.ingredientCount = 0;

        Close();
    }
Exemplo n.º 3
0
    public static void TutorialSkip()
    {
        InventorySlot[] slots = GameObject.FindObjectsOfType <InventorySlot>();
        foreach (InventorySlot s in slots)
        {
            if (s.item != null)
            {
                RemoveStack(s);
            }
        }
        ResourceLoader rl = GameObject.FindGameObjectWithTag("loader").GetComponent <ResourceLoader>();
        Brewing        b  = new Brewing();

        Inventory.Add(b.Brew(rl.ingredients["catnip"], rl.ingredients["thistle"], rl.ingredients["lambsgrass"]), 1, false);
        Tutorial2();
    }