Exemple #1
0
        /// <summary>
        /// LoadContent wird einmal pro Spiel aufgerufen und ist der Platz, wo
        /// Ihr gesamter Content geladen wird.
        /// </summary>
        protected override void LoadContent()
        {
            // Erstellen Sie einen neuen SpriteBatch, der zum Zeichnen von Texturen verwendet werden kann.
            ContentInterface.SetContent(Services, "Content", "Content.7z");
            ContentInterface.SetGraphicsDevice(GraphicsDevice);
            manager = new ScreenManager(Content, GraphicsDevice, this);

            manager.AddScreen(new UI.MainMenuScreen());

            //manager.AddScreen(new MainMenuScreen(this));
            Window.Title = "IGORR";

            _clock = new Logic.Clock();
            _clock.Stamp();
            // TODO: Verwenden Sie this.Content, um Ihren Spiel-Content hier zu laden
        }
Exemple #2
0
        public void Initialize(GraphicsDevice Device, ScreenManager manager)
        {
            GraphicsDevice = Device;
            spriteBatch = new SpriteBatch(Device);
            cam = new Camera(new Vector2(520, 440), new Rectangle(0, 0, 800, 600));

            _lightMap = new LightMap(Device);

            MapManager.LoadMaps(Device);
            //map = MapManager.GetMapByID(0);
            objectManager = new ObjectManager(map);
            objectManager.SetLight(_lightMap);
            pm = new ParticleManager();
            TextManager.SetUp(ContentInterface.LoadFont("font"));
            Player.font = ContentInterface.LoadFont("font");
            font = ContentInterface.LoadFont("font");
            bar = ContentInterface.LoadTexture("White");
            expBorder = ContentInterface.LoadTexture("ExpBar");
            crosshair = ContentInterface.LoadTexture("Crosshair");
            _spriteEffect = ContentInterface.LoadShader("ShadowEffect");
            _spriteEffect.CurrentTechnique = _spriteEffect.Techniques["Sprite"];
            _manager = manager;

            _mapMutex = new System.Threading.Mutex();

            input = new InputManager();

            WorldController.SetObjectManager(objectManager);
            WorldController.SetGame(this);
            WorldController.Start();
            _GUIOverlay = new UI.GUIScreen();
            manager.AddScreen(_GUIOverlay);
        }