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); }
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); }
public BonusEffect(BonusStuff.BonusType _type, float seconds) { type = BonusToBaseEffect(_type); time = Time.time + seconds; }