private void Start() { currentTileID = 0; currentTcFamilyName = ""; isBuilding = false; tcDummy = (GameObject)Resources.Load("uteForEditor/uteTcDummy"); uteMEE = this.gameObject.GetComponent <uteMapEditorEngine>(); }
private void Start() { currentTileID = 0; currentTcFamilyName = ""; isBuilding = false; tcDummy = (GameObject) Resources.Load("uteForEditor/uteTcDummy"); uteMEE = this.gameObject.GetComponent<uteMapEditorEngine>(); }
public void ReadLayersFromMap(string mapName, GameObject _MAP_STATIC, GameObject _MAP_DYNAMIC, uteMapEditorEngine _MEE) { MEE = _MEE; MAP_STATIC = _MAP_STATIC; MAP_DYNAMIC = _MAP_DYNAMIC; newLayerName = ""; brandNewLayerName = ""; m_mapName = mapName; showLayerOptions = false; isMergingLayers = false; isCreatingNewLayer = false; showLayerOptionsID = -1; isShow = true; skin = (GUISkin)Resources.Load("uteForEditor/uteUI"); mapLPath = uteGLOBAL3dMapEditor.getMapsDir() + mapName + "_layers.txt"; if (!File.Exists(mapLPath)) { StreamWriter sw = new StreamWriter(mapLPath); sw.Write("DEFAULT:"); sw.Flush(); sw.Close(); } StreamReader sr = new StreamReader(mapLPath); string allInfo = sr.ReadToEnd(); sr.Close(); string[] infoParts = allInfo.Split(":"[0]); for (int i = 0; i < infoParts.Length; i++) { string info = infoParts[i]; if (!info.Equals("")) { AllLayers.Add(new Layer(info)); } } if (AllLayers.Count <= 0) { RestoreLayersToDefault(); return; } if (!AllLayers[0].layerName.Equals("DEFAULT")) { AllLayers[0].layerName = "DEFAULT"; RewriteLayersFromArrayToFile(); } }
private void InitMapEditorEngine(bool _isItNewPattern, bool _isItNewMap, string name, bool isLoad) { uteMapEditorEngine uteMEE = this.gameObject.AddComponent <uteMapEditorEngine>(); uteMEE.isItNewPattern = _isItNewPattern; uteMEE.isItNewMap = _isItNewMap; uteMEE.isItLoad = isLoad; uteMEE.newProjectName = name; StartCoroutine(uteMEE.uteInitMapEditorEngine()); HideMenu(); }
public void ReadLayersFromMap(string mapName, GameObject _MAP_STATIC, GameObject _MAP_DYNAMIC, uteMapEditorEngine _MEE) { MEE = _MEE; MAP_STATIC = _MAP_STATIC; MAP_DYNAMIC = _MAP_DYNAMIC; newLayerName = ""; brandNewLayerName = ""; m_mapName = mapName; showLayerOptions = false; isMergingLayers = false; isCreatingNewLayer = false; showLayerOptionsID = -1; isShow = true; skin = (GUISkin) Resources.Load("uteForEditor/uteUI"); mapLPath = uteGLOBAL3dMapEditor.getMapsDir()+mapName+"_layers.txt"; if(!File.Exists(mapLPath)) { StreamWriter sw = new StreamWriter(mapLPath); sw.Write("DEFAULT:"); sw.Flush(); sw.Close(); } StreamReader sr = new StreamReader(mapLPath); string allInfo = sr.ReadToEnd(); sr.Close(); string[] infoParts = allInfo.Split(":"[0]); for(int i=0;i<infoParts.Length;i++) { string info = infoParts[i]; if(!info.Equals("")) { AllLayers.Add(new Layer(info)); } } if(AllLayers.Count<=0) { RestoreLayersToDefault(); return; } if(!AllLayers[0].layerName.Equals("DEFAULT")) { AllLayers[0].layerName = "DEFAULT"; RewriteLayersFromArrayToFile(); } }
private void Start() { isCastShadows = false; isEditorLightOn = true; isShowGrid = true; ui = (GUISkin)Resources.Load("uteForEditor/uteUI"); isShow = false; MapEngine = (uteMapEditorEngine)this.gameObject.GetComponent <uteMapEditorEngine>(); if (MapEngine.yTypeOption.Equals("auto")) { snapOnTop = true; } else { snapOnTop = false; } }
private void Start() { isCastShadows = false; isEditorLightOn = true; isShowGrid = true; ui = (GUISkin) Resources.Load("uteForEditor/uteUI"); isShow = false; MapEngine = (uteMapEditorEngine) this.gameObject.GetComponent<uteMapEditorEngine>(); if(MapEngine.yTypeOption.Equals("auto")) { snapOnTop = true; } else { snapOnTop = false; } }
private void Start() { isAboutToCancel = false; lastXfill = 0; lastZfill = 0; lastDistanceZ = 0; lastDistanceX = 0; heightStep = 1; isBuilding = false; lastDistance = new Vector3(-10000, -10000, -10000); mDummy = (GameObject)Resources.Load("uteForEditor/uteTcDummy"); mDummyMat = (Material)Resources.Load("uteForEditor/uteTcDummyMat"); #if UNITY_EDITOR uteMEE = this.gameObject.GetComponent <uteMapEditorEngine>(); UndoSystem = this.gameObject.GetComponent <uteUndoSystem>(); if (!uteMEE) { #endif uteMEER = this.gameObject.GetComponent <uteMapEditorEngineRuntime>(); #if UNITY_EDITOR } #endif }
private void Start() { isAboutToCancel = false; lastXfill = 0; lastZfill = 0; lastDistanceZ = 0; lastDistanceX = 0; heightStep = 1; isBuilding = false; lastDistance = new Vector3(-10000,-10000,-10000); mDummy = (GameObject) Resources.Load("uteForEditor/uteTcDummy"); mDummyMat = (Material) Resources.Load("uteForEditor/uteTcDummyMat"); #if UNITY_EDITOR uteMEE = this.gameObject.GetComponent<uteMapEditorEngine>(); UndoSystem = this.gameObject.GetComponent<uteUndoSystem>(); if(!uteMEE) { #endif uteMEER = this.gameObject.GetComponent<uteMapEditorEngineRuntime>(); #if UNITY_EDITOR } #endif }