コード例 #1
0
 public AiArea(ScenarioModel parent, AiZone zone, BlockReference blockRef, int index)
     : base(parent)
 {
     Zone           = zone;
     BlockReference = blockRef;
     BlockIndex     = index;
 }
コード例 #2
0
        public AiSquadHierarchy(ScenarioModel scenario)
        {
            if (!scenario.Sections.ContainsKey(Section.Squads))
            {
                AiNodes = new Dictionary <string, XmlNode>();
            }
            else
            {
                AiNodes = scenario.Sections[Section.Squads].Node.SelectNodes("./tagblock[@id]")
                          .OfType <XmlNode>()
                          .ToDictionary(n => n.Attributes["id"].Value);
            }

            SquadGroups = new ObservableCollection <AiNamedBlock>();
            Zones       = new ObservableCollection <AiZone>();
            DefaultZone = new AiZone(null, -1)
            {
                Name = "<none>"
            };
        }