Exemple #1
0
 static void InitMapSettings(MapGenerator window)
 {
     if (FileHelp.FileExistInDataPathRelativePath(mapSettingsProfilesPath))
     {
         ms = FileHelp.LoadJsonFormatObjectByDataPathRelativePath <MapSettings>
                  (mapSettingsProfilesPath);
     }
     else
     {
         EditorWindow.GetWindow <MapGenerator>().Close();
         throw new System.Exception(@"easy map cannot find map settings, did you forgot to generate one,please check 'MapTool/MapSettings'.");
     }
 }
Exemple #2
0
    void Initialize()
    {
        if (!valid)
        {
            return;
        }
        ms = FileHelp.LoadJsonFormatObjectByDataPathRelativePath <MapSettings>
                 (MapSettings.mapSettingsProfilesPath);
        mapData = FileHelp.LoadJsonFormatObjectByDataPathRelativePath <MapData>
                      (string.Format("{0}/{1}.json", ms.mapDataSavePathRelativeToProject, mapName));

        widthDelta             = mapTexTrans.rect.width / mapData.GetMapWidth();
        heightDelta            = mapTexTrans.rect.height / mapData.GetMapWidth();
        staticMark             = new List <GameObject>();
        movingObjRelateMarkDic = new Dictionary <GameObject, GameObject>();
    }
Exemple #3
0
 void Awake()
 {
     ms = FileHelp.LoadJsonFormatObjectByDataPathRelativePath <MapSettings>
              (MapSettings.mapSettingsProfilesPath);
 }