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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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();
        }
Exemple #4
0
        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();
        }
Exemple #5
0
 public King(TextureHandler t, HumptyDumpty h)
 {
     humptyDumpty   = h;
     textureHandler = t;
     Initialize();
 }
 public HumptyDumpty(TextureHandler textureHandler)
 {
     this.textureHandler = textureHandler;
     Initialize();
 }
Exemple #7
0
 public King(TextureHandler t, HumptyDumpty h)
 {
     humptyDumpty = h;
     textureHandler = t;
     Initialize();
 }
Exemple #8
0
 public HumptyDumpty(TextureHandler textureHandler)
 {
     this.textureHandler = textureHandler;
     Initialize();
 }