Beispiel #1
0
        private void Start()
        {
            simpleWorldMaker.GenerateMap();
            Debug.Log("Map generated.");
            Map map = simpleWorldMaker.Map;

            headQuater = new HeadQuater(map, simpleWorldMaker.DemandPoints, new Base.SC[] { simpleWorldMaker.supplyCenter });
            Debug.Log("headquater created.");
            headQuater.AssignTask(editorDataReader.AllTasks);
            Debug.Log("Tasks scheduled.");
            displayController.Init(headQuater.Transportations);
            Debug.Log("Displayer initialized.");
            isInitialized = true;
        }
Beispiel #2
0
 public SupplyCenter(int _position, int[] _transportations, HeadQuater headQuater)
 {
     Position = _position;
     for (int i = 0; i < _transportations.Length; i++)
     {
         TransportationType type = (TransportationType)i;
         Transportations.Add(type, new List <Transportation>[]
         {
             new List <Transportation>(), new List <Transportation>()
         });
         for (int j = 0; j < _transportations[i]; j++)
         {
             Transportation newTp = Transportation.GetTransportation(type);
             Transportations[type][0].Add(newTp);
             headQuater.RegisterTransportation(newTp);
         }
     }
 }