예제 #1
0
    public void PutBuffInUnit(CannonBUFF NewBuff)
    {
        List <CannonBUFF> list = Player.GetBuffList();

        CannonBUFF buff = null;

        if (NewBuff.Immediately)
        {
            NewBuff.DoBUFF(Player, null);
        }
        else
        {
            foreach (var item in list)
            {
                if (item.Name == NewBuff.Name)
                {
                    buff = item;
                    break;
                }
            }

            if (buff != null)
            {
                buff.Add(NewBuff);
            }
            else
            {
                Player.InitBuff(NewBuff);
            }
        }
    }
예제 #2
0
    public void EnterSelectEvent()
    {
        List <CannonBUFF> list = Player.GetBuffList();

        CannonBUFF buff = null;


        if (RandomBuffList[Index].Immediately)
        {
            RandomBuffList[Index].DoBUFF(Player, null);
        }
        else
        {
            foreach (var item in list)
            {
                if (item.Name == RandomBuffList[Index].Name)
                {
                    buff = item;
                    break;
                }
            }

            if (buff != null)
            {
                buff.Add(RandomBuffList[Index]);
            }
            else
            {
                Player.InitBuff(RandomBuffList[Index]);
            }
        }

        if (!RandomBuffList[Index].Repeat)
        {
            BuffList.Remove(RandomBuffList[Index]);
        }

        HidendUI();

        if (LevelPoint > 0)
        {
            LevelPoint--;
            RandomBuff();
        }
    }