Beispiel #1
0
        public Jumper(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite,
                      MovableType type, Texture2D projectileSprite, List <Enemy> squad, WorldMap map, bool dropsPowerUp, AnimationController animator) :
            base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, projectileSprite, squad, dropsPowerUp)
        {
            worldmap       = map;
            center         = m_pos.Y;
            default_maxVel = maxVel;
            int[]     JumperAnimationFrames = { 35, 36, 37 };
            Animation JumperAnimation       = new Animation(PlayType.Once, JumperAnimationFrames, 3.0f);

            int[]     JumperAnimationFramesExploded = { 80, 81, 82, 83 };
            Animation JumperAnimationExploded       = new Animation(PlayType.Once, JumperAnimationFramesExploded, 5.0f);

            Dictionary <string, Animation> JumperAnimations = new Dictionary <string, Animation>()
            {
                { "moving", JumperAnimation },
                { "exploded", JumperAnimationExploded }
            };

            m_animator    = new AnimationController(m_world.m_spriteEnemies, JumperAnimations, 5, 18);
            currAnimation = "moving";
        }
Beispiel #2
0
        public Ducker(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite,
                      MovableType type, Texture2D projectileSprite, List <Enemy> squad, WorldMap map, bool dropsPowerUp, AnimationController animator) :
            base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, projectileSprite, squad, dropsPowerUp)
        {
            worldmap       = map;
            m_dropsPowerUp = dropsPowerUp;

            int[]     DuckerAnimationFramesWalking = { 45, 46 };
            Animation DuckerAnimationWalking       = new Animation(PlayType.Loop, DuckerAnimationFramesWalking, 16.0f);

            int[]     DuckerAnimationFramesHolding = { 47 };
            Animation DuckerAnimationHolding       = new Animation(PlayType.Loop, DuckerAnimationFramesHolding, 3.0f);

            int[]     DuckerAnimationFramesExploded         = { 80, 81, 82, 83 };
            Animation DuckerAnimationExploded               = new Animation(PlayType.Loop, DuckerAnimationFramesExploded, 3.0f);
            Dictionary <string, Animation> DuckerAnimations = new Dictionary <string, Animation>()
            {
                { "walking", DuckerAnimationWalking },
                { "shooting", DuckerAnimationHolding },
                { "waiting", DuckerAnimationHolding },
                { "exploded", DuckerAnimationExploded }
            };

            m_animator    = new AnimationController(m_world.m_spriteEnemies, DuckerAnimations, 5, 18);
            currAnimation = "walking";
        }
Beispiel #3
0
        public Garun(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite,
                     MovableType type, Texture2D projectileSprite, List <Enemy> squad, WorldMap map, bool dropsPowerUp, AnimationController animator) :
            base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, projectileSprite, squad, dropsPowerUp)
        {
            worldmap = map;

            int[]     garunAnimationFramesMoving = { 25, 26, 27, 28, 27, 26, 25 };
            Animation garunAnimationMoving       = new Animation(PlayType.Loop, garunAnimationFramesMoving, 10.0f);

            int[]     garunAnimationFramesExploded         = { 80, 81, 82, 83 };
            Animation garunAnimationExploded               = new Animation(PlayType.Once, garunAnimationFramesExploded, 5.0f);
            Dictionary <string, Animation> garunAnimations = new Dictionary <string, Animation>()
            {
                { "moving", garunAnimationMoving },
                { "exploded", garunAnimationExploded }
            };

            m_animator    = new AnimationController(m_world.m_spriteEnemies, garunAnimations, 5, 18);
            currAnimation = "moving";

            center = m_pos.Y;
            offset = 0;  //The offset to add to your Y
            radius = 50; //Whatever you want your radius to be
        }
 public SpawnController(Game1 m_world)
 {
     m_worldMap = m_world.m_worldMap;
     //activatedSpawners.Clear();
 }