// GE Common Assets 1.0 // Free asssets for using in many packages of Gold Experience Team. // // Author: Gold Experience Team (http://www.ge-team.com) // Support: geteamdev@gmail.com // // Please direct any bugs/comments/suggestions to support e-mail. #region Namespaces using UnityEngine; using System.Collections; using UnityEngine.UI; #endregion // Namespaces // ###################################################################### // GE_OrbitCamera class // Handles mouse and touch inputs for orbiting the camera around the target object. // ###################################################################### public class GE_OrbitCameraUI : MonoBehaviour { // ######################################## // Variables // ######################################## #region Variables // Unity UI elements Toggle m_ToggleYaw = null; Toggle m_TogglePitch = null; Toggle m_ToggleZoom = null; Toggle m_ToggleHelp = null; Toggle m_ToggleDetails = null; Button m_PinchZoom = null; Button m_VScrollZoom = null; GUIAnimFREE m_PanelSettings = null; GUIAnimFREE m_ButtonSettings = null; GUIAnimFREE m_PanelHelp1 = null; GUIAnimFREE m_PanelHelp2 = null; GUIAnimFREE m_PanelDetails = null; GE_OrbitCamera m_GE_OrbitCamera = null; #endregion // Variables // ######################################## // MonoBehaviour Functions // http://docs.unity3d.com/ScriptReference/MonoBehaviour.html // ######################################## #region MonoBehaviour // Start is called on the frame when a script is enabled just before any of the Update methods is called the first time. // http://docs.unity3d.com/ScriptReference/MonoBehaviour.Start.html void Start() { // Set GUIAnimSystemFREE.Instance.m_AutoAnimation to false, // this will let you control all GUI Animator elements in the scene via scripts. if (enabled) { GUIAnimSystemFREE.Instance.m_GUISpeed = 1.0f; GUIAnimSystemFREE.Instance.m_AutoAnimation = false; } m_GE_OrbitCamera = GameObject.FindObjectOfType(); // Find Unity UI elements GameObject go = GameObject.Find("Toggle Invert X"); if (go != null) m_ToggleYaw = go.GetComponent(); go = GameObject.Find("Toggle Invert Y"); if (go != null) m_TogglePitch = go.GetComponent(); go = GameObject.Find("Toggle Invert Zoom"); if (go != null) m_ToggleZoom = go.GetComponent(); go = GameObject.Find("Toggle Help"); if (go != null) m_ToggleHelp = go.GetComponent(); go = GameObject.Find("Toggle Details"); if (go != null) m_ToggleDetails = go.GetComponent(); go = GameObject.Find("Button Pinch Zoom"); if (go != null) m_PinchZoom = go.GetComponent