Ejemplo n.º 1
0
    /**
     * 유닛의 Bufflist에 버프를 넣는 함수
     */
    public virtual void AddBuff(Buff _buff)
    {
        Buff buff = bufflist.Find(x => x.GetType().Equals(_buff.GetType()));

        if (Equals(buff, null))
        {
            if (_buff is Adrenaline)
            {
                bufflist.Add(new Adrenaline(_buff.Count));
            }
            else if (_buff is Bleed)
            {
                bufflist.Add(new Bleed(_buff.Count));
            }
            else if (_buff is Burn)
            {
                bufflist.Add(new Burn(_buff.Count));
            }
            else if (_buff is Caffeine)
            {
                bufflist.Add(new Caffeine(_buff.Count));
            }
            else if (_buff is Defenseless)
            {
                bufflist.Add(new Defenseless(_buff.Count));
            }
            else if (_buff is Full)
            {
                bufflist.Add(new Full(_buff.Count));
            }
            else if (_buff is Giddiness)
            {
                bufflist.Add(new Giddiness(_buff.Count));
            }
            else if (_buff is Hallucinated)
            {
                bufflist.Add(new Hallucinated(_buff.Count));
            }
            else if (_buff is Hunger)
            {
                bufflist.Add(new Hunger());
            }
            else if (_buff is Morfin)
            {
                bufflist.Add(new Morfin(_buff.Count));
            }
            else if (_buff is Poison)
            {
                bufflist.Add(new Poison(_buff.Count));
            }
            else if (_buff is Relieved)
            {
                bufflist.Add(new Relieved(_buff.Count));
            }
            else if (_buff is Renewal)
            {
                bufflist.Add(new Renewal(_buff.Count));
            }
            else if (_buff is Starve)
            {
                bufflist.Add(new Starve( ));
            }
            else if (_buff is Stunned)
            {
                bufflist.Add(new Stunned(_buff.Count));
            }
        }
        else
        {
            buff.AddCount(_buff.Count);
        }

        Debug.Log("Buff: " + _buff.GetType().ToString() + "turn" + _buff.Count);
    }