Пример #1
0
    public EffectType BonusToBaseEffect(BonusStuff.BonusType _type)
    {
        switch (_type)
        {
        case BonusStuff.BonusType.Default:
            return(EffectType.InstantHp);

        case BonusStuff.BonusType.DamageImmunity:
            return(EffectType.DamageImmunity);

        case BonusStuff.BonusType.UnlimitedTouches:
            return(EffectType.UnlimitedTouches);
        }
        return(EffectType.Default);
    }
Пример #2
0
    GameObject generateBonusStuff(int line, BonusStuff.BonusType type = BonusStuff.BonusType.Default)
    {
        Vector2    Line = SpawnCoordsByLine(line);
        GameObject temp = BaseObj;

        switch (type)
        {
        case global::BonusStuff.BonusType.Default:
            temp = Instantiate(DefaultBonus, Line, Quaternion.identity);
            break;

        case global::BonusStuff.BonusType.DamageImmunity:
            temp = Instantiate(DamageImmunBonus, Line, Quaternion.identity);
            break;

        case global::BonusStuff.BonusType.UnlimitedTouches:     //CHANGE
            temp = Instantiate(DefaultBonus, Line, Quaternion.identity);
            break;
        }
        temp.SetActive(false);
        return(temp);
    }
Пример #3
0
 public BonusEffect(BonusStuff.BonusType _type, float seconds)
 {
     type = BonusToBaseEffect(_type);
     time = Time.time + seconds;
 }