protected override void OnUserEnterToFieldEvent(AssetUIEvent evt) { AssetHandler dispatcherClass = (AssetHandler)evt.arguments ["currentGameObject"]; if (this == dispatcherClass) { m_currentCollider.enabled = false; } }
protected virtual void NavigateToViewPoint() { AssetUIEvent assetUIEvent = new AssetUIEvent(AssetUIEvent.ON_CHANGE_TO_INSIDE_VIEW); assetUIEvent.arguments ["insideFieldLocation"] = m_insideFieldLocation; assetUIEvent.arguments ["currentGameObject"] = this; assetUIEvent.arguments ["navigationPoint"] = m_viewPointTransform; EventManager.instance.dispatchEvent(assetUIEvent); }
private void OnBackToPreviousView() { KeyValuePair <GameViewState, LocationAndPosition> currentState = m_currentViewState[m_currentViewState.Count - 1]; if (currentState.Key == GameViewState.InAnAsset && currentState.Value.m_location == InsideFieldLocation.WellHeads) { AssetEvent assetEvt = new AssetEvent(AssetEvent.ON_ACTIVE_WELLHEADS_COLLIDERS); assetEvt.arguments["active"] = false; EventManager.instance.dispatchEvent(assetEvt); } m_currentViewState.PopBack(); if (m_currentViewState.Count > 1) { KeyValuePair <GameViewState, LocationAndPosition> state = m_currentViewState[m_currentViewState.Count - 1]; LocationAndPosition locationEntity = state.Value; locationEntity.m_isFromBack = true; m_uiController.ChangeUIDueToLocationChange(state.Key, locationEntity.m_location); switch (state.Key) { case GameViewState.InAnAsset: m_locationCameraController.GoToSpecificPoint(locationEntity.m_transformPosition, state.Key, locationEntity); break; case GameViewState.IsInFps: GameValues.isInFPSMode = true; AssetUIEvent assetUIEvent = new AssetUIEvent(AssetUIEvent.ON_ENABLE_COLLIDER); EventManager.instance.dispatchEvent(assetUIEvent); m_locationCameraController.ChangeToFpsView(); break; } } else if (m_currentViewState.Count == 1) { GameValues.isInFPSMode = false; GameValues.disableOrbit = false; m_locationCameraController.GotoTopView(); m_uiController.ChangeUIDueToLocationChange(GameViewState.FieldView, InsideFieldLocation.None); AssetUIEvent assetUIEvent = new AssetUIEvent(AssetUIEvent.ON_ENABLE_COLLIDER); EventManager.instance.dispatchEvent(assetUIEvent); } else { GameStateManager.Instance.PopState(); } }
//Go to scpecif location private void OnEnterToFieldEvent(AssetUIEvent evt) { GameValues.isInFPSMode = false; GameValues.disableOrbit = true; Transform viewPointTransform = (Transform)evt.arguments["navigationPoint"]; InsideFieldLocation location = (InsideFieldLocation)evt.arguments["insideFieldLocation"]; LocationAndPosition locationEntity = new LocationAndPosition(location, viewPointTransform); m_locationCameraController.GoToSpecificPoint(viewPointTransform, GameViewState.InAnAsset, locationEntity); m_uiController.ChangeUIDueToLocationChange(GameViewState.InAnAsset, location); m_currentViewState.Add(new KeyValuePair <GameViewState, LocationAndPosition>(GameViewState.InAnAsset, locationEntity)); }
private void OnEnterToFieldEvent(AssetUIEvent evt) { InsideFieldLocation location = (InsideFieldLocation)evt.arguments["insideFieldLocation"]; if (location == InsideFieldLocation.Wireline || location == InsideFieldLocation.SelectedInsideAsset) { if (!m_coroutineIsAlreadyRunning) { m_coroutineIsAlreadyRunning = true; StartCoroutine("ChangeValues"); } } else { StopCoroutine("ChangeValues"); } }
protected virtual void OnUserEnterToFieldEvent(AssetUIEvent evt) { m_currentCollider.enabled = false; }