示例#1
0
 // Use this for initialization
 void Start()
 {
     m_colorIndex    = 0;
     m_maxColorIndex = 2;
     m_meshRenderer  = transform.parent.GetComponent <MeshRenderer> ();
     m_thorn         = GameObject.Find("Thorn").GetComponent <Thorn>();
 }
示例#2
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
    }
示例#3
0
        public void GenerateThorn()
        {
            Thorn thorn = new Thorn();

            thorn._texture   = content.Load <Texture2D>("JungleLevel/Torn");
            thorn.Position.X = x;
            thorn.Position.Y = y;
            sprite_collection.AddSprite(thorn);
        }
示例#4
0
    public void ReturnThorn(Thorn card)
    {
        if (card.gameObject.activeSelf)
        {
            card.gameObject.SetActive(false);
        }

        card.transform.SetParent(_tr_Thorn);
        _stack_Thorn.Push(card);
    }
示例#5
0
    private void MakeThorn(int count)
    {
        for (int i = 0; i < count; i++)
        {
            Thorn newThorn = Instantiate(DataManager.instance.thorn);
            newThorn.gameObject.SetActive(false);
            newThorn.transform.SetParent(_tr_Thorn);

            _stack_Thorn.Push(newThorn);
        }
    }