Пример #1
0
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            //this.IsMouseVisible = true;

            talo     = new Rectangle(200, 150, 1331, 789);
            spinnaus = new Rectangle(50, 50, 100, 100);

            //taustat textuurin kokosiks
            tausta1 = new Rectangle(0, 0, 1920, 1080);
            tausta2 = new Rectangle(1920, 0, 1920, 1080);
            tausta3 = new Rectangle(-1920, 0, 1920, 1080);

            enemies  = new List <Enemy>();
            powerups = new List <Powerup>();
            spiders  = new List <Spider>();
            spawners = new List <EnemySpawner>();

            groundBlock = new Rectangle(0, 1080 - 268, 50, 268);
            treeRec     = new Rectangle(0, 0, 1858, 1080);

            viking.Initialize(GraphicsDevice);
            health.Initialize(GraphicsDevice, viking);
            experience.Initialize(GraphicsDevice, GraphicsDevice.Viewport);
            menu.Initialize(GraphicsDevice);
            theend.Initialize(GraphicsDevice);


            leveldet = levelReader.readLevel("level1");

            base.Initialize();

            addEnemy();
            createSpawners();
            createGoal();
        }