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); } }
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"); } }
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; } } } }
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); } }
public void GotoPadLocation() { GameValuesConfig.SetShowLocationPanels(false, gameObject); GameStateManager.Instance.PushState(new GamePlayState()); }
public void ListenerDisableClouds() { GameValuesConfig.SetAndSaveCloudsAnimation(false, gameObject); }
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); }