Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        float GetEffectLength(EffectManager.EffectEnums Effect)
        {
            switch (Effect)
            {
            case EffectManager.EffectEnums.Blood:
                return(5000f);

            case EffectManager.EffectEnums.Explosion:
                return(1200f);
            }

            return(0f);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 //create a call for an effect
 public static void EffectCall(EffectManager.EffectEnums Effect, Vector2 Location, bool spritesheet)
 {
     Add(new Effect(Effect, Location, spritesheet));
 }
Esempio n. 5
0
    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);
    }