Пример #1
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);
        }
Пример #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);
        }
Пример #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();
        }
Пример #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();
        }
Пример #5
0
 public King(TextureHandler t, HumptyDumpty h)
 {
     humptyDumpty   = h;
     textureHandler = t;
     Initialize();
 }
Пример #6
0
 public HumptyDumpty(TextureHandler textureHandler)
 {
     this.textureHandler = textureHandler;
     Initialize();
 }
Пример #7
0
 public King(TextureHandler t, HumptyDumpty h)
 {
     humptyDumpty = h;
     textureHandler = t;
     Initialize();
 }
Пример #8
0
 public HumptyDumpty(TextureHandler textureHandler)
 {
     this.textureHandler = textureHandler;
     Initialize();
 }