Exemplo n.º 1
0
        public static LootPopup Create(Vector3 position, string itemName, Transform prefabLootPopup)
        {
            Transform lootPopupTransform = Instantiate(prefabLootPopup, position, Quaternion.identity);
            LootPopup lootPopup          = lootPopupTransform.GetComponent <LootPopup>();

            lootPopup.Setup(itemName);
            return(lootPopup);
        }
Exemplo n.º 2
0
        // Create a damage popup
        public static LootPopup Create(Vector3 position, int experienceAmount, Transform prefabLootPopup)
        {
            Transform lootPopupTransform = Instantiate(prefabLootPopup, position, Quaternion.identity);
            LootPopup lootPopup          = lootPopupTransform.GetComponent <LootPopup>();

            lootPopup.Setup(experienceAmount);
            return(lootPopup);
        }