Beispiel #1
0
        public static void ImportMap(GameObject map)
        {
            // Ship Status
            ShipStatus shipStatus = map.GetComponent <ShipStatus>();

            // Determine Map Type
            ShipStatus.MapType mapType = ShipStatus.MapType.Pb;
            if (map.name == "AprilShip")
            {
                return;
            }
            if (map.name == "MiraShip")
            {
                mapType = ShipStatus.MapType.Hq;
            }
            if (map.name == "SkeldShip")
            {
                mapType = ShipStatus.MapType.Ship;
            }


            // Import Map to Lists
            ImportMap(map, shipStatus, mapType, tasks);
            ImportMap(map, shipStatus, mapType, utils);
            ImportMap(map, shipStatus, mapType, sabs);
            ImportMap(map, shipStatus, mapType, dec);
            ImportMap(map, shipStatus, mapType, room);
        }
Beispiel #2
0
 private static void ImportMap <T>(GameObject map, ShipStatus shipStatus, ShipStatus.MapType mapType, Dictionary <string, T> list) where T : AssetData
 {
     foreach (var elem in list)
     {
         if (elem.Value.MapType == mapType)
         {
             elem.Value.ImportMap(map, shipStatus);
         }
     }
 }