public PlayerManager( Texture2D texture, Rectangle initialFrame, int frameCount, Rectangle screenBounds) { playerSprite = new Sprite( new Vector2(500, 500), texture, initialFrame, Vector2.Zero); PlayerShotManager = new ShotManager( texture, new Rectangle(0, 300, 5, 5), 4, 2, 250f, screenBounds); playerAreaLimit = new Rectangle(0, 480, 800, 0); for (int x = 1; x < frameCount; x++) { playerSprite.AddFrame( new Rectangle( initialFrame.X + (initialFrame.Width * x), initialFrame.Y, initialFrame.Width, initialFrame.Height)); } playerSprite.CollisionRadius = playerRadius; }
public BossManager( Texture2D texture, Rectangle initialFrame, int frameCount, PlayerManager playerManager, Rectangle screenBounds) { this.texture = texture; this.initialFrame = initialFrame; this.frameCount = frameCount; this.playerManager = playerManager; EnemyShotManager = new ShotManager( texture, new Rectangle(0, 300, 5, 5), 4, 2, 150f, screenBounds); boss = new Sprite(new Vector2(screenBounds.Width / 2 - 367 / 2, 5), texture, new Rectangle(633, 274, 367, 226), new Vector2(0, 0)); setUpWaypoints(); }
public PlayerManager( Texture2D texture, Rectangle initialFrame, int frameCount, Rectangle screenBounds) { playerSprite = new Sprite( new Vector2(500, 500), texture, initialFrame, Vector2.Zero); PlayerShotManager = new ShotManager( texture, new Rectangle(0, 300, 5, 5), 4, 2, 250f, screenBounds); playerAreaLimit = new Rectangle(0, 480, 800, 0); for (int x = 1; x < frameCount; x++) { playerSprite.AddFrame( new Rectangle( initialFrame.X + (initialFrame.Width * x), initialFrame.Y, initialFrame.Width, initialFrame.Height)); } playerSprite.CollisionRadius = playerRadius; }
public EnemyManager(Texture2D texture, Rectangle initialFrame, int frameCount, PlayerManager playerManager, Rectangle screenBounds) { this.texture = texture; this.initialFrame = initialFrame; this.frameCount = frameCount; this.playerManager = playerManager; EnemyShotManager = new ShotManager(texture, new Rectangle(0, 300, 5, 5), 4, 2, 150f, screenBounds); setUpWaypoints(); }
public EnemyManager(Texture2D texture,Rectangle initialFrame,int frameCount, PlayerManager playerManager,Rectangle screenBounds) { this.texture = texture; this.initialFrame = initialFrame; this.frameCount = frameCount; this.playerManager = playerManager; EnemyShotManager = new ShotManager(texture,new Rectangle(0, 300, 5, 5),4,2,150f,screenBounds); setUpWaypoints(); }
public PlayerManager( Texture2D texture, Rectangle initialFrame, int frameCount, Rectangle screenBounds) { playerSprite = new Sprite( new Vector2(500, 500), texture, initialFrame, Vector2.Zero); Sheild = new Sprite(new Vector2(740, 100), texture, new Rectangle(0, 399, 42, 45), Vector2.Zero); Sheildbar = new Sprite(new Vector2(762, 155), texture, new Rectangle(45, 400, 2, 46), Vector2.Zero); SheildPowerUP = new Sprite(new Vector2(0, 0), texture, new Rectangle(0, 399, 42, 45), Vector2.Zero); SheildPowerUP.isVisible = false; PlayerShotManager = new ShotManager( texture, new Rectangle(0, 300, 5, 5), 4, 2, 250f, screenBounds); playerAreaLimit = new Rectangle( 0, screenBounds.Height / 2, screenBounds.Width, screenBounds.Height / 2); for (int x = 1; x < frameCount; x++) { playerSprite.AddFrame( new Rectangle( initialFrame.X + (initialFrame.Width * x), initialFrame.Y, initialFrame.Width, initialFrame.Height)); } playerSprite.CollisionRadius = playerRadius; }
public PlayerManager( Texture2D texture, Rectangle initialFrame, int frameCount, Rectangle screenBounds) { playerSprite = new Sprite( new Vector2(400, 500), //SPAWN LOCATION. X/Y value aren't perfect. texture, initialFrame, Vector2.Zero); PlayerShotManager = new ShotManager( texture, new Rectangle(0, 300, 5, 5), 4, 2, 250f, screenBounds); playerAreaLimit = new Rectangle( 0, screenBounds.Height / 2, screenBounds.Width, screenBounds.Height / 2); for (int x = 1; x < frameCount; x++) { playerSprite.AddFrame( new Rectangle( initialFrame.X + (initialFrame.Width * x), initialFrame.Y, initialFrame.Width, initialFrame.Height)); } playerSprite.CollisionRadius = playerRadius; }
public PlayerManager( Texture2D texture, Rectangle initialFrame, int frameCount, Rectangle screenBounds) { playerSpriteDown = new Sprite( new Vector2(500, 500), texture, initialFrame, Vector2.Zero); playerSpriteLeft = new Sprite( new Vector2(500, 500), texture, new Rectangle(1, 128, 63, 125), Vector2.Zero); playerSpriteUp = new Sprite( new Vector2(500, 500), texture, new Rectangle(1, 254, 63, 125), Vector2.Zero); playerSpriteRight = new Sprite( new Vector2(500, 500), texture, new Rectangle(1, 380, 63, 125), Vector2.Zero); playerDirection = playerSpriteDown; PlayerShotManager = new ShotManager( texture, new Rectangle(0, 300, 5, 5), 4, 2, 250f, screenBounds); playerAreaLimit = new Rectangle( 0, 0, screenBounds.Width, screenBounds.Height); for (int x = 1; x < frameCount; x++) { playerSpriteDown.AddFrame( new Rectangle( initialFrame.X + (initialFrame.Width * x), initialFrame.Y, initialFrame.Width, initialFrame.Height)); } for (int x = 1; x < frameCount; x++) { playerSpriteLeft.AddFrame( new Rectangle( 1 + (63 * x), 128, 63, 127)); } for (int x = 1; x < frameCount; x++) { playerSpriteUp.AddFrame( new Rectangle( 1 + (63 * x), 254, 63, 125)); } for (int x = 1; x < frameCount; x++) { playerSpriteRight.AddFrame( new Rectangle( 1 + (63 * x), 380, 63, 127)); } playerSpriteDown.CollisionRadius = playerRadius; playerSpriteLeft.CollisionRadius = playerRadius; playerSpriteUp.CollisionRadius = playerRadius; playerSpriteRight.CollisionRadius = playerRadius; }