public BattleState(Seven seven, string formationId) : this(seven) { _turnQueue = new Queue<Ally>(); _battleIcons = new Queue<BattleIcon>(); EventQueue = new PriorityQueue(); Random = new Random(); Lua = Seven.GetLua(); Lua.DoString(Resource.GetTextFromResource("lua.scripts.battle", typeof(Seven).Assembly)); Lua[typeof(BattleState).Name] = this; DeadEnemies = new List<Enemy>(); CombatantClocks = new ClockCollection(); _formation = seven.Data.GetFormation(formationId); }
private void LoadFormations() { Formations = new Dictionary<string, Formation>(); XmlDocument gamedata = Resource.GetXmlFromResource("data.formations.xml", Assembly); foreach (XmlNode node in gamedata.SelectNodes("/formations/formation")) { if (node.NodeType == XmlNodeType.Comment) { continue; } Formation formation = new Formation(node); Formations.Add(formation.ID, formation); } }