示例#1
0
 /// <summary>
 /// Sets the unit map for referencing later on. This is required because the map is created
 /// after the director so it cannot be included in the constructor.
 /// </summary>
 internal void SetMap(ref Map.Map map)
 {
     mUnitMap       = new UnitMap((int)map.GetMeasurements().X, (int)map.GetMeasurements().Y);
     mMap           = map;
     mSelectedGroup = new FlockingGroup(ref mDirector, ref mMap);
     mGroups.Add(mSelectedGroup);
 }
示例#2
0
        public void ReloadSetMap(ref Map.Map map)
        {
            mMap           = map;
            mUnitMap       = new UnitMap((int)map.GetMeasurements().X, (int)map.GetMeasurements().Y);
            mSelectedGroup = new FlockingGroup(ref mDirector, ref mMap);
            foreach (var funit in mFriendlyMilitary)
            {
                mUnitMap.AddUnit(funit);
            }

            //This list includes every platform
            foreach (var platform in mReconstructionList)
            {
                mUnitMap.AddUnit(platform);
            }

            foreach (var hunit in mHostileMilitary)
            {
                mUnitMap.AddUnit(hunit);
            }
        }