/// <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. SpriteBatch = new SpriteBatch(GraphicsDevice); // SoundManager.Instance.StartPlaying("ambient"); //Add Default Explosion Module Catalog.Instance.SetupTestCatalog(); StaticDrawer sd = new StaticDrawer(); Game1.Instance.Components.Add(Inventory); sd.Texture = Content.Load<Texture2D>("blackhole"); staticTest = new Entity(this, new Vector2(50, 50), "loch"); staticTest.AddModule(sd); staticTest.AddModule(new ExplodeAndLoot(new PlayerClasses.Items.Item(PlayerClasses.Items.ItemTypes.Potion))); staticTest.Health = 100; List<Texture2D> pL = new List<Texture2D>(); pL.Add(Content.Load<Texture2D>("flame3")); particleTest = new Entity(this, new Vector2(150, 300)); ParticleSystem pSystem = new ParticleSystem( new EmitterSetting() { DirectionX = new Range() { Min = -1, Max = 1 }, DirectionY = new Range() { Min = -1, Max = -3 }, AnglePermutation = new Range() { Min = -1, Max = 1 }, Lifetime = new Range() { Min = 1000, Max = 2500 }, MaxParticles = new Range(250), Size = new Range() { Min = 0.1f, Max = 0.3f }, SpeedX = new Range() { Min = -1, Max = 1 }, SpeedY = new Range() { Min = -1, Max = -3 }, Alpha = new Range(1), AlphaDecay = new Range(0.01f, 0.1f) }, pL); particleTest.AddModule(pSystem); _BackBuffer = new BackBuffer(GraphicsDevice, new Rectangle(0, 0, _graphics.PreferredBackBufferWidth, _graphics.PreferredBackBufferHeight)); List<Color> daylight = new List<Color>(); daylight.Add(new Color(40, 30, 80)); daylight.Add(new Color(40, 30, 70)); daylight.Add(new Color(40, 20, 70)); daylight.Add(new Color(40, 30, 75)); daylight.Add(new Color(25, 25, 80)); daylight.Add(new Color(40, 30, 80)); Lightmanager.SetDayCycle(daylight, 18000); #region opening List<Vector2> points = new List<Vector2>(); points.Add(new Vector2(-400, Player.Position.Y)); points.Add(new Vector2(-400, Player.Position.Y)); points.Add(Player.Position); /*points.Add(new Vector2(574, 546)); points.Add(new Vector2(670, 916)); points.Add(new Vector2(994, 1053)); points.Add(new Vector2(1244, 908)); points.Add(new Vector2(1250, 415)); points.Add(Player.Position);*/ _camera.PlayCinematic(points, 6000); #endregion // Lightmanager.SetStaticColor(Color.White); // Lightmanager.SetStaticColor(Color.White); // TODO: Verwenden Sie this.Content, um Ihren Spiel-Inhalt hier zu laden weaponMarker = Content.Load<Texture2D>("weapontest"); // Add splash screen // TODO remove splash screen ;) splash = new Entity(Game1.Instance, new Vector2(-400, 608)); StaticDrawer splashSd = new StaticDrawer(); splashSd.Texture = Game1.Instance.Content.Load<Texture2D>("xmasSplash"); splash.AddModule(splashSd); }
public override void LoadContent() { (InputManager.Instance["Inventory"] as Key).Pressed += new EventHandler(OpenInventory); (InputManager.Instance["Quit"] as Key).Pressed += new EventHandler(QuitRunningGame); (InputManager.Instance["Boom"] as Key).Pressed += new EventHandler(BoomPressed); (InputManager.Instance["UseItem"] as Key).Pressed += new EventHandler(UseItemPressed); /*try { SaveLoad.SaveGameData saveGame = SaveLoad.SmartStorage<SaveLoad.SaveGameData>.Load(0); foreach (String s in saveGame.Triggers) GlobalState.SetTrigger(s); } catch (Exception e) { } */ Catalog.Instance.SetupTestCatalog(); (Player.Instance.ThinkModule as ThinkInputGuided).SubscribeInput(); _BackBuffer = new BackBuffer(Game1.Instance.GraphicsDevice, new Rectangle(0, 0, Game1.Instance.GraphicsDevice.Viewport.Width, Game1.Instance.GraphicsDevice.Viewport.Height)); List<Color> daylight = new List<Color>(); daylight.Add(new Color(40, 30, 80)); daylight.Add(new Color(40, 30, 70)); daylight.Add(new Color(40, 20, 70)); daylight.Add(new Color(40, 30, 75)); daylight.Add(new Color(25, 25, 80)); daylight.Add(new Color(40, 30, 80)); Lightmanager.Instance.SetDayCycle(daylight, 18000); weaponMarker = Game1.Instance.Content.Load<Texture2D>("sprite/weapontest"); base.LoadContent(); }