public Projectile(TextureHandler t, HumptyDumpty humptyDumpty) { setDestination(humptyDumpty.Position); hitbox = new Rectangle((int)position.X, (int)position.Y, 10, 10); trajectory = new Rectangle((int)position.X, (int)position.Y, 2, 100); this.humptyDumpty = humptyDumpty; Random r = new Random(); projectileType = (ProjectileType)r.Next(7); texture = t.getProjectile(projectileType); }
protected override void Initialize() { /* * graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft; * graphics.PreferredBackBufferHeight = 480; * graphics.PreferredBackBufferWidth = 800; * graphics.ApplyChanges(); */ textureHandler = new TextureHandler(GraphicsDevice); gameScreen = new GameScreen(this, textureHandler); pauseScreen = new PauseScreen(this, textureHandler); loadScreen = new LoadScreen(this, textureHandler); gameOverScreen = new GameOverScreen(this, textureHandler); mainMenuScreen = new MainMenuScreen(this, textureHandler); aboutScreen = new AboutScreen(this, textureHandler); tutorialScreen = new TutorialScreen(this, textureHandler); currentScreen = loadScreen; initializeAccelerometer(); base.Initialize(); }
protected override void Initialize() { /* graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft; graphics.PreferredBackBufferHeight = 480; graphics.PreferredBackBufferWidth = 800; graphics.ApplyChanges(); */ textureHandler = new TextureHandler(GraphicsDevice); gameScreen = new GameScreen(this, textureHandler); pauseScreen = new PauseScreen(this, textureHandler); loadScreen = new LoadScreen(this, textureHandler); gameOverScreen = new GameOverScreen(this, textureHandler); mainMenuScreen = new MainMenuScreen(this, textureHandler); aboutScreen = new AboutScreen(this, textureHandler); tutorialScreen = new TutorialScreen(this, textureHandler); currentScreen = loadScreen; initializeAccelerometer(); base.Initialize(); }
public King(TextureHandler t, HumptyDumpty h) { humptyDumpty = h; textureHandler = t; Initialize(); }
public HumptyDumpty(TextureHandler textureHandler) { this.textureHandler = textureHandler; Initialize(); }