a+I5.5.1f1ū˙˙˙˙˙Č0ÅōÃôL.`?^Ų0D7€˙˙˙˙€Ļ€˛€ЀĻ€Ļ€Ļ€#Ļ€+H€3˙˙˙˙€1€1€˙˙˙˙@Ū€€ Q€j€ ™€< Ļ€H H€Z˙˙˙˙ €1€1€˙˙˙˙@Ū€€Q€j€ЀgĻ€Ļ€Ļ€#Ļ€+v~ € €– €Ÿ €¨ €ą €ē €Ã €Ė €Õ €Ū  €į! €ņ" €û# €$ €% €&Õ€#˙˙˙˙'€1€1€˙˙˙˙(€Ū€€)H€j€˙˙˙˙*€1€1€˙˙˙˙+@Ū€€,Q€j€-™€*.Ū€8/AssetMetaDataguiddata[0]data[1]data[2]data[3]pathNametimeCreatedoriginalChangesetoriginalNameoriginalParentHash128originalDigestbytes[0]bytes[1]bytes[2]bytes[3]bytes[4]bytes[5]bytes[6]bytes[7]bytes[8]bytes[9]bytes[10]bytes[11]bytes[12]bytes[13]bytes[14]bytes[15]labelsassetStoreReflicenseType ˙˙z{ī@îČã5^(H'7€˙˙˙˙€Ļ€˛€ Õ€ Ū€#.€,†€Ä€ Ū€#.€,H€Ģ€˙˙˙˙€1€1€˙˙˙˙ @Ū€€ Q€j€ Õ€5˙˙˙˙ €1€1€˙˙˙˙ €Ū€€€j€˙˙˙˙€H€›€˙˙˙˙€1€1€˙˙˙˙@Ū€€Q€j€y€ € Ū€#.€, €I@ž€X @Ū€#.€,H€]˙˙˙˙€1€1€˙˙˙˙@Ū€€Q€j€H€h˙˙˙˙€1€1€˙˙˙˙ @Ū€€!Q€j€"H€z˙˙˙˙#€1€1€˙˙˙˙$@Ū€€%Q€j€&MonoImporterPPtrm_FileIDm_PathIDm_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariants˙˙˙8-l'€Ŗ愁hŒÎA,Œ€7€˙˙˙˙€Ļ€˛€Õ€ Ū€.€†€Ä€ Ū€.€H€Ģ€˙˙˙˙€1€1€˙˙˙˙ @Ū€€ Q€j€ H€ę€˙˙˙˙ €1€1€˙˙˙˙ @Ū€€Q€j€ņ€(˙˙˙˙€1€1€˙˙˙˙€Ū€€€j€˙˙˙˙€H€›€˙˙˙˙€1€1€˙˙˙˙@Ū€€Q€j€y€ € Ū€.€y€< Ū€.€Ū€CH€T˙˙˙˙€1€1€˙˙˙˙ @Ū€€!Q€j€"H€`˙˙˙˙#€1€1€˙˙˙˙$@Ū€€%Q€j€&H€l˙˙˙˙'€1€1€˙˙˙˙(@Ū€€)Q€j€*L€{+PPtrm_FileIDm_PathIDm_DefaultReferencesm_Iconm_ExecutionOrderm_ClassNamem_Namespacem_AssemblyNamem_IsEditorScript°°@āy¯đYĻėĨĨũOĻŊ_k%JĮNAssets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInputManager.csDoneüCrossPlatformInputManager’using System; using UnityEngine; using UnityStandardAssets.CrossPlatformInput.PlatformSpecific; namespace UnityStandardAssets.CrossPlatformInput { public static class CrossPlatformInputManager { public enum ActiveInputMethod { Hardware, Touch } private static VirtualInput activeInput; private static VirtualInput s_TouchInput; private static VirtualInput s_HardwareInput; static CrossPlatformInputManager() { s_TouchInput = new MobileInput(); s_HardwareInput = new StandaloneInput(); #if MOBILE_INPUT activeInput = s_TouchInput; #else activeInput = s_HardwareInput; #endif } public static void SwitchActiveInputMethod(ActiveInputMethod activeInputMethod) { switch (activeInputMethod) { case ActiveInputMethod.Hardware: activeInput = s_HardwareInput; break; case ActiveInputMethod.Touch: activeInput = s_TouchInput; break; } } public static bool AxisExists(string name) { return activeInput.AxisExists(name); } public static bool ButtonExists(string name) { return activeInput.ButtonExists(name); } public static void RegisterVirtualAxis(VirtualAxis axis) { activeInput.RegisterVirtualAxis(axis); } public static void RegisterVirtualButton(VirtualButton button) { activeInput.RegisterVirtualButton(button); } public static void UnRegisterVirtualAxis(string name) { if (name == null) { throw new ArgumentNullException("name"); } activeInput.UnRegisterVirtualAxis(name); } public static void UnRegisterVirtualButton(string name) { activeInput.UnRegisterVirtualButton(name); } // returns a reference to a named virtual axis if it exists otherwise null public static VirtualAxis VirtualAxisReference(string name) { return activeInput.VirtualAxisReference(name); } // returns the platform appropriate axis for the given name public static float GetAxis(string name) { return GetAxis(name, false); } public static float GetAxisRaw(string name) { return GetAxis(name, true); } // private function handles both types of axis (raw and not raw) private static float GetAxis(string name, bool raw) { return activeInput.GetAxis(name, raw); } // -- Button handling -- public static bool GetButton(string name) { return activeInput.GetButton(name); } public static bool GetButtonDown(string name) { return activeInput.GetButtonDown(name); } public static bool GetButtonUp(string name) { return activeInput.GetButtonUp(name); } public static void SetButtonDown(string name) { activeInput.SetButtonDown(name); } public static void SetButtonUp(string name) { activeInput.SetButtonUp(name); } public static void SetAxisPositive(string name) { activeInput.SetAxisPositive(name); } public static void SetAxisNegative(string name) { activeInput.SetAxisNegative(name); } public static void SetAxisZero(string name) { activeInput.SetAxisZero(name); } public static void SetAxis(string name, float value) { activeInput.SetAxis(name, value); } public static Vector3 mousePosition { get { return activeInput.MousePosition(); } } public static void SetVirtualMousePositionX(float f) { activeInput.SetVirtualMousePositionX(f); } public static void SetVirtualMousePositionY(float f) { activeInput.SetVirtualMousePositionY(f); } public static void SetVirtualMousePositionZ(float f) { activeInput.SetVirtualMousePositionZ(f); } // virtual axis and button classes - applies to mobile input // Can be mapped to touch joysticks, tilt, gyro, etc, depending on desired implementation. // Could also be implemented by other input devices - kinect, electronic sensors, etc public class VirtualAxis { public string name { get; private set; } private float m_Value; public bool matchWithInputManager { get; private set; } public VirtualAxis(string name) : this(name, true) { } public VirtualAxis(string name, bool matchToInputSettings) { this.name = name; matchWithInputManager = matchToInputSettings; } // removes an axes from the cross platform input system public void Remove() { UnRegisterVirtualAxis(name); } // a controller gameobject (eg. a virtual thumbstick) should update this class public void Update(float value) { m_Value = value; } public float GetValue { get { return m_Value; } } public float GetValueRaw { get { return m_Value; } } } // a controller gameobject (eg. a virtual GUI button) should call the // 'pressed' function of this class. Other objects can then read the // Get/Down/Up state of this button. public class VirtualButton { public string name { get; private set; } public bool matchWithInputManager { get; private set; } private int m_LastPressedFrame = -5; private int m_ReleasedFrame = -5; private bool m_Pressed; public VirtualButton(string name) : this(name, true) { } public VirtualButton(string name, bool matchToInputSettings) { this.name = name; matchWithInputManager = matchToInputSettings; } // A controller gameobject should call this function when the button is pressed down public void Pressed() { if (m_Pressed) { return; } m_Pressed = true; m_LastPressedFrame = Time.frameCount; } // A controller gameobject should call this function when the button is released public void Released() { m_Pressed = false; m_ReleasedFrame = Time.frameCount; } // the controller gameobject should call Remove when the button is destroyed or disabled public void Remove() { UnRegisterVirtualButton(name); } // these are the states of the button which can be read via the cross platform input system public bool GetButton { get { return m_Pressed; } } public bool GetButtonDown { get { return m_LastPressedFrame - Time.frameCount == -1; } } public bool GetButtonUp { get { return (m_ReleasedFrame == Time.frameCount - 1); } } } } } ü˙˙CrossPlatformInputManager&UnityStandardAssets.CrossPlatformInputAssembly-CSharp-firstpass.dll