public Effect(EffectManager.EffectEnums Effect, Vector2 Location, bool Spritesheet) { EffectE = Effect; effectTex = GetEffect(Effect); effectLength = GetEffectLength(Effect); location = Location; spriteSheet = Spritesheet; Timer = new UiTimer(effectLength); }
float GetEffectLength(EffectManager.EffectEnums Effect) { switch (Effect) { case EffectManager.EffectEnums.Blood: return(5000f); case EffectManager.EffectEnums.Explosion: return(1200f); } return(0f); }
Texture2D GetEffect(EffectManager.EffectEnums Effect) { switch (Effect) { case EffectManager.EffectEnums.Blood: Zlevel = 0; return(Art.BloodSplats); case EffectManager.EffectEnums.Explosion: totalframes = 16; frame = 0; elasped = 0; totalTime = 75f; Zlevel = 1; return(Art.Explosions); } return(null); }
//create a call for an effect public static void EffectCall(EffectManager.EffectEnums Effect, Vector2 Location, bool spritesheet) { Add(new Effect(Effect, Location, spritesheet)); }