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); 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++) { playerSprite.AddFrame( new Rectangle( initialFrame.X + (initialFrame.Width * x), initialFrame.Y, initialFrame.Width, initialFrame.Height)); } playerSprite.CollisionRadius = playerRadius; }