a#­5.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Ż­ĹŇH"öťúIžTńÁ“ Ś>Assets/Standard Assets/CrossPlatformInput/Scripts/TiltInput.csNotFully Implementedü TiltInputusing System; using UnityEngine; #if UNITY_EDITOR using UnityEditor; #endif namespace UnityStandardAssets.CrossPlatformInput { // helps with managing tilt input on mobile devices public class TiltInput : MonoBehaviour { // options for the various orientations public enum AxisOptions { ForwardAxis, SidewaysAxis, } [Serializable] public class AxisMapping { public enum MappingType { NamedAxis, MousePositionX, MousePositionY, MousePositionZ }; public MappingType type; public string axisName; } public AxisMapping mapping; public AxisOptions tiltAroundAxis = AxisOptions.ForwardAxis; public float fullTiltAngle = 25; public float centreAngleOffset = 0; private CrossPlatformInputManager.VirtualAxis m_SteerAxis; private void OnEnable() { if (mapping.type == AxisMapping.MappingType.NamedAxis) { m_SteerAxis = new CrossPlatformInputManager.VirtualAxis(mapping.axisName); CrossPlatformInputManager.RegisterVirtualAxis(m_SteerAxis); } } private void Update() { float angle = 0; if (Input.acceleration != Vector3.zero) { switch (tiltAroundAxis) { case AxisOptions.ForwardAxis: angle = Mathf.Atan2(Input.acceleration.x, -Input.acceleration.y)*Mathf.Rad2Deg + centreAngleOffset; break; case AxisOptions.SidewaysAxis: angle = Mathf.Atan2(Input.acceleration.z, -Input.acceleration.y)*Mathf.Rad2Deg + centreAngleOffset; break; } } float axisValue = Mathf.InverseLerp(-fullTiltAngle, fullTiltAngle, angle)*2 - 1; switch (mapping.type) { case AxisMapping.MappingType.NamedAxis: m_SteerAxis.Update(axisValue); break; case AxisMapping.MappingType.MousePositionX: CrossPlatformInputManager.SetVirtualMousePositionX(axisValue*Screen.width); break; case AxisMapping.MappingType.MousePositionY: CrossPlatformInputManager.SetVirtualMousePositionY(axisValue*Screen.width); break; case AxisMapping.MappingType.MousePositionZ: CrossPlatformInputManager.SetVirtualMousePositionZ(axisValue*Screen.width); break; } } private void OnDisable() { m_SteerAxis.Remove(); } } } namespace UnityStandardAssets.CrossPlatformInput.Inspector { #if UNITY_EDITOR [CustomPropertyDrawer(typeof (TiltInput.AxisMapping))] public class TiltInputAxisStylePropertyDrawer : PropertyDrawer { public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { EditorGUI.BeginProperty(position, label, property); float x = position.x; float y = position.y; float inspectorWidth = position.width; // Don't make child fields be indented var indent = EditorGUI.indentLevel; EditorGUI.indentLevel = 0; var props = new[] {"type", "axisName"}; var widths = new[] {.4f, .6f}; if (property.FindPropertyRelative("type").enumValueIndex > 0) { // hide name if not a named axis props = new[] {"type"}; widths = new[] {1f}; } const float lineHeight = 18; for (int n = 0; n < props.Length; ++n) { float w = widths[n]*inspectorWidth; // Calculate rects Rect rect = new Rect(x, y, w, lineHeight); x += w; EditorGUI.PropertyField(rect, property.FindPropertyRelative(props[n]), GUIContent.none); } // Set indent back to what it was EditorGUI.indentLevel = indent; EditorGUI.EndProperty(); } } #endif } ü˙˙ TiltInput&UnityStandardAssets.CrossPlatformInputAssembly-CSharp-firstpass.dll