public IEffect MakeSprite(EffectEnum spriteType, Vector2 location) { return(spriteType switch { EffectEnum.HitSprite => new HitSprite(texture2, location), EffectEnum.SwordBeamExplode => new SwordBeamExplode(texture2, location), EffectEnum.Death => new DeathCloud(texture2, location, game), EffectEnum.GanonAshes => new GanonAshes(texture1, location), _ => throw new ArgumentException("Invalid sprite! " + spriteType.ToString() + " Sprite factory failed."), });
public override string ToString() { return(EffectEnum.ToString()); }