Esempio n. 1
0
    //creates new map list in staticdata
    void Start()
    {
        if (StaticAllData.clientPracticeMaps == null)
        {
            StaticAllData.clientPracticeMaps = new List <MapModel> ();
            MapLoaderService.populateMaps();
        }         //gets maps from server
                  //mapRequest = new MapRequest ();  //change to singleton in zenject
                  //mapRequest.GetAllMaps();

        //resets current map, gets it


        StaticAllData.currentMap = null;
        if (StaticAllData.clientPracticeMaps.Count != 0)
        {
            selectedAllMap = StaticAllData.clientPracticeMaps [0];
        }

        //creates "myMaps" as opposed to all maps
        myMaps = new List <MapModel> ();

        if (myMaps.Count > 0)
        {
            selectedMyMap = myMaps [0];
        }



        foreach (MapModel map in StaticAllData.clientPracticeMaps)
        {
            myMaps.Add(map);
        }
    }
 // Use this for initialization
 void Start()
 {
     MapLoaderService.populateMaps();
     currentMapArrange = StaticMapCreateData.mapList [0];
     mapView           = Instantiate(mapPrefab, Vector3.zero, Quaternion.identity);
     mapView.GetComponent <MapView> ()._mapModel = currentMapArrange;
 }
Esempio n. 3
0
        void Start()
        {
            GameObject.Find("MapName").GetComponent <Text> ().text        = StaticMapCreateData.currentMap._mapName;
            GameObject.Find("MapInfo").GetComponent <Text> ().text        = StaticMapCreateData.currentMap._mapInfo;
            GameObject.Find("MapDescription").GetComponent <Text> ().text = StaticMapCreateData.currentMap._mapDescription;


            mapView = Instantiate(mapPrefab, Vector3.zero, Quaternion.identity);
            mapView.GetComponent <MapView> ()._mapModel = StaticMapCreateData.currentMap;

            if (StaticMapCreateData.currentMap.UnitToggles._togglesAll == null)               //this is if you go back to this page
            {
                MapLoaderService.populateUnitToggles(StaticMapCreateData.currentMap);
                Debug.Log("adedunits");
            }
            currentParty = StaticMapCreateData.currentMap.UnitToggles._togglesAll[0]._togglesParty;
            currentUnit  = currentParty[0].unit;
        }
Esempio n. 4
0
 public void Construct(MapLoaderService mapLoaderService)
 {
     _mapLoaderService = mapLoaderService;
     //	testInject.hello = 5;
 }
Esempio n. 5
0
 public void Construct(MapLoaderService mapLoaderService)
 {
     _mapLoaderService = mapLoaderService;
 }
 public void Construct(MapLoaderService mapLoaderService, MapManager mapManager)
 {
     _mapLoaderService = mapLoaderService;
     _mapManager       = mapManager;
 }
 public void Construct(MapLoaderService mapLoaderService, UnitPrepManager unitPrepManager)
 {
     _unitPrepManager  = unitPrepManager;
     _mapLoaderService = mapLoaderService;
 }