예제 #1
0
        public void init()
        {
            player.init(Loading.spacemanImage, new Vector2(0, 290));
            background.init(Loading.hellBground, new Vector2(0, 0));
            playButton.init(Loading.playButtonImage, new Vector2(210, 275), "play");
            exitButton.init(Loading.exitButtonImage, new Vector2(0, 400), "exit");

            initialized = true;
        }
예제 #2
0
        public void init()
        {
            background.init(Loading.backgroundImage2, new Vector2(0, 0));
            player.init(Loading.spacemanImage, new Vector2(0, 340));
            nextButton.init(Loading.nextImage, new Vector2(600, 200), "NEXT");
            platform.init(Loading.platformImage, new Vector2(525, 300));
            platform1.init(Loading.platformImage, new Vector2(375, 250));
            platform2.init(Loading.platformImage, new Vector2(450, 150));
            platform3.init(Loading.platformImage, new Vector2(150, 100));
            platform4.init(Loading.platformImage, new Vector2(250, 250));
            platform5.init(Loading.platformImage, new Vector2(325, 100));

            // Temporary stuff
            testEnm          = new Enemy(Loading.soldierImage, Loading.soldierImage, new Vector2(0, 0), MainGame.enemyClass.NORMAL);
            testEnm.Position = new Vector2(200, 395 - testEnm.Texture.Height);
            testEnm.init();

            mageEnm          = new Enemy(Loading.wizardImage, Loading.wizardImage, new Vector2(0, 0), MainGame.enemyClass.MAGE);
            mageEnm.Position = new Vector2(449, 145 - mageEnm.Texture.Height);
            mageEnm.init();

            reapEnm          = new Enemy(Loading.reaperImage, Loading.reaperImage, new Vector2(0, 0), MainGame.enemyClass.REAPER);
            reapEnm.Position = new Vector2(449, 395 - reapEnm.Texture.Height);
            reapEnm.init();

            hpHearth.init(Loading.hpImage, new Vector2(10, 10));
            hpHearth1.init(Loading.hpImage, new Vector2(30, 10));
            hpHearth2.init(Loading.hpImage, new Vector2(50, 10));
            hpHearth3.init(Loading.hpImage, new Vector2(70, 10));
            hpHearth4.init(Loading.hpImage, new Vector2(90, 10));

            enemies.Add(testEnm);
            enemies.Add(mageEnm);
            enemies.Add(reapEnm);

            collidables.Add(ground);
            collidables.Add(nextButton);
            collidables.Add(platform);
            collidables.Add(platform1);
            collidables.Add(platform2);
            collidables.Add(platform3);
            collidables.Add(platform4);
            collidables.Add(platform5);

            initialized = true;

            Console.WriteLine("Sepeteus Level2");
        }