Esempio n. 1
0
    void NewPotion(Vector3 pos, GameColors color)
    {
        GameObject newPotion = (GameObject)GameObject.Instantiate(PotionPrefab);

        newPotion.transform.parent = this.transform;
        pos.y = newPotion.transform.position.y;
        newPotion.transform.position = pos;
        Potion potion = (Potion)newPotion.GetComponent(typeof(Potion));

        potion.color = color;
        potion.FillColor(color);
    }