Ejemplo n.º 1
0
        private static void ConfigurePlayerPrefs()
        {
            //CLOUD ANIMATION
            if (PlayerPrefs.HasKey(Config.PLAYER_PREFS_CLOUD_ANIMATION))
            {
                GameValuesConfig.SetCloudsAnimation(PlayerPrefs.GetString(Config.PLAYER_PREFS_CLOUD_ANIMATION) == "true");
            }
            else
            {
                GameValuesConfig.SetCloudsAnimation(true);
            }

            // CAMERA ROTATION ANIMATION
            if (PlayerPrefs.HasKey(Config.PLAYER_PREFS_ROTATION_CAMERA_ANIMATION))
            {
                GameValuesConfig.SetAndSaveRotationCameraAnimation(PlayerPrefs.GetString(Config.PLAYER_PREFS_ROTATION_CAMERA_ANIMATION) == "true");
            }
            else
            {
                GameValuesConfig.SetAndSaveRotationCameraAnimation(true);
            }

            // FADE ANIMATION
            if (PlayerPrefs.HasKey(Config.PLAYER_PREFS_FADE_ANIMATION))
            {
                GameValuesConfig.SetAndSaveFadeAnimation(PlayerPrefs.GetString(Config.PLAYER_PREFS_FADE_ANIMATION) == "true");
            }
            else
            {
                GameValuesConfig.SetAndSaveFadeAnimation(true);
            }
        }
Ejemplo n.º 2
0
        public void TestScene()
        {
            if (Application.isEditor)
            {
                GameValuesConfig.SetAndSaveCloudsAnimation(false);
                m_oilFieldGOsDisplay.ConfigureLocation(EnumWellType.Drilling);
                m_uiController.StartUI(GameViewState.FieldView, InsideFieldLocation.None);

                ConfigureCameraToTopDownView();
                m_locationCameraController.SetTheMainCameraForTest();

                StartCoroutine("WaitNextFrameToActiveCameraRotaion");
            }
        }
Ejemplo n.º 3
0
        void Update()
        {
            Ray        ray = m_camera.ScreenPointToRay(Input.mousePosition);
            RaycastHit hit;

            if (Physics.Raycast(ray, out hit))
            {
                if (Input.GetMouseButton(0))
                {
                    if (hit.transform.CompareTag("InteractiveField"))
                    {
                        //int id = hit.transform.GetComponent<WellBarController>().Id;
                        WellInfoPanel.Instanse.InitInfo(0);
                        GameValuesConfig.SetCurrentWellType(hit.transform.GetComponent <WellBarController>().wellType, gameObject);
                        HeightLevelEvent evt = new HeightLevelEvent(HeightLevelEvent.ON_SHOW_WELL_INFO);
                        EventManager.instance.dispatchEvent(evt);
                    }
                }

                else if (hit.transform.CompareTag("InteractivePad"))
                {
                    Renderer renderer1 = hit.transform.gameObject.GetComponent <Renderer>();

                    if (m_selectedPadRenderer == null)
                    {
                        m_selectedPadRenderer = renderer1;
                    }
                    else
                    {
                        if (m_selectedPadRenderer != renderer1)
                        {
                            m_selectedPadRenderer.material.color = Color.white;
                            m_selectedPadRenderer = renderer1;
                        }
                    }
                    m_selectedPadRenderer.material.color = Color.yellow;
                }
                else
                {
                    if (m_selectedPadRenderer != null)
                    {
                        m_selectedPadRenderer.material.color = Color.white;
                        m_selectedPadRenderer = null;
                    }
                }
            }
        }
Ejemplo n.º 4
0
        private void arrive()
        {
            m_isMoving         = false;
            m_fracJourney      = 0;
            on70PercentArrive  = false;
            transform.position = m_endPosition.position;
            onArrive.Invoke();

            //This three functions below are not consecuent with Entity Component System, they should be called with onArrive.Invoke().
            //for the moment, I'm not quite shure of how many percentage of this project should be done with ECS, so I will left they for now... T.
            GameValuesConfig.SetShowLocationPanels(true, gameObject);
            if (vFog)
            {
                vFog.enabled = false;
            }
            if (GetComponent <CameraZoomInOutMouseWheel>())
            {
                GetComponent <CameraZoomInOutMouseWheel>().SetEnable(true);
            }
        }
Ejemplo n.º 5
0
 public void GotoPadLocation()
 {
     GameValuesConfig.SetShowLocationPanels(false, gameObject);
     GameStateManager.Instance.PushState(new GamePlayState());
 }
Ejemplo n.º 6
0
 public void ListenerDisableClouds()
 {
     GameValuesConfig.SetAndSaveCloudsAnimation(false, gameObject);
 }
Ejemplo n.º 7
0
 public void ListenerEnableClouds()
 {
     GameValuesConfig.SetAndSaveCloudsAnimation(true, gameObject);
 }
 public void OnCameraRotationHasChanged()
 {
     GameValuesConfig.SetAndSaveRotationCameraAnimation(m_toggleCameraRotationButton.isOn, gameObject);
 }
 public void OnFadeAnimationHasChanged()
 {
     GameValuesConfig.SetAndSaveFadeAnimation(m_toggleFadeAnimationButton.isOn, gameObject);
 }