private void LoadNationFromPath(string name, string path) { data.nationNames.Add(name); nations.Add(new Nation(path, name)); Hermes.getInstance().log(this, "Loading Nation with Name " + name, 0); }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) { Hermes.getInstance().shutdownHermes(); Exit(); } base.Update(gameTime); }
public static Aspect GetAspect(string name) { if (!Instances.ContainsKey(name)) { try { XmlSerializer serializer = new XmlSerializer(typeof(Aspect)); using (Stream file = File.OpenRead(AppDomain.CurrentDomain.BaseDirectory + PATH + "\\" + name + ".xml")) { Instances[name] = (Aspect)serializer.Deserialize(file); Hermes.getInstance().log("Loaded aspect: " + Instances[name].ToString(), "AspectLoader", 4); } } catch (Exception e) { Hermes.getInstance().log(e.Message, "AspectLoader", 0); AddAspect(new Aspect(name)); } } return(Instances[name]); }
public static void AddAspect(Aspect aspect) { Instances[aspect.Name] = aspect; Hermes.getInstance().log("Added aspect: " + aspect.ToString(), "Aspects", 3); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Hermes.getInstance().shutdownHermes(); }
private void beendenToolStripMenuItem_Click(object sender, EventArgs e) { //GIDM.saveIDDatabank(); Hermes.getInstance().shutdownHermes(); this.Close(); }