Пример #1
0
        public void addWalkAnimation(string baseName, string spriteNameLeft, string spriteNameRight, DrawComponent drawComp)
        {
            string        imgOne        = baseName + "1.png";
            string        imgTwo        = baseName + "2.png";
            string        imgThree      = baseName + "3.png";
            List <string> walkAnimation = new List <string>
            {
                imgTwo,
                imgOne,
                imgTwo,
                imgThree
            };
            List <string> walkDefaults = new List <string>()
            {
                imgTwo,
                imgOne,
                imgTwo,
                imgThree
            };

            drawComp.addAnimatedSprite(walkAnimation, walkDefaults, spriteNameRight);
            drawComp.addAnimatedSprite(walkAnimation, walkDefaults, spriteNameLeft);

            drawComp.rotateFlipSprite(spriteNameLeft, RotateFlipType.RotateNoneFlipX);
        }
Пример #2
0
        //------------------------------------------------------------------------------------------------------------------

        //Here's where you add all the components the entity has.
        //You can just uncomment the ones you want.
        public void addMyComponents(float x, float y)
        {
            /*POSITION COMPONENT - Does it have a position?
             */
            addComponent(new PositionComponent(x, y, defaultWidth, defaultHeight, this), true);

            /*DRAW COMPONENT - Does it get drawn to the game world?
             * You'll need to know the address for your image.
             * It'll probably be something along the lines of "RunningGame.Resources.[      ].png" ONLY png!!
             * First create the component
             * Then add the image
             * Then set the image to the active image
             */
            DrawComponent drawComp = ( DrawComponent )addComponent(new DrawComponent(defaultWidth, defaultHeight, level, true), true);

            //Add image - Use base name for first parameter (everything in file path after Resources. and before the numbers and .png)
            //Then second parameter is full filepath to a default image
            drawComp.addSprite("Artwork.Other.WhiteSquare", "RunningGame.Resources.Artwork.Other.WhiteSquare.png", "Main");
            drawComp.setSprite("Main");   //Set image to active image

            /* ANIMATION COMPONENT - Does it need animating?
             * The float that this reads in is the amount of time (in seconds) between frames.
             * So, if it was 5, you would be on one frame for 5 seconds, then switch to the next, then 5 seconds later
             * It'd switch to the next etc, etc...
             */
            addComponent(new AnimationComponent(0.2f));


            List <string> anim = new List <string>()
            {
                "Artwork.Creatures.vision_orb1",
                "Artwork.Creatures.vision_orb2",
            };
            List <string> animDefaults = new List <string>()
            {
                "RunningGame.Resources.Artwork.Creatures.vision_orb1.png",
                "RunningGame.Resources.Artwork.Creatures.vision_orb2.png",
            };

            drawComp.addAnimatedSprite(anim, animDefaults, "MainAnim");
            drawComp.setSprite("MainAnim");


            /*COLLIDER - Does it hit things?
             * The second field is the collider type. Look in GlobalVars for a string with the right name.
             */
            addComponent(new ColliderComponent(this, GlobalVars.VISION_ORB_UNLOCK_COLLIDER), true);

            /*GRAVITY COMPONENT - Does it have Gravity?
             * There's a standard gravity in GlobalVars
             */
            addComponent(new GravityComponent(0, GlobalVars.STANDARD_GRAVITY), true);
        }
Пример #3
0
        //------------------------------------------------------------------------------------------------------------------

        public void addMyComponents(float x, float y, float velX, float velY)
        {
            this.updateOutOfView = true;

            /*POSITION COMPONENT - Does it have a position?
             */
            addComponent(new PositionComponent(x, y, defaultWidth, defaultHeight, this), true);

            //Gravity
            addComponent(new GravityComponent(0, GlobalVars.STANDARD_GRAVITY / 4), true);

            /*DRAW COMPONENT - Does it get drawn to the game world?
             * NOTE: Was PaintBlob11.png before Bullet11.png
             */
            DrawComponent drawComp = ( DrawComponent )addComponent(new DrawComponent(defaultWidth, defaultHeight, level, true), true);


            List <string> bulletAnimation = new List <string>()
            {
                "Artwork.Foreground.Bullet.Bullet1",
                "Artwork.Foreground.Bullet.Bullet2"
            };

            List <string> bulletAnimDefaults = new List <string>()
            {
                "RunningGame.Resources.Artwork.Foreground.Bullet.Bullet111",
                "RunningGame.Resources.Artwork.Foreground.Bullet.Bullet211"
            };


            //drawComp.addSprite( "Artwork.Foreground.Bullet", "RunningGame.Resources.Artwork.Foreground.Bullet11.png", "Main" );
            drawComp.addAnimatedSprite(bulletAnimation, bulletAnimDefaults, "Main");
            drawComp.setSprite("Main");


            /* ANIMATION COMPONENT - Does it need animating?
             */
            addComponent(new AnimationComponent(0.08f), true);

            /*VELOCITY COMPONENT - Does it move?
             */
            addComponent(new VelocityComponent(velX, velY), true);

            /*COLLIDER - Does it hit things?
             */
            addComponent(new ColliderComponent(this, GlobalVars.BULLET_COLLIDER_TYPE, 10, 10), true);

            /* OUT OF SCREEN COOMPONENT - Destroy on exiting screen.
             */
            addComponent(new ScreenEdgeComponent(3, 3, 3, 3), true);
        }
Пример #4
0
        //------------------------------------------------------------------------------------------------------------------

        //Here's where you add all the components the entity has.
        //You can just uncomment the ones you want.
        public void addMyComponents(float x, float y, bool shield)
        {
            this.updateOutOfView = true;

            /*POSITION COMPONENT - Does it have a position?
             */
            addComponent(new PositionComponent(x, y, defaultWidth, defaultHeight, this), true);

            /*DRAW COMPONENT - Does it get drawn to the game world?
             */
            DrawComponent drawComp = ( DrawComponent )addComponent(new DrawComponent(defaultWidth, defaultHeight, level, true), true);

            List <string> enemyAnimation;
            List <string> enemyAnimDefaults;

            if (!shield)
            {
                enemyAnimation = new List <string>()
                {
                    "Artwork.Creatures.Enemy1",
                    "Artwork.Creatures.Enemy2",
                };

                enemyAnimDefaults = new List <string>()
                {
                    "RunningGame.Resources.Artwork.Creatures.Enemy111.png",
                    "RunningGame.Resources.Artwork.Creatures.Enemy211.png"
                };
            }
            else
            {
                enemyAnimation = new List <string>()
                {
                    "Artwork.Creatures.EnemyGlow1",
                    "Artwork.Creatures.EnemyGlow2",
                };

                enemyAnimDefaults = new List <string>()
                {
                    "RunningGame.Resources.Artwork.Creatures.EnemyGlow111.png",
                    "RunningGame.Resources.Artwork.Creatures.EnemyGlow211.png"
                };
            }

            drawComp.addAnimatedSprite(enemyAnimation, enemyAnimDefaults, leftImageName);

            drawComp.addAnimatedSprite(enemyAnimation, enemyAnimDefaults, rightImageName);
            drawComp.rotateFlipSprite(rightImageName, System.Drawing.RotateFlipType.RotateNoneFlipX);

            drawComp.setSprite(leftImageName);


            /* ANIMATION COMPONENT - Does it need animating?
             */
            addComponent(new AnimationComponent(0.10f), true);

            /*VELOCITY COMPONENT - Does it move?
             */
            addComponent(new VelocityComponent(0, 0), true);

            /*COLLIDER - Does it hit things?
             * The second field is the collider type. Look in GlobalVars for a string with the right name.
             */
            addComponent(new ColliderComponent(this, GlobalVars.SIMPLE_ENEMY_COLLIDER_TYPE, defaultWidth, defaultHeight - 4), true);

            /*GRAVITY COMPONENT - Does it have Gravity?
             */
            addComponent(new GravityComponent(0, GlobalVars.STANDARD_GRAVITY), true);


            /*HEALTH COMPONENT - Does it have health, can it die?
             */
            addComponent(new HealthComponent(100, true, 0, 100.0f, level), true);

            /*SIMPLE ENEMY COMPONENT
             */
            addComponent(new SimpleEnemyComponent(GlobalVars.SIMPLE_ENEMY_H_SPEED + new Random().Next(-10, 10), true, shield), true);

            //Screen Edge Stop/Wrap/End Level
            addComponent(new ScreenEdgeComponent(1, 1, 1, 5), true);
        }
Пример #5
0
        //------------------------------------------------------------------------------------------------------------------

        //Here's where you add all the components the entity has.
        //You can just uncomment the ones you want.
        public void addMyComponents(float x, float y)
        {
            /*POSITION COMPONENT - Does it have a position?
             */
            addComponent(new PositionComponent(x, y, defaultWidth, defaultHeight, this), true);

            /*DRAW COMPONENT - Does it get drawn to the game world?
             * You'll need to know the address for your image.
             * It'll probably be something along the lines of "RunningGame.Resources.[      ].png" ONLY png!!
             * First create the component
             * Then add the image
             * Then set the image to the active image
             */
            DrawComponent drawComp = ( DrawComponent )addComponent(new DrawComponent(defaultWidth, defaultHeight, level, true), true);

            //Add image - Use base name for first parameter (everything in file path after Resources. and before the numbers and .png)
            //Then second parameter is full filepath to a default image
            drawComp.addSprite("Artwork.Other.WhiteSquare", "RunningGame.Resources.Artwork.Other.WhiteSquare.png", "Main");
            drawComp.setSprite("Main");   //Set image to active image

            /* ANIMATION COMPONENT - Does it need animating?
             * The float that this reads in is the amount of time (in seconds) between frames.
             * So, if it was 5, you would be on one frame for 5 seconds, then switch to the next, then 5 seconds later
             * It'd switch to the next etc, etc...
             */
            addComponent(new AnimationComponent(0.2f));


            List <string> anim = new List <string>()
            {
                "Artwork.Creatures.vision_orb1",
                "Artwork.Creatures.vision_orb2",
            };

            List <string> animDefaults = new List <string>()
            {
                "RunningGame.Resources.Artwork.Creatures.vision_orb1.png",
                "RunningGame.Resources.Artwork.Creatures.vision_orb2.png",
            };

            drawComp.addAnimatedSprite(anim, animDefaults, "MainAnim");
            drawComp.setSprite("MainAnim");

            /*VELOCITY COMPONENT - Does it move?
             */
            addComponent(new VelocityComponent(0, 0), true);

            /*VISION COMPONENT
             */
            addComponent(new VisionInputComponent(this), true);

            /*COLLIDER - Does it hit things?
             * The second field is the collider type. Look in GlobalVars for a string with the right name.
             */
            addComponent(new ColliderComponent(this, GlobalVars.VISION_COLLIDER_TYPE), true);

            /*HEALTH COMPONENT - Does it have health, can it die?
             * Parameters: maxHealth, startingHealth, draw a health bar?, recharge amount, recharge time
             * Basically, every rechargeTime, the entity regenerates rechargeAmount
             */
            addComponent(new HealthComponent(100, 100, true, 5, level), true);

            //Edge of screen component
            addComponent(new ScreenEdgeComponent(1, 1, 1, 1), true);
        }
Пример #6
0
        //------------------------------------------------------------------------------------------------------------------

        //Here's where you add all the components the entity has.
        //You can just uncomment the ones you want.
        public void addMyComponents(float x, float y, float timeBetweenBursts, int shotsPerBurst, int dir, int switchId)
        {
            /*POSITION COMPONENT - Does it have a position?
             */
            addComponent(new PositionComponent(x, y, defaultWidth, defaultHeight, this), true);

            /*VELOCITY - Just cuz'
             */
            addComponent(new VelocityComponent(), true);

            /* TIMED SHOOTER COMPONENT - It shoots at a given time interval.
             */
            TimedShooterComponent shooterComp = ( TimedShooterComponent )addComponent(new TimedShooterComponent(timeBetweenBursts, shotsPerBurst, this), true);

            startingSprite = shooterComp.badSpriteName;

            /*DRAW COMPONENT - Does it get drawn to the game world?
             */
            DrawComponent drawComp = (DrawComponent)addComponent(new DrawComponent(defaultWidth, defaultHeight, level, true), true);

            //Add image - Use base name for first parameter (everything in file path after Resources. and before the numbers and .png)
            //Then second parameter is full filepath to a default image
            drawComp.addSprite("Artwork.Other.WhiteSquare", "RunningGame.Resources.Artwork.Other.WhiteSquare.png", "Bkp");

            List <string> shooterAnimation = new List <string>()
            {
                "Artwork.Foreground.Shooter.shooterp0",
                "Artwork.Foreground.Shooter.shooterp1",
                "Artwork.Foreground.Shooter.shooterp2",
                "Artwork.Foreground.Shooter.shooterp3",
                "Artwork.Foreground.Shooter.shooterp4",
                "Artwork.Foreground.Shooter.shooterp5",
                "Artwork.Foreground.Shooter.shooterp6",
                "Artwork.Foreground.Shooter.shooterp7",
                "Artwork.Foreground.Shooter.shooterp8",
                "Artwork.Foreground.Shooter.shooterp9",
                "Artwork.Foreground.Shooter.shooterp10",
                "Artwork.Foreground.Shooter.shooterp11",
                "Artwork.Foreground.Shooter.shooterp12"
            };
            List <string> shooterAnimDefaults = new List <string>()
            {
                "RunningGame.Resources.Artwork.Foreground.Shooter.shooterp0.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.shooterp1.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.shooterp2.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.shooterp3.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.shooterp4.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.shooterp5.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.shooterp6.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.shooterp7.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.shooterp8.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.shooterp9.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.shooterp10.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.shooterp11.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.shooterp12.png"
            };


            List <string> goodShooterAnimation = new List <string>()
            {
                "Artwork.Foreground.Shooter.GoodShooter0",
                "Artwork.Foreground.Shooter.GoodShooter1",
                "Artwork.Foreground.Shooter.GoodShooter2",
                "Artwork.Foreground.Shooter.GoodShooter3",
                "Artwork.Foreground.Shooter.GoodShooter4",
                "Artwork.Foreground.Shooter.GoodShooter5",
                "Artwork.Foreground.Shooter.GoodShooter6",
                "Artwork.Foreground.Shooter.GoodShooter7",
                "Artwork.Foreground.Shooter.GoodShooter8",
                "Artwork.Foreground.Shooter.GoodShooter9",
                "Artwork.Foreground.Shooter.GoodShooter10",
                "Artwork.Foreground.Shooter.GoodShooter11",
                "Artwork.Foreground.Shooter.GoodShooter12"
            };
            List <string> goodShooterAnimDefaults = new List <string>()
            {
                "RunningGame.Resources.Artwork.Foreground.Shooter.GoodShooter0.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.GoodShooter1.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.GoodShooter2.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.GoodShooter3.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.GoodShooter4.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.GoodShooter5.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.GoodShooter6.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.GoodShooter7.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.GoodShooter8.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.GoodShooter9.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.GoodShooter10.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.GoodShooter11.png",
                "RunningGame.Resources.Artwork.Foreground.Shooter.GoodShooter12.png"
            };

            drawComp.addAnimatedSprite(shooterAnimation, shooterAnimDefaults, shooterComp.badSpriteName);
            drawComp.addAnimatedSprite(goodShooterAnimation, goodShooterAnimDefaults, shooterComp.goodShooterName);
            drawComp.setSprite(startingSprite);   //Set image to active image

            float animationTime = timeBetweenBursts / shooterAnimDefaults.Count();

            /* ANIMATION COMPONENT - Does it need animating?
             */
            AnimationComponent animComp = (AnimationComponent)addComponent(new AnimationComponent(animationTime), true);

            /*COLLIDER - Does it hit things?
             */
            addComponent(new ColliderComponent(this, GlobalVars.TIMED_SHOOTER_COLLIDER_TYPE), true);

            /* TIMER COMPONENT - It makes use of timed method execution.
             */
            TimerComponent timeComp = ( TimerComponent )addComponent(new TimerComponent(), true);

            timeComp.addTimer(shooterComp.fireTimerString, timeBetweenBursts);

            /* DIRECTION COMPONENT - It points in a particular direciton.
             */
            addComponent(new DirectionalComponent(dir));

            /*VEL TO ZERO - If it's moving, it will try to stop moving.
             */
            addComponent(new VelToZeroComponent(100, 100));

            /*SWITCH LISTENER - It listens for switches.
             */
            addComponent(new SwitchListenerComponent(switchId, GlobalVars.TIMED_SHOOTER_SWITCH_EVENT));
        }
Пример #7
0
        public void addMyComponents(float x, float y)
        {
            this.updateOutOfView = true;

            //Position Component
            addComponent(new PositionComponent(x, y, defaultWidth, defaultHeight, this), true);

            //Draw component
            DrawComponent drawComp = ( DrawComponent )addComponent(new DrawComponent(defaultWidth, defaultHeight, level, true), true);

            drawComp.addSprite("Artwork.Foreground.BlockSquare", "RunningGame.Resources.Artwork.Foreground.BlockSquare.png", blockNormName);
            drawComp.setSprite(blockNormName);


            List <string> animImgDefaults = new List <string>()
            {
                "RunningGame.Resources.Artwork.Foreground.BlockSquare.png",
                //"RunningGame.Resources.Artwork.Foreground.SpawnBlock.SpawnPoof1.png",
                "RunningGame.Resources.Artwork.Foreground.SpawnBlock.SpawnPoof2.png",
                //"RunningGame.Resources.Artwork.Foreground.SpawnBlock.SpawnPoof3.png",
                "RunningGame.Resources.Artwork.Foreground.SpawnBlock.SpawnPoof4.png",
                //"RunningGame.Resources.Artwork.Foreground.SpawnBlock.SpawnPoof5.png",
                "RunningGame.Resources.Artwork.Foreground.SpawnBlock.SpawnPoof6.png",
                "RunningGame.Resources.Artwork.Foreground.SpawnBlock.SpawnPoof7.png"
            };
            List <string> animImg = new List <string>()
            {
                "Artwork.Foreground.BlockSquare",
                //"Artwork.Foreground.SpawnBlock.SpawnPoof1",
                "Artwork.Foreground.SpawnBlock.SpawnPoof2",
                //"Artwork.Foreground.SpawnBlock.SpawnPoof3",
                "Artwork.Foreground.SpawnBlock.SpawnPoof4",
                //"Artwork.Foreground.SpawnBlock.SpawnPoof5",
                "Artwork.Foreground.SpawnBlock.SpawnPoof6",
                "Artwork.Foreground.SpawnBlock.SpawnPoof7"
            };

            drawComp.addAnimatedSprite(animImg, animImgDefaults, blockAnimationName);

            AnimationComponent animComp = (AnimationComponent)addComponent(new AnimationComponent(0.0001f), true);

            animComp.animationOn       = false;
            animComp.destroyAfterCycle = true;

            //Velocity Component
            addComponent(new VelocityComponent(0, 0), true);

            //Collider
            addComponent(new ColliderComponent(this, GlobalVars.SPAWN_BLOCK_COLLIDER_TYPE), true);

            //Gravity Component
            addComponent(new GravityComponent(0, GlobalVars.STANDARD_GRAVITY), true);

            //Spawn Block Component
            addComponent(new SpawnBlockComponent(), true);

            //Off side of screen
            addComponent(new ScreenEdgeComponent(3, 3, 3, 3), true);

            /*
             * //Pushable
             * PushableComponent pushComp = (PushableComponent)addComponent( new PushableComponent(), true );
             * pushComp.horiz = true;
             * pushComp.vert = false;
             */
        }
Пример #8
0
        //------------------------------------------------------------------------------------------------------------------

        //Here's where you add all the components the entity has.
        //You can just uncomment the ones you want.
        public void addMyComponents(float x, float y, float time, bool fill)
        {
            /*POSITION COMPONENT - Does it have a position?
             */
            addComponent(new PositionComponent(x, y, defaultWidth, defaultHeight, this), true);

            /*DRAW COMPONENT - Does it get drawn to the game world?
             * You'll need to know the address for your image.
             * It'll probably be something along the lines of "RunningGame.Resources.[      ].png" ONLY png!!
             * First create the component
             * Then add the image
             * Then set the image to the active image
             */
            DrawComponent drawComp = (DrawComponent)addComponent(new DrawComponent(defaultWidth, defaultHeight, level, true), true);

            //Add image - Use base name for first parameter (everything in file path after Resources. and before the numbers and .png)
            //Then second parameter is full filepath to a default image
            drawComp.addSprite("Artwork.Foreground.Grass", "RunningGame.Resources.Artwork.Foreground.Grass11.png", "Bkp");



            List <string> animMain = new List <string>()
            {
                "Artwork.Foreground.TimeDial.CTP1",
                "Artwork.Foreground.TimeDial.CTP2",
                "Artwork.Foreground.TimeDial.CTP3",
                "Artwork.Foreground.TimeDial.CTP4",
                "Artwork.Foreground.TimeDial.CTP5",
                "Artwork.Foreground.TimeDial.CTP6",
                "Artwork.Foreground.TimeDial.CTP7",
                "Artwork.Foreground.TimeDial.CTP8",
                "Artwork.Foreground.TimeDial.CTP9",
                "Artwork.Foreground.TimeDial.CTP10",
                "Artwork.Foreground.TimeDial.CTP11",
                "Artwork.Foreground.TimeDial.CTP12"
            };
            List <string> animDefaults = new List <string>()
            {
                "RunningGame.Resources.Artwork.Foreground.TimeDial.CTP0.png",
                "RunningGame.Resources.Artwork.Foreground.TimeDial.CTP1.png",
                "RunningGame.Resources.Artwork.Foreground.TimeDial.CTP2.png",
                "RunningGame.Resources.Artwork.Foreground.TimeDial.CTP3.png",
                "RunningGame.Resources.Artwork.Foreground.TimeDial.CTP4.png",
                "RunningGame.Resources.Artwork.Foreground.TimeDial.CTP5.png",
                "RunningGame.Resources.Artwork.Foreground.TimeDial.CTP6.png",
                "RunningGame.Resources.Artwork.Foreground.TimeDial.CTP7.png",
                "RunningGame.Resources.Artwork.Foreground.TimeDial.CTP8.png",
                "RunningGame.Resources.Artwork.Foreground.TimeDial.CTP9.png",
                "RunningGame.Resources.Artwork.Foreground.TimeDial.CTP10.png",
                "RunningGame.Resources.Artwork.Foreground.TimeDial.CTP11.png",
                "RunningGame.Resources.Artwork.Foreground.TimeDial.CTP12.png"
            };

            if (!fill)
            {
                animMain.Reverse();
                animDefaults.Reverse();
            }

            drawComp.addAnimatedSprite(animMain, animDefaults, "Main");

            drawComp.setSprite("Main"); //Set image to active image

            float animationTime = time / animDefaults.Count();

            /* ANIMATION COMPONENT - Does it need animating?
             * The float that this reads in is the amount of time (in seconds) between frames.
             * So, if it was 5, you would be on one frame for 5 seconds, then switch to the next, then 5 seconds later
             * It'd switch to the next etc, etc...
             */
            AnimationComponent animComp = (AnimationComponent)addComponent(new AnimationComponent(animationTime), true);

            animComp.destroyAfterCycle = true;
        }
Пример #9
0
        //------------------------------------------------------------------------------------------------------------------

        //Here's where you add all the components the entity has.
        //You can just uncomment the ones you want.
        public void addMyComponents(float x, float y)
        {
            this.resetOnCheckpoint = false;

            /*POSITION COMPONENT - it has a position
             */
            addComponent(new PositionComponent(x, y, defaultWidth, defaultHeight, this), true);

            /*DRAW COMPONENT - Does it get drawn to the game world?
             */
            DrawComponent drawComp = (DrawComponent)addComponent(new DrawComponent(defaultWidth, defaultHeight, level, true), true);

            //Add image - Use base name for first parameter (everything in file path after Resources. and before the numbers and .png)
            //Then second parameter is full filepath to a default image
            drawComp.addSprite("Artwork.Foreground.Checkpoint.UncheckedCheckpoint", "RunningGame.Resources.Artwork.Foreground.Checkpoint.UncheckedCheckpoint.png", uncheckedImageName);
            drawComp.addSprite("Artwork.Foreground.Checkpoint.CheckedCheckpoint", "RunningGame.Resources.Artwork.Foreground.Checkpoint.CheckedCheckpoint.png", checkedImageName);
            drawComp.setSprite(uncheckedImageName); //Set image to active image


            List <string> animImgDefaults = new List <string>()
            {
                "RunningGame.Resources.Artwork.Foreground.Checkpoint.UncheckedCheckpoint.png",
                "RunningGame.Resources.Artwork.Foreground.Checkpoint.animCheck1.png",
                "RunningGame.Resources.Artwork.Foreground.Checkpoint.animCheck2.png",
                "RunningGame.Resources.Artwork.Foreground.Checkpoint.animCheck3.png",
                "RunningGame.Resources.Artwork.Foreground.Checkpoint.animCheck4.png",
                "RunningGame.Resources.Artwork.Foreground.Checkpoint.animCheck3.png",
                "RunningGame.Resources.Artwork.Foreground.Checkpoint.animCheck2.png",
                "RunningGame.Resources.Artwork.Foreground.Checkpoint.animCheck1.png",
                "RunningGame.Resources.Artwork.Foreground.Checkpoint.UncheckedCheckpoint.png",
                "RunningGame.Resources.Artwork.Foreground.Checkpoint.animCheck5.png",
                "RunningGame.Resources.Artwork.Foreground.Checkpoint.animCheck6.png",
                "RunningGame.Resources.Artwork.Foreground.Checkpoint.CheckedCheckpoint.png",
            };
            List <string> animImg = new List <string>()
            {
                "Artwork.Foreground.Checkpoint.UncheckedCheckpoint",
                "Artwork.Foreground.Checkpoint.animCheck1",
                "Artwork.Foreground.Checkpoint.animCheck2",
                "Artwork.Foreground.Checkpoint.animCheck3",
                "Artwork.Foreground.Checkpoint.animCheck4",
                "Artwork.Foreground.Checkpoint.animCheck3",
                "Artwork.Foreground.Checkpoint.animCheck2",
                "Artwork.Foreground.Checkpoint.animCheck1",
                "Artwork.Foreground.Checkpoint.UncheckedCheckpoint",
                "Artwork.Foreground.Checkpoint.animCheck5",
                "Artwork.Foreground.Checkpoint.animCheck6",
                "Artwork.Foreground.Checkpoint.CheckedCheckpoint",
            };

            drawComp.addAnimatedSprite(animImg, animImgDefaults, animImageName);

            /* ANIMATION COMPONENT - Does it need animating?
             */
            AnimationComponent animComp = (AnimationComponent)addComponent(new AnimationComponent(0.001f), true);

            animComp.animationOn = false;
            animComp.pauseIndefinitelyAfterCycle = true;

            /*COLLIDER - Does it hit things?
             * The second field is the collider type. Look in GlobalVars for a string with the right name.
             */
            addComponent(new ColliderComponent(this, GlobalVars.CHECKPOINT_COLLIDER_TYPE), true);

            /*CHECKPOINT - It's a checkpoint
             */
            addComponent(new CheckPointComponent(uncheckedImageName, checkedImageName, animImageName, this), true);
        }