コード例 #1
0
        public Player(ContentManager cm, SpriteBatch sb, GraphicsDeviceManager gdm)
        {
            //configures the image sheet associated with the player
            playerImageSheet = new AnimatedImage(cm, sb, gdm.GraphicsDevice, "PlayerImages/PlayerPlaceholderRefined", new Vector2(1372, 469), new Vector2(18, 5));
            playerImageSheet.frameTimeLimit = 8;
            playerImageSheet.Initialize();
            playerImageSheet.setFrameConfiguration(0, 0, 1);
            //playerImageSheet.isAnimating = false;

            boundingRectangleColor = cm.Load<Texture2D>("CollisionColor");

            //sets the references to the spritebatch and content manager so this class can define items in the content pipeline and draw to the same area
            sbReference = sb;
            cmReference = cm;
            gdmReference = gdm;

            //environment variables
            previousWorldPosition = Vector2.Zero;
            currentWorldPosition = Vector2.Zero;
            velocity = new Vector2(8, 25);
            momentum = new Vector2(0,0);

            movingLeft = false;
            movingRight = false;
            movingUp = false;
            movingDown = false;

            standing = true;

            isJumping = false;
            isFalling = false;
            isFallingFromGravity = false;
            isDashing = false;
            exhaustedDash = false;

            jumpTimer = 0;
            jumpTimerMax = 20;

            dashTimer = 0;
            dashTimerMax = 10;

            currentActionHurdleReference = null;
            actionButtonBeingPressed = false;
            actionStateIsActive = false;
            hurdleActionStateActive = false;
            upTheHurdle = false;
            overTheHurdle = false;
            hurdleTimer = 0;
            hurdleTimerMax = 10;
            hurdleDistance = Vector2.Zero;

            facingLeft = false;
            facingRight = true;

            playerCollisionOccurred = false;
            collisionOnPlayerLeft = false;
            collisionOnPlayerRight = false;
            collisionOnPlayerTop = false;
            collisionOnPlayerBottom = false;
        }
コード例 #2
0
        public SlopedPlatform(ContentManager cm, GraphicsDeviceManager gdm, SpriteBatch sb, ImageLibrary il, Vector2 startSlopePos, Vector2 endSlopePos, int platBodyHeight, float lDepth, bool slidable, bool cOnLeftSide, bool cOnRightSide, bool cOnBottom)
        {
            cmReference  = cm;
            gdmReference = gdm;
            imageLibrary = il;
            sbReference  = sb;

            platformSlope = new Line(startSlopePos, endSlopePos);
            slopeTexture  = il.smwOutsideGrass;
            //platformSlope = new Line(new Vector2(0, 1000), new Vector2(200, 800));

            if (platformSlope.pt1.Y < platformSlope.pt2.Y)
            {
                boundingPlatform = new Platform(cmReference, sbReference, gdmReference, imageLibrary, new Vector2(((platformSlope.pt2.Y - platformSlope.pt1.Y) / 16), (platformSlope.getBoundingRectangle.Height / 16)), new Vector2(platformSlope.getBoundingRectangle.Left, platformSlope.getBoundingRectangle.Top), slidable, true, true, false, false, true);
            }
            else
            {
                boundingPlatform = new Platform(cmReference, sbReference, gdmReference, imageLibrary, new Vector2(((platformSlope.pt1.Y - platformSlope.pt2.Y) / 16), (platformSlope.getBoundingRectangle.Height / 16)), new Vector2(platformSlope.getBoundingRectangle.Left, platformSlope.getBoundingRectangle.Top), slidable, true, false, true, false, true);
            }

            layerDepth = lDepth;

            platformBodyHeight = platBodyHeight * 16;

            collidableOnLeftSide  = cOnLeftSide;
            collidableOnRightSide = cOnRightSide;
            collidableOnBottom    = cOnBottom;
        }
コード例 #3
0
 public Images(ContentManager cm, SpriteBatch sb, GraphicsDeviceManager gdm)
 {
     cmReference  = cm;
     gdmReference = gdm;
     sbReference  = sb;
     basicTileSet = new AnimatedImage(cmReference, sb, gdm.GraphicsDevice, "TileMapImages/BasicTileSet", new Vector2(80, 16), new Vector2(5, 1));
 }
コード例 #4
0
        public Hurdle(ContentManager cm, GraphicsDeviceManager gdm, SpriteBatch sb)
        {
            cmReference  = cm;
            gdmReference = gdm;
            sbReference  = sb;

            imageSheet = new AnimatedImage(cm, sb, gdmReference.GraphicsDevice, "TestHurdle", new Vector2(64, 80), new Vector2(1, 1));
        }
コード例 #5
0
        public ContainerPlatform(ContentManager cm, SpriteBatch sb, GraphicsDeviceManager gdm, ImageLibrary il, Vector2 platSize, Vector2 pos, bool slidableOnL, bool slidableOnR, bool cOnLeft, bool cOnRight, bool cOnTop, bool cOnBottom)
            : base(cm, sb, gdm, il, platSize, pos, slidableOnL, slidableOnR, cOnLeft, cOnRight, cOnTop, cOnBottom)
        {
            //Outside image
            completeOutsidePlatformImage = il.smwOutsideGrass;
            completeInsideImage          = il.completeInsideGrassPlatform;

            playerIsContained = true;
        }
コード例 #6
0
        public Hurdle(ContentManager cm, GraphicsDeviceManager gdm, SpriteBatch sb, Vector2 worldPos)
        {
            cmReference  = cm;
            gdmReference = gdm;
            sbReference  = sb;

            worldPosition = worldPos;
            imageSheet    = new AnimatedImage(cm, sb, gdmReference.GraphicsDevice, "GameObjects/Hurdles/Hurdle", new Vector2(28, 61), new Vector2(1, 1));
            layerDepth    = .5f;
        }
コード例 #7
0
        public SpikedPlatform(ContentManager cm, SpriteBatch sb, GraphicsDeviceManager gdm, ImageLibrary il, Vector2 platSize, Vector2 pos, bool slidableOnL, bool slidableOnR, bool spOnLeft, bool spOnRight, bool spOnTop, bool spOnBottom, bool cOnLeft, bool cOnRight, bool cOnTop, bool cOnBottom)
            : base(cm, sb, gdm, il, platSize, pos, slidableOnL, slidableOnR, cOnLeft, cOnRight, cOnTop, cOnBottom)
        {
            spikedOnLeft   = spOnLeft;
            spikedOnRight  = spOnRight;
            spikedOnTop    = spOnTop;
            spikedOnBottom = spOnBottom;

            completeOutsidePlatformImage = il.smwOutsideGrass;
            spikedPlatformImage          = il.spikePlatform;
        }
コード例 #8
0
        public MomentumActionButton(ContentManager cm, GraphicsDeviceManager gdm, SpriteBatch sb, Vector2 momentumTransferred)
        {
            cmReference  = cm;
            gdmReference = gdm;
            sbReference  = sb;

            momentumToImpart = momentumTransferred;

            imageSheet = new AnimatedImage(cm, sb, gdmReference.GraphicsDevice, "ActionButton", new Vector2(30, 30), new Vector2(1, 1));

            worldPosition = Vector2.Zero;
        }
コード例 #9
0
        public BaseTile(ContentManager cm, GraphicsDeviceManager gdm, SpriteBatch sb, Vector2 pos, AnimatedImage imageName) : base(pos)
        {
            cmReference  = cm;
            gdmReference = gdm;
            sbReference  = sb;

            baseTileImage          = imageName;
            baseTileImage.position = pos;
            baseTileImage.setFrameConfiguration(0, 0, 0);

            isCollidable = false;
        }
コード例 #10
0
        //----------------------------------------------------------------------------------------------------------------------------------------------------------
        public WaterPlatform(ContentManager cm, SpriteBatch sb, GraphicsDeviceManager gdm, ImageLibrary il, Vector2 platSize, Vector2 pos, bool slidableOnL, bool slidableOnR, bool cOnLeft, bool cOnRight, bool cOnTop, bool cOnBottom)
            : base(cm, sb, gdm, il, platSize, pos, slidableOnL, slidableOnR, cOnLeft, cOnRight, cOnTop, cOnBottom)
        {
            topWater = il.waterCrestTile;
            topWater.setFrameConfiguration(0, 0, 1);
            topWater.frameTimeLimit = 15;

            completeOutsidePlatformImage = il.waterBodyTile;

            layerDepth = .25f;

            flipTopWaterCrest = false;
        }
コード例 #11
0
        //-----------------------------------------------------

        public CharacterSelectScreen(ContentManager cManager, GraphicsDeviceManager gdmReference, SpriteBatch sbReference, ImageLibrary iLibrary, GameMode gMode)
            : base(cManager, gdmReference, sbReference)
        {
            gameFont     = cManager.Load <SpriteFont>("Fonts/PlaceholderFont");
            imageLibrary = iLibrary;

            playerOne   = null;
            playerTwo   = null;
            playerThree = null;
            playerFour  = null;

            gameMode = gMode;
            if (gameMode == GameMode.SinglePlayer)
            {
                maxPlayersAllowed = 1;
            }
            else if (gameMode == GameMode.CoopPlayOnline || gameMode == GameMode.CoopPlayOffline)
            {
                maxPlayersAllowed = 2;
            }
            else if (gameMode == GameMode.CompetitivePlayOnline || gameMode == GameMode.CompetitivePlayOffline)
            {
                maxPlayersAllowed = 4;
            }

            //players joined tracker, and the boolean that lets us know when it's time to go back
            currentPlayersJoined = 0;
            goBackToTitleScreen  = false;

            //delay time
            selectionDelayTimer = 0;
            selectionDelayMax   = 15;

            redTile    = imageLibrary.basicRedTile;
            orangeTile = imageLibrary.basicOrangeTile;
            yellowTile = imageLibrary.basicYellowTile;
            greenTile  = imageLibrary.basicGreenTile;

            //sets the expected rectangle that's supposed to represent the underlay
            characterOneUnderlay   = new Rectangle(0, 200, 560, 192);
            characterTwoUnderlay   = new Rectangle(gdmReference.GraphicsDevice.Viewport.Width - 560, 200, 560, 192);
            characterThreeUnderlay = new Rectangle(0, 450, 560, 192);
            characterFourUnderlay  = new Rectangle(gdmReference.GraphicsDevice.Viewport.Width - 560, 450, 560, 192);

            //will be deprecated but will be initialized as such
            playerTwoSelector   = new CharacterSelector(cmReference, gdmReference, sbReference, imageLibrary, new Vector2(characterTwoUnderlay.X, characterTwoUnderlay.Y), 1, 0);
            playerThreeSelector = new CharacterSelector(cmReference, gdmReference, sbReference, imageLibrary, new Vector2(characterThreeUnderlay.X, characterThreeUnderlay.Y), 0, 1);
            playerFourSelector  = new CharacterSelector(cmReference, gdmReference, sbReference, imageLibrary, new Vector2(characterFourUnderlay.X, characterFourUnderlay.Y), 1, 1);
        }
コード例 #12
0
        public BaseTile(ContentManager cm, GraphicsDeviceManager gdm, SpriteBatch sb, Vector2 pos, Vector2 sourceImageSize, Vector2 sourceImageColumnAndRowSize, String imageName, bool cOnLeft, bool cOnRight, bool cOnTop, bool cOnBottom) : base(pos)
        {
            cmReference  = cm;
            gdmReference = gdm;
            sbReference  = sb;

            baseTileImage          = new AnimatedImage(cmReference, sbReference, gdmReference.GraphicsDevice, imageName, sourceImageSize, sourceImageColumnAndRowSize);
            baseTileImage.position = pos;
            baseTileImage.setFrameConfiguration(0, 0, 0);

            isCollidable       = false;
            collidableOnLeft   = cOnLeft;
            collidableOnRight  = cOnRight;
            collidableOnTop    = cOnTop;
            collidableOnBottom = cOnBottom;
        }
コード例 #13
0
        //----------------------------------------------------------------------------------------------------------------------------------------------------------
        public Platform(ContentManager cm, SpriteBatch sb, GraphicsDeviceManager gdm, ImageLibrary il, Vector2 platSize, Vector2 pos, bool slidableOnL, bool slidableOnR, bool cOnLeft, bool cOnRight, bool cOnTop, bool cOnBottom)
        {
            //sets the references to the spritebatch and content manager so this class can define items in the content pipeline and draw to the same area
            imageLibrary = il;
            sbReference  = sb;
            cmReference  = cm;
            gdmReference = gdm;

            /*
             * topLeftImage = il.topLeftGrassPlatform;
             * topImage = il.topGrassPlatform;
             * topRightImage = il.topRightGrassPlatform;
             *
             * leftImage = il.leftGrassPlatform;
             * centerImage = il.centerGrassPlatform;
             * rightImage = il.rightGrassPlatform;
             *
             * bottomLeftImage = il.bottomLeftGrassPlatform;
             * bottomImage = il.bottomGrassPlatform;
             * bottomRightImage = il.bottomRightGrassPlatform;
             */
            completeOutsidePlatformImage             = il.smwOutsideGrass;
            completeOutsidePlatformImage.isAnimating = false;

            movingLeft  = false;
            movingRight = false;
            movingUp    = false;
            movingDown  = false;

            collidableOnLeft   = cOnLeft;
            collidableOnRight  = cOnRight;
            collidableOnTop    = cOnTop;
            collidableOnBottom = cOnBottom;

            canSlideOnLeft  = slidableOnL;
            canSlideOnRight = slidableOnR;

            //equivilant of the player class is the boolean "standing", basically default state
            notMoving = true;

            platformSize = platSize;
            position     = pos;

            layerDepth = .70f;
        }
コード例 #14
0
        public Spring(ContentManager cm, GraphicsDeviceManager gdm, SpriteBatch sb, ImageLibrary il, Vector2 worldPos, Vector2 momentumToImpart, float springRotation)
        {
            cmReference  = cm;
            gdmReference = gdm;
            sbReference  = sb;

            //probably going to have to have each spring load its own separate texture because this will make it do weird drawing for multiple springs
            imageSheet = new AnimatedImage(cm, sb, gdm.GraphicsDevice, "GameObjects/Springs/SonicSpring", new Vector2(190, 38), new Vector2(5, 1));
            imageSheet.setFrameConfiguration(0, 0, 3);
            imageSheet.frameTimeLimit = 1;
            imageSheet.isAnimating    = false;

            layerDepth = .5f;
            rotation   = springRotation;

            worldPosition    = worldPos;
            momentumImparted = momentumToImpart;
        }
コード例 #15
0
        public BearTrap(ContentManager cm, GraphicsDeviceManager gdm, SpriteBatch sb, Vector2 worldPos)
        {
            cmReference  = cm;
            gdmReference = gdm;
            sbReference  = sb;

            bearTrapImage                = new AnimatedImage(cmReference, sbReference, gdmReference.GraphicsDevice, "GameObjects/Traps/BearTrapPlaceholder", new Vector2(120, 20), new Vector2(3, 1));
            bearTrapImage.isAnimating    = false;
            bearTrapImage.animateOnce    = false;
            bearTrapImage.frameTimeLimit = 4;
            bearTrapImage.setFrameConfiguration(0, 0, 2);

            worldPosition = worldPos;

            layerDepth = .5f;

            wasActivated = false;
        }
コード例 #16
0
        //----------------------------------------------------------------------------------------------------------------------------------------------------------
        public TiledPlatform(ContentManager cm, SpriteBatch sb, GraphicsDeviceManager gdm, Vector2 platSize, Vector2 pos, bool cOnLeft, bool cOnRight, bool cOnTop, bool cOnBottom)
        {
            //configures the image sheet associated with the playerOne
            imageSheet = new AnimatedImage(cm, sb, gdm.GraphicsDevice, "PlatformTextures/Square", new Vector2(16, 16), new Vector2(1, 1));
            imageSheet.frameTimeLimit = 8;
            imageSheet.setFrameConfiguration(0, 0, 0);
            //imageSheet.isAnimating = false;

            //sets the references to the spritebatch and content manager so this class can define items in the content pipeline and draw to the same area
            sbReference  = sb;
            cmReference  = cm;
            gdmReference = gdm;

            //environment variables
            position     = Vector2.Zero;
            platformSize = new Vector2(1, 1);

            //will multiply the playerOne's velocity by the corresponding vectors
            terrainModifier = new Vector2(1.0f, 1.0f);

            movingLeft  = false;
            movingRight = false;
            movingUp    = false;
            movingDown  = false;

            collidableOnLeft   = cOnLeft;
            collidableOnRight  = cOnRight;
            collidableOnTop    = cOnTop;
            collidableOnBottom = cOnBottom;

            //equivilant of the playerOne class is the boolean "standing", basically default state
            notMoving = true;

            //Pretty sure I won't need these and they'll be deprecated for the platform
            facingLeft  = false;
            facingRight = true;

            platformSize = platSize;
            position     = pos;
        }
コード例 #17
0
        public Treasure(ContentManager cm, GraphicsDeviceManager gdm, SpriteBatch sb, ImageLibrary il, Vector2 startCenterPos, float treasureRotation)
        {
            cmReference  = cm;
            gdmReference = gdm;
            sbReference  = sb;

            //probably going to have to have each spring load its own separate texture because this will make it do weird drawing for multiple springs
            imageSheet = il.goldJewelImage;
            imageSheet.setFrameConfiguration(0, 0, 4);
            imageSheet.isAnimating = false;

            layerDepth = .5f;
            rotation   = treasureRotation;

            centerPosition      = startCenterPos;
            startCenterPosition = startCenterPos;

            animatingUp   = false;
            animatingDown = true;

            floatIncrementTimer    = 0;
            floatIncrementTimerMax = 3;
        }
コード例 #18
0
        public GrindRail(ContentManager cm, GraphicsDeviceManager gdm, SpriteBatch sb, ImageLibrary il, Vector2 startSlopePos, Vector2 endSlopePos, int platBodyHeight, float lDepth)
        {
            cmReference  = cm;
            gdmReference = gdm;
            imageLibrary = il;
            sbReference  = sb;

            platformSlope = new Line(startSlopePos, endSlopePos);
            slopeTexture  = il.testRail;
            //platformSlope = new Line(new Vector2(0, 1000), new Vector2(200, 800));

            if (platformSlope.pt1.Y < platformSlope.pt2.Y)
            {
                boundingPlatform = new Platform(cmReference, sbReference, gdmReference, imageLibrary, new Vector2(((platformSlope.pt2.Y - platformSlope.pt1.Y) / 16), (platformSlope.getBoundingRectangle.Height / 16)), new Vector2(platformSlope.getBoundingRectangle.Left, platformSlope.getBoundingRectangle.Top), true, true, true, false, false, true);
            }
            else
            {
                boundingPlatform = new Platform(cmReference, sbReference, gdmReference, imageLibrary, new Vector2(((platformSlope.pt1.Y - platformSlope.pt2.Y) / 16), (platformSlope.getBoundingRectangle.Height / 16)), new Vector2(platformSlope.getBoundingRectangle.Left, platformSlope.getBoundingRectangle.Top), true, true, false, true, false, true);
            }

            layerDepth = lDepth;

            platformBodyHeight = platBodyHeight * 16;
        }
コード例 #19
0
        public ImageLibrary(ContentManager cm, SpriteBatch sb, GraphicsDeviceManager gdm)
        {
            cmReference  = cm;
            gdmReference = gdm;
            sbReference  = sb;
            basicTileSet = new AnimatedImage(cmReference, sb, gdm.GraphicsDevice, "TileMapImages/AltBasicTileSet", new Vector2(80, 16), new Vector2(5, 1));

            basicRedTile    = new AnimatedImage(cmReference, sb, gdm.GraphicsDevice, "TileMapImages/basicRedTile", new Vector2(80, 16), new Vector2(5, 1));
            basicOrangeTile = new AnimatedImage(cmReference, sb, gdm.GraphicsDevice, "TileMapImages/basicOrangeTile", new Vector2(80, 16), new Vector2(5, 1));
            basicYellowTile = new AnimatedImage(cmReference, sb, gdm.GraphicsDevice, "TileMapImages/basicYellowTile", new Vector2(80, 16), new Vector2(5, 1));
            basicGreenTile  = new AnimatedImage(cmReference, sb, gdm.GraphicsDevice, "TileMapImages/basicGreenTile", new Vector2(80, 16), new Vector2(5, 1));
            basicBlueTile   = new AnimatedImage(cmReference, sb, gdm.GraphicsDevice, "TileMapImages/basicBlueTile", new Vector2(80, 16), new Vector2(5, 1));

            //-------------- Character Select Screen Images -----------------
            characterSelector = cmReference.Load <Texture2D>("CharacterSelectScreen/CharacterSelector");
            //---------------------------------------------------------------

            //Water Platform
            waterCrestTile = new AnimatedImage(cmReference, sbReference, gdm.GraphicsDevice, "WaterTiles/WaterCrest", new Vector2(32, 16), new Vector2(2, 1));

            resisitantWaterCrestTile = new AnimatedImage(cmReference, sbReference, gdm.GraphicsDevice, "WaterTiles/ResistantCrest", new Vector2(32, 16), new Vector2(2, 1));

            waterBodyTile = new AnimatedImage(cmReference, sbReference, gdm.GraphicsDevice, "WaterTiles/WaterBody", new Vector2(16, 16), new Vector2(1, 1));
            //--------------------------

            //Grass Platform
            smwOutsideGrass = new AnimatedImage(cmReference, sbReference, gdm.GraphicsDevice, "PlatformTextures/GrassPlatform/SMWOutsideGrass", new Vector2(48, 48), new Vector2(3, 3));

            completeOutsideGrassPlatform = new AnimatedImage(cmReference, sbReference, gdm.GraphicsDevice, "PlatformTextures/GrassPlatform/OutsideGrass/CompleteOutsideGrass", new Vector2(48, 48), new Vector2(3, 3));
            completeInsideGrassPlatform  = new AnimatedImage(cmReference, sbReference, gdm.GraphicsDevice, "PlatformTextures/GrassPlatform/InsideGrass/CompleteInsideGrass", new Vector2(48, 48), new Vector2(3, 3));

            goalTile = new AnimatedImage(cmReference, sbReference, gdm.GraphicsDevice, "PlatformTextures/GoalPlatform/GoalTile", new Vector2(16, 16), new Vector2(1, 1));

            spikePlatform = new AnimatedImage(cmReference, sbReference, gdmReference.GraphicsDevice, "PlatformTextures/SpikePlatform/SpikePlatform", new Vector2(48, 48), new Vector2(3, 3));
            //--------------------------

            testPlatformTile = new AnimatedImage(cm, sbReference, gdm.GraphicsDevice, "PlatformTextures/Square", new Vector2(16, 16), new Vector2(1, 1));

            //Parallax
            parallaxClouds     = cmReference.Load <Texture2D>("ParallaxImages/Clouds");
            treeTopTest        = cmReference.Load <Texture2D>("ParallaxImages/TreetopTest");
            treeTrunkTest      = cmReference.Load <Texture2D>("ParallaxImages/TreeTrunkPixel");
            treeTrunkDarkTest  = cmReference.Load <Texture2D>("ParallaxImages/TreeTrunkDarkPixel");
            testParallax       = cmReference.Load <Texture2D>("ParallaxImages/TestParallax");
            testParallaxBottom = cmReference.Load <Texture2D>("ParallaxImages/TestParallaxBottom");

            newSMWCloudSingle = cmReference.Load <Texture2D>("ParallaxImages/SingleCloud");;
            newSMWCloudSmall  = cmReference.Load <Texture2D>("ParallaxImages/DoubleCloudStripSmall");;
            newSMWCloudMedium = cmReference.Load <Texture2D>("ParallaxImages/DoubleCloudStripMedium");;
            //-------------------------

            //player
            characterOneSpriteSheet = new AnimatedImage(cm, sbReference, gdm.GraphicsDevice, "PlayerImages/CharacterOnePlaceholderRefined", new Vector2(1372, 563), new Vector2(18, 6));
            characterTwoSpriteSheet = new AnimatedImage(cm, sbReference, gdm.GraphicsDevice, "PlayerImages/CharacterTwoPlaceholderRefined", new Vector2(1372, 563), new Vector2(18, 6));
            //--------------------------

            //Objects
            TestLadderLeft  = cmReference.Load <Texture2D>("GameObjects/Ladders/TestLadder/TestLadderLeft");
            TestLadderRight = cmReference.Load <Texture2D>("GameObjects/Ladders/TestLadder/TestLadderRight");
            TestLadderRung  = cmReference.Load <Texture2D>("GameObjects/Ladders/TestLadder/TestLadderRung");

            sonicSpringImage = new AnimatedImage(cm, sb, gdm.GraphicsDevice, "GameObjects/Springs/SonicSpring", new Vector2(190, 38), new Vector2(5, 1));
            sonicSpringImage.frameTimeLimit = 5;

            testBridgeTexture = cmReference.Load <Texture2D>("GameObjects/Bridges/BridgeTexture");

            //rails
            testRail = new AnimatedImage(cm, sb, gdm.GraphicsDevice, "GameObjects/Railings/TestRailing", new Vector2(48, 48), new Vector2(3, 3));

            //tight ropes
            testTightRope = new AnimatedImage(cm, sb, gdm.GraphicsDevice, "GameObjects/TightRopes/TestTightRope", new Vector2(48, 48), new Vector2(3, 3));
            //--------------------------

            //Treasure
            redJewelImage   = new AnimatedImage(cm, sb, gdm.GraphicsDevice, "Treasure/TestTreasure/RedJewel", new Vector2(17, 24), new Vector2(1, 1));;
            greenJewelImage = new AnimatedImage(cm, sb, gdm.GraphicsDevice, "Treasure/TestTreasure/GreenJewel", new Vector2(27, 22), new Vector2(1, 1));;
            blueJewelImage  = new AnimatedImage(cm, sb, gdm.GraphicsDevice, "Treasure/TestTreasure/BlueJewel", new Vector2(16, 20), new Vector2(1, 1));;
            goldJewelImage  = new AnimatedImage(cm, sb, gdm.GraphicsDevice, "Treasure/TestTreasure/GoldPearl", new Vector2(17, 17), new Vector2(1, 1));;
            //--------------------------
        }
コード例 #20
0
 public BackgroundTile(ContentManager cm, GraphicsDeviceManager gdm, SpriteBatch sb, Vector2 pos, Vector2 sourceImageSize, Vector2 sourceImageColumnAndRowSize, AnimatedImage imageName, bool cOnLeft, bool cOnRight, bool cOnTop, bool cOnBottom) : base(cm, gdm, sb, pos, sourceImageSize, sourceImageColumnAndRowSize, imageName, cOnLeft, cOnRight, cOnTop, cOnBottom)
 {
 }
コード例 #21
0
 public BackgroundTile(ContentManager cm, GraphicsDeviceManager gdm, SpriteBatch sb, Vector2 pos, AnimatedImage imageName) : base(cm, gdm, sb, pos, imageName)
 {
 }