protected override void OnAwake() { bomb = Resources.Load <Bomb>("Objects/Bomb"); cardReset = Resources.Load <CardReset>("Objects/CardReset"); changeCardPosition = Resources.Load <ChangeCardPosition>("Objects/ChangeCardPosition"); weapon = Resources.Load <Weapon>("Objects/Weapon"); flameThrower = Resources.Load <FlameThrower>("Objects/Flame"); //Trap thorn = Resources.Load <Thorn>(PATH_TRAP + "Thorn"); //Trap //Coin goldCoin = Resources.Load <Coin>(PATH_COIN + "GoldCoin"); //Coin //Monster ghost = Resources.Load <Monster>(PATH_MONSTER + "Ghost"); slime = Resources.Load <Slime>(PATH_MONSTER + "Slime"); imp = Resources.Load <Imp>(PATH_MONSTER + "Imp"); //Monster //Potion blackPotion = Resources.Load <BlackPotion>(PATH_POTION + "BlackPotion"); bluePotion = Resources.Load <BluePotion>(PATH_POTION + "BluePotion"); pinkPotion = Resources.Load <PinkPotion>(PATH_POTION + "PinkPotion"); purplePotion = Resources.Load <PurplePotion>(PATH_POTION + "PurplePotion"); redPotion = Resources.Load <RedPotion>(PATH_POTION + "RedPotion"); yellowPotion = Resources.Load <YellowPotion>(PATH_POTION + "Yellowpotion"); //Potion }
public void ReturnYellowPotion(YellowPotion card) { if (card.gameObject.activeSelf) { card.gameObject.SetActive(false); } card.transform.SetParent(_tr_YellowPotion); _stack_YellowPotion.Push(card); }
private void MakeYellowPotion(int count) { for (int i = 0; i < count; i++) { YellowPotion newYellowPotion = Instantiate(DataManager.instance.yellowPotion); newYellowPotion.gameObject.SetActive(false); newYellowPotion.transform.SetParent(_tr_YellowPotion); _stack_YellowPotion.Push(newYellowPotion); } }