private void Awake() { mIns = this; m_parents = new GameObject("MeshParents"); exportPath = $"{ Application.dataPath}/MapDataExport/{ SceneManager.GetActiveScene().name}.txt"; }
public MapEditorManager getMapEditorManager() { if (mapEditorManager == null) { mapEditorManager = GameObject.Find("MapEditorManager").GetComponent <MapEditorManager>(); } return(mapEditorManager); }
public int selectedTypeIndex, selectedItemIndex; // 선택된 이미지의 유형, 해당 유형에서의 인덱스 void Awake() { if (Instance != null) { Debug.LogError("There's another MapEditorManager!"); } Instance = this; }
// Init function for launching the playercontroller in the map editor. public void InitEditMode() { mat_index = 0; editState = CurrentEditMode.NO_OBJ; levelRef = FindObjectOfType <MapEditorLevel>(); mapManagerRef = levelRef.GetComponent <MapEditorManager>(); SetCameraRails(); this.enabled = true; }
private void Awake() { if (instance != null) { Debug.LogError("Instance already assigned"); } instance = this; UpdateToolsButtons(); }
// Class init at GameStart void Awake() { // From LevelScript: this.PC = FindObjectOfType <PlayerController>(); this.tileMapRef = FindObjectOfType <TileMap>(); this.gameState = GameState.EDIT; this.audioRef = FindObjectOfType <AudioManager>(); // From MapEditorLevel: this.mapEditorManagerRef = this.GetComponent <MapEditorManager>(); }
// Use this for initialization void Awake() { Debug.Log("[MapEditorManager:Awake]"); if (singleton == null) { Debug.Log("Hello, world!"); singleton = this; } else { Debug.Log("Goodbye, cruel world!"); GameObject.Destroy(gameObject); } }
// Class init at GameStart; void Awake() { // From LevelScript: this.gameState = GameState.PLACECASTLE; this.tileMapRef = FindObjectOfType <TileMap>(); this.PC = FindObjectOfType <PlayerController>(); this.audioRef = FindObjectOfType <AudioManager>(); // From MainLevel: this.isPaused = false; this.UIMenuRef = this.GetComponent <MenuManager>(); this.spawnManagerRef = this.GetComponent <SpawnManager>(); this.mapEditorManagerRef = this.GetComponent <MapEditorManager>(); }
public Button[] typeButtons; // 0 : tile, 1 : offTile, 2 : entity void Start() { editorInstance = MapEditorManager.Instance; // Initialize itemNumber = new int[typePanels.Length]; isTypeActivated = new bool[typePanels.Length]; for (int i = 0; i < itemNumber.Length; i++) { itemNumber[i] = editorInstance.GetSpriteImageDataLength(i) + 2; // 초기화, 빈 칸 버튼 + 실제 이미지 버튼 isTypeActivated[i] = true; } CreateDisposingUI(); }
// Init function for launching the playercontroller in play mode. public void InitPlayMode() { levelRef = FindObjectOfType <MainLevel>(); SetCameraRails(); UIMenuRef = levelRef.GetComponent <MenuManager>(); spawnManagerRef = levelRef.GetComponent <SpawnManager>(); mapManagerRef = levelRef.GetComponent <MapEditorManager>(); // Index 0 of the tileMap's structure Palette is the Castle Prefab. castleRef = spawnManagerRef.castleRef; levelRef.GetComponent <MainLevel>().SetGameState(MainLevel.GameState.PLACECASTLE); UIMenuRef.OpenMenu(UIMenuRef.placeCastleNotif); this.enabled = true; }
private void Start() { Instance = this; ItemType = Note.ItemType.Blue; Precision = 1; }
// Start is called before the first frame update void Start() { mapEditorManager = FindObjectOfType <MapEditorManager>(); }
// Use this for initialization void Start() { editorInstance = MapEditorManager.Instance; }
void Start() { editorInstance = MapEditorManager.Instance; createPanel = transform.Find("CreatePanel").gameObject; clearPanel = transform.Find("ClearPanel").gameObject; }
// Native Functions ****************************************************************************** // *********************************************************************************************** void Awake() { levelRef = FindObjectOfType <LevelScript>(); mapManagerRef = levelRef.GetComponent <MapEditorManager>(); }
void Start() { renderer = GetComponent <Renderer>(); editorInstance = MapEditorManager.instance; }
// Use this for initialization void Awake() { editorInstance = MapEditorManager.Instance; disposedItems = new int[images.Length]; ClearAllImages(); }