public BuildModeHUDController() { view = UnityEngine.Object.Instantiate(Resources.Load <GameObject>("BuildModeHUD")).GetComponent <BuildModeHUDView>(); view.name = "_BuildModeHUD"; view.gameObject.SetActive(false); sceneObjectDropController = new SceneObjectDropController(); buildModeEntityListController = view.GetComponentInChildren <BuilderInWorldEntityListController>(); buildModeEntityListController = view.entityListController; entityInformationController = view.entityInformationController; entityInformationController.OnPositionChange += (x) => OnSelectedObjectPositionChange?.Invoke(x); entityInformationController.OnRotationChange += (x) => OnSelectedObjectRotationChange?.Invoke(x); entityInformationController.OnScaleChange += (x) => OnSelectedObjectScaleChange?.Invoke(x); entityInformationController.OnNameChange += (entity, newName) => OnEntityRename?.Invoke(entity, newName); sceneObjectDropController.catalogGroupListView = view.catalogGroupListView; sceneObjectDropController.catalogGroupListView = view.catalogGroupListView; buildModeEntityListController.OnEntityClick += (x) => OnEntityClick(x); buildModeEntityListController.OnEntityDelete += (x) => OnEntityDelete(x); buildModeEntityListController.OnEntityLock += (x) => OnEntityLock(x); buildModeEntityListController.OnEntityChangeVisibility += (x) => OnEntityChangeVisibility(x); buildModeEntityListController.OnEntityRename += (entity, newName) => OnEntityRename(entity, newName); buildModeEntityListController.CloseList(); view.OnSceneObjectDrop += () => sceneObjectDropController.SceneObjectDropped(); view.OnChangeModeAction += () => OnChangeModeAction?.Invoke(); view.OnExtraBtnsClick += ChangeVisibilityOfExtraBtns; view.OnControlsVisibilityAction += ChangeVisibilityOfControls; view.OnChangeUIVisbilityAction += ChangeVisibilityOfUI; view.OnSceneLimitInfoChangeVisibility += ChangeVisibilityOfSceneInfo; view.OnSceneLimitInfoControllerChangeVisibilityAction += ChangeVisibilityOfSceneInfo; view.OnSceneCatalogControllerChangeVisibilityAction += ChangeVisibilityOfCatalog; view.OnTranslateSelectionAction += () => OnTranslateSelectedAction?.Invoke(); view.OnRotateSelectionAction += () => OnRotateSelectedAction?.Invoke(); view.OnScaleSelectionAction += () => OnScaleSelectedAction?.Invoke(); view.OnResetSelectedAction += () => OnResetAction?.Invoke(); view.OnDuplicateSelectionAction += () => OnDuplicateSelectedAction?.Invoke(); view.OnDeleteSelectionAction += () => OnDeleteSelectedAction?.Invoke(); sceneObjectDropController.OnSceneObjectDropped += SceneObjectSelected; view.OnSceneObjectSelected += SceneObjectSelected; view.OnStopInput += () => OnStopInput?.Invoke(); view.OnResumeInput += () => OnResumeInput?.Invoke(); view.OnEntityListChangeVisibilityAction += () => ChangeVisibilityOfEntityList(); view.OnTutorialAction += () => OnTutorialAction?.Invoke(); view.OnPublishAction += () => OnPublishAction?.Invoke(); view.OnLogoutAction += () => OnLogoutAction?.Invoke(); }
public void EntityRename(BIWEntity entity, string newName) { OnEntityRename?.Invoke(entity, newName); }
public void EntityRename(DCLBuilderInWorldEntity entity, string newName) { OnEntityRename?.Invoke(entity, newName); }
private void ConfigureEntityInformationController() { controllers.entityInformationController.OnPositionChange += (x) => OnSelectedObjectPositionChange?.Invoke(x); controllers.entityInformationController.OnRotationChange += (x) => OnSelectedObjectRotationChange?.Invoke(x); controllers.entityInformationController.OnScaleChange += (x) => OnSelectedObjectScaleChange?.Invoke(x); controllers.entityInformationController.OnNameChange += (entity, newName) => OnEntityRename?.Invoke(entity, newName); controllers.entityInformationController.OnSmartItemComponentUpdate += (entity) => OnEntitySmartItemComponentUpdate?.Invoke(entity); }