public PlayerManager( Texture2D texture, Rectangle initialFrame, int frameCount, Rectangle screenBounds, Stream fileStream) { playerSprite = new Sprite( new Vector2(370, 200), texture, initialFrame, Vector2.Zero); PlayerShotManager = new ShotManager( texture, new Rectangle(0, 300, 5, 5), 4, 2, 350f, screenBounds); 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; /*this.playerSpeed = playerinfo.playerSpeed; * this.playerShotSpeed = playerinfo.playershotSpeed; * this.Lives = playerinfo.playerLives;*/ }
public PlayerManager( Texture2D texture, Rectangle initialFrame, int frameCount, Rectangle screenBounds, Stream fileStream) { playerSprite = new Sprite( new Vector2 (370, 200), texture, initialFrame, Vector2.Zero); PlayerShotManager = new ShotManager( texture, new Rectangle(0, 300, 5, 5), 4, 2,350f, screenBounds); 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; /*this.playerSpeed = playerinfo.playerSpeed; this.playerShotSpeed = playerinfo.playershotSpeed; this.Lives = playerinfo.playerLives;*/ }
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, enemyShotSpeed, screenBounds); setUpWaypoints(); }