Beispiel #1
0
        protected override void OnUserEnterToFieldEvent(AssetUIEvent evt)
        {
            AssetHandler dispatcherClass = (AssetHandler)evt.arguments ["currentGameObject"];

            if (this == dispatcherClass)
            {
                m_currentCollider.enabled = false;
            }
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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();
            }
        }
Beispiel #4
0
        //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));
        }
Beispiel #5
0
    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");
        }
    }
Beispiel #6
0
 protected virtual void OnUserEnterToFieldEvent(AssetUIEvent evt)
 {
     m_currentCollider.enabled = false;
 }