//Constructor 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(); }
// Consructor 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, screenBounds.Height / 2, screenBounds.Width, screenBounds.Height / 2); for (int x = 1; x < frameCount; x++) { playerSprite.AddFrame(new Rectangle(initialFrame.X + (initialFrame.Width * 2), initialFrame.Y, initialFrame.Width, initialFrame.Height)); } playerSprite.CollisionRadius = playerRadius; }