コード例 #1
0
    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
    }
コード例 #2
0
    public void ReturnPurplePotion(PurplePotion card)
    {
        if (card.gameObject.activeSelf)
        {
            card.gameObject.SetActive(false);
        }

        card.transform.SetParent(_tr_PurplePotion);
        _stack_PurplePotion.Push(card);
    }
コード例 #3
0
    private void MakePurplePotion(int count)
    {
        for (int i = 0; i < count; i++)
        {
            PurplePotion newPurplePotion = Instantiate(DataManager.instance.purplePotion);
            newPurplePotion.gameObject.SetActive(false);
            newPurplePotion.transform.SetParent(_tr_PurplePotion);

            _stack_PurplePotion.Push(newPurplePotion);
        }
    }