void Start() { Messenger <StateM.StateChangeData> .AddListener(LevelCreatorStateMessage.LevelCreationEnter.ToString(), LevelCreationEnter); Messenger <StateM.StateChangeData> .AddListener(LevelCreatorStateMessage.FrontMenuEnter.ToString(), FrontMenuEnter); assetManager = GetComponent <LevelAssetManager>(); mapRoot = GameObject.Find("MapRoot"); uiController = GameObject.Find("UIController").GetComponent <LevelCreatorUIController> (); }
void Start() { var levelCreationLayer = 1 << 10; var nullLayer = 1 << 12; layerMask = levelCreationLayer | nullLayer; levelCreator = GameObject.Find("LevelCreator").GetComponent <LevelCreator>(); assetManager = GameObject.Find("LevelCreator").GetComponent <LevelAssetManager>(); Messenger <GameObject> .AddListener(DragAndDropMessage.MenuItemPressed.ToString(), MenuItemPressed); Messenger <GameObject> .AddListener(DragAndDropMessage.MapObjectPressed.ToString(), MapObjectPressed); Messenger <Vector3> .AddListener(DragAndDropMessage.DoubleClicked.ToString(), DoubleClicked); Messenger <GameObject> .AddListener(DragAndDropMessage.MenuItemRightClicked.ToString(), MenuItemRightClicked); Messenger <StateMachine <LevelCreatorStates, LevelCreatorStateMessage> .StateChangeData> .AddListener(LevelCreatorStateMessage.TestingMapEnter.ToString(), TestingMapEnter); }