diff --git a/Assets/Scenes/BossRoom.unity b/Assets/Scenes/BossRoom.unity index 07d60f3c..42134d45 100644 --- a/Assets/Scenes/BossRoom.unity +++ b/Assets/Scenes/BossRoom.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.18194216, g: 0.2276266, b: 0.3074139, a: 1} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -2431,6 +2431,7 @@ GameObject: - component: {fileID: 279428270} - component: {fileID: 279428269} - component: {fileID: 279428268} + - component: {fileID: 279428273} m_Layer: 5 m_Name: Button4CrowForesight m_TagString: Untagged @@ -2575,6 +2576,19 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 279428266} m_CullTransparentMesh: 1 +--- !u!114 &279428273 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 279428266} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6f80d719f998a67438e69f9f995732ae, type: 3} + m_Name: + m_EditorClassIdentifier: + ButtonName: CrowsForesight --- !u!1 &283391569 GameObject: m_ObjectHideFlags: 0 @@ -2664,6 +2678,7 @@ GameObject: - component: {fileID: 308008438} - component: {fileID: 308008437} - component: {fileID: 308008436} + - component: {fileID: 308008441} m_Layer: 5 m_Name: Button5VectorFence m_TagString: Untagged @@ -2808,6 +2823,19 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 308008434} m_CullTransparentMesh: 1 +--- !u!114 &308008441 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 308008434} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6f80d719f998a67438e69f9f995732ae, type: 3} + m_Name: + m_EditorClassIdentifier: + ButtonName: VectorWall --- !u!1 &311713811 GameObject: m_ObjectHideFlags: 0 @@ -4934,6 +4962,7 @@ GameObject: - component: {fileID: 517697843} - component: {fileID: 517697842} - component: {fileID: 517697841} + - component: {fileID: 517697846} m_Layer: 5 m_Name: Button1DashnCrash m_TagString: Untagged @@ -5079,6 +5108,19 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 517697839} m_CullTransparentMesh: 1 +--- !u!114 &517697846 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 517697839} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6f80d719f998a67438e69f9f995732ae, type: 3} + m_Name: + m_EditorClassIdentifier: + ButtonName: DashNCrash --- !u!1 &520530277 GameObject: m_ObjectHideFlags: 0 @@ -5692,7 +5734,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &590786921 RectTransform: m_ObjectHideFlags: 0 @@ -7943,7 +7985,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Material: {fileID: 1102464587} m_Color: {r: 1, g: 1, b: 1, a: 0} - m_RaycastTarget: 1 + m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: @@ -15532,6 +15574,7 @@ GameObject: - component: {fileID: 795118092} - component: {fileID: 795118091} - component: {fileID: 795118090} + - component: {fileID: 795118095} m_Layer: 5 m_Name: StaminaButton m_TagString: Untagged @@ -15677,6 +15720,19 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 795118088} m_CullTransparentMesh: 1 +--- !u!114 &795118095 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 795118088} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6f80d719f998a67438e69f9f995732ae, type: 3} + m_Name: + m_EditorClassIdentifier: + ButtonName: Sprint --- !u!1 &795181664 GameObject: m_ObjectHideFlags: 0 @@ -17633,6 +17689,7 @@ GameObject: - component: {fileID: 960617635} - component: {fileID: 960617634} - component: {fileID: 960617633} + - component: {fileID: 960617638} m_Layer: 5 m_Name: Button2FreezeThrow m_TagString: Untagged @@ -17777,6 +17834,19 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 960617631} m_CullTransparentMesh: 1 +--- !u!114 &960617638 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 960617631} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6f80d719f998a67438e69f9f995732ae, type: 3} + m_Name: + m_EditorClassIdentifier: + ButtonName: FreezeThrow --- !u!1 &964267621 GameObject: m_ObjectHideFlags: 0 @@ -18499,6 +18569,7 @@ GameObject: - component: {fileID: 1008470393} - component: {fileID: 1008470392} - component: {fileID: 1008470391} + - component: {fileID: 1008470396} m_Layer: 5 m_Name: Button3Executioner m_TagString: Untagged @@ -18643,6 +18714,19 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1008470389} m_CullTransparentMesh: 1 +--- !u!114 &1008470396 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1008470389} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6f80d719f998a67438e69f9f995732ae, type: 3} + m_Name: + m_EditorClassIdentifier: + ButtonName: TheExecutioner --- !u!1 &1010981555 GameObject: m_ObjectHideFlags: 0 @@ -19128,11 +19212,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.y - value: 0.28987604 + value: 0.28987607 objectReference: {fileID: 0} - target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.z - value: -0.1815203 + value: -0.18152031 objectReference: {fileID: 0} - target: {fileID: 1676734516302391364, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_UpdateMethod @@ -19184,7 +19268,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.w - value: 0.80276686 + value: 0.8027669 objectReference: {fileID: 0} - target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.x @@ -19192,11 +19276,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.y - value: 0.2921833 + value: 0.29218328 objectReference: {fileID: 0} - target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.z - value: -0.17778286 + value: -0.17778282 objectReference: {fileID: 0} - target: {fileID: 1676734516866984540, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_VerticalDamping @@ -283073,6 +283157,7 @@ GameObject: - component: {fileID: 5277713032040811807} - component: {fileID: 571521781778937404} - component: {fileID: 3784538605243177490} + - component: {fileID: 5277713032040811808} m_Layer: 5 m_Name: Button0_Swap m_TagString: Untagged @@ -283162,6 +283247,19 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: [] +--- !u!114 &5277713032040811808 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5277713032040811801} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6f80d719f998a67438e69f9f995732ae, type: 3} + m_Name: + m_EditorClassIdentifier: + ButtonName: Swap --- !u!222 &5277713032336524600 CanvasRenderer: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Gameplay/AbilitySystem.cs b/Assets/Scripts/Gameplay/AbilitySystem.cs index d83e9a40..70a91980 100644 --- a/Assets/Scripts/Gameplay/AbilitySystem.cs +++ b/Assets/Scripts/Gameplay/AbilitySystem.cs @@ -7,7 +7,6 @@ using Unity.Multiplayer.Samples.BossRoom; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; -//using static Codice.Client.Common.WebApi.WebApiEndpoints; public class AbilitySystem : NetworkBehaviour { @@ -17,7 +16,7 @@ public class AbilitySystem : NetworkBehaviour public AbilityUI[] abilitiesUI; private Ability activeAbility; - private bool isAbilityActive = false; + public bool isAbilityActive = false; private HashSet abilitiesOnCooldown = new HashSet(); [SerializeField] private GameObject currentAbilityIndicator; @@ -44,19 +43,16 @@ public class AbilitySystem : NetworkBehaviour private Vector3 executionerStartPos; private Vector3 executionerEndPos; - private void InitializeAbilityCursorMap() { abilityCursorMap = new Dictionary - { - { GameDataSource.Instance.DashNCrashAbilityKey, CursorState.Dash }, - { GameDataSource.Instance.FreezeThrowAbilityKey, CursorState.Freeze }, - { GameDataSource.Instance.VectorWallAbilityKey, CursorState.VectorWall }, - { GameDataSource.Instance.TheExecutionerKey, CursorState.Executioner }, - { GameDataSource.Instance.CrowsForesightKey, CursorState.Foresight }, - - - }; + { + { GameDataSource.Instance.DashNCrashAbilityKey, CursorState.Dash }, + { GameDataSource.Instance.FreezeThrowAbilityKey, CursorState.Freeze }, + { GameDataSource.Instance.VectorWallAbilityKey, CursorState.VectorWall }, + { GameDataSource.Instance.TheExecutionerKey, CursorState.Executioner }, + { GameDataSource.Instance.CrowsForesightKey, CursorState.Foresight }, + }; } private void Awake() { @@ -78,7 +74,8 @@ public class AbilitySystem : NetworkBehaviour GameStateManager.Instance.ChangeState(cursorState); } } - void Update() + + private void Update() { HandleAbilityMode(); } @@ -89,29 +86,47 @@ public class AbilitySystem : NetworkBehaviour { if (activeAbility.abilityKey == "VectorFence") { - //GameStateManager.Instance.ChangeState(CursorState.VectorWall); + // For VectorFence, manage wall indicator and placement ManageVectorFenceIndicator(); if (!isWallPlacementStarted) { - UpdateWallIndicatorPosition(); // Follow the mouse when ability is activated + UpdateWallIndicatorPosition(); // Follow pointer when ability is activated } +#if UNITY_ANDROID || UNITY_IOS + if (Input.touchCount > 0) + { + Touch touch = Input.GetTouch(0); + if (!isWallPlacementStarted && touch.phase == TouchPhase.Began) + { + StartWallPlacement(); + } + if (isWallPlacementStarted && (touch.phase == TouchPhase.Moved || touch.phase == TouchPhase.Stationary)) + { + RotateWallIndicator(); // Rotate while touch is moving or held + } + if (isWallPlacementStarted && touch.phase == TouchPhase.Ended) + { + UseActiveAbility(); // Place the wall when touch ends + isWallPlacementStarted = false; + } + } +#else if (Input.GetMouseButtonDown(0)) { StartWallPlacement(); } - if (Input.GetMouseButton(0) && isWallPlacementStarted) { RotateWallIndicator(); // Rotate while holding LMB } - if (Input.GetMouseButtonUp(0) && isWallPlacementStarted) { UseActiveAbility(); // Place the wall when LMB is released isWallPlacementStarted = false; } +#endif } // else if (activeAbility.abilityKey == "TheExecutioner") // { @@ -121,16 +136,26 @@ public class AbilitySystem : NetworkBehaviour { ManageStandardAbilityIndicator(); +#if UNITY_ANDROID || UNITY_IOS + if (Input.touchCount > 0) + { + Touch touch = Input.GetTouch(0); + if (touch.phase == TouchPhase.Began) + { + UseActiveAbility(); + } + } +#else if (Input.GetMouseButtonDown(0)) { UseActiveAbility(); } +#endif } } else { - - // GameStateManager.Instance.ChangeState(CursorState.Default); + // When not in ability mode, ensure indicators are hidden. DeactivateIndicators(); } } @@ -139,19 +164,50 @@ public class AbilitySystem : NetworkBehaviour { lineIndicator.gameObject.SetActive(true); +#if UNITY_ANDROID || UNITY_IOS + if (Input.touchCount > 0) + { + Touch touch = Input.GetTouch(0); + if (touch.phase == TouchPhase.Began) + { + if (Physics.Raycast(mainCamera.ScreenPointToRay(GetPointerPosition()), out var hit)) + { + executionerStartPos = hit.point; + executionerEndPos = hit.point; + lineIndicator.positionCount = 2; + lineIndicator.SetPosition(0, executionerStartPos); + lineIndicator.SetPosition(1, executionerEndPos); + } + } + if (touch.phase == TouchPhase.Moved || touch.phase == TouchPhase.Stationary) + { + if (Physics.Raycast(mainCamera.ScreenPointToRay(GetPointerPosition()), out var hit)) + { + executionerEndPos = hit.point; + lineIndicator.SetPosition(1, executionerEndPos); + } + } + if (touch.phase == TouchPhase.Ended) + { + UseActiveAbility(); + lineIndicator.positionCount = 2; + lineIndicator.SetPosition(0, Vector3.zero); + lineIndicator.SetPosition(1, Vector3.zero); + lineIndicator.gameObject.SetActive(false); + } + } +#else if (Input.GetMouseButtonDown(0)) { if (Physics.Raycast(mainCamera.ScreenPointToRay(Input.mousePosition), out var hit)) { executionerStartPos = hit.point; executionerEndPos = hit.point; - - lineIndicator.positionCount = 2; // Ensure it has enough positions before setting them + lineIndicator.positionCount = 2; lineIndicator.SetPosition(0, executionerStartPos); lineIndicator.SetPosition(1, executionerEndPos); } } - if (Input.GetMouseButton(0)) { if (Physics.Raycast(mainCamera.ScreenPointToRay(Input.mousePosition), out var hit)) @@ -160,19 +216,17 @@ public class AbilitySystem : NetworkBehaviour lineIndicator.SetPosition(1, executionerEndPos); } } - if (Input.GetMouseButtonUp(0)) { UseActiveAbility(); - - lineIndicator.positionCount = 2; // Reset to a valid number to prevent out-of-bounds errors - lineIndicator.SetPosition(0, Vector3.zero); // Reset positions to avoid old values + lineIndicator.positionCount = 2; + lineIndicator.SetPosition(0, Vector3.zero); lineIndicator.SetPosition(1, Vector3.zero); lineIndicator.gameObject.SetActive(false); } +#endif } - private void ManageVectorFenceIndicator() { if (wallIndicator != null) @@ -190,9 +244,9 @@ public class AbilitySystem : NetworkBehaviour private void UpdateWallIndicatorPosition() { - if (Physics.Raycast(mainCamera.ScreenPointToRay(Input.mousePosition), out RaycastHit hit)) + if (Physics.Raycast(mainCamera.ScreenPointToRay(GetPointerPosition()), out RaycastHit hit)) { - //wallIndicator.transform.position = hit.point; // Update position to follow the mouse + // Update position to follow the pointer (only XZ plane) wallIndicator.transform.position = new Vector3(hit.point.x, 0, hit.point.z); isValidPlacement = IsPlacementValid(hit.point, wallIndicator.transform.rotation, playerLayer); } @@ -200,29 +254,28 @@ public class AbilitySystem : NetworkBehaviour private void StartWallPlacement() { - if (Physics.Raycast(mainCamera.ScreenPointToRay(Input.mousePosition), out RaycastHit hit)) + if (Physics.Raycast(mainCamera.ScreenPointToRay(GetPointerPosition()), out RaycastHit hit)) { wallSpawnPosition = new Vector3(hit.point.x, 0, hit.point.z); // Save spawn position - initialMousePosition = Input.mousePosition; // Store the initial mouse position on click + initialMousePosition = GetPointerPosition(); // Store the initial pointer position on click isWallPlacementStarted = true; Debug.Log($"[AbilitySystem] Wall placement started at {wallSpawnPosition}"); - } } private void RotateWallIndicator() { if (isWallPlacementStarted && wallIndicator != null) { - // Get the current mouse position in screen space - Vector3 currentMousePosition = Input.mousePosition; + // Get the current pointer position + Vector3 currentPointerPosition = GetPointerPosition(); - // Calculate the distance the mouse has moved since the initial click - float mouseDistance = Vector3.Distance(initialMousePosition, currentMousePosition); + // Calculate the distance the pointer has moved since the initial press + float pointerDistance = Vector3.Distance(initialMousePosition, currentPointerPosition); // Check if the movement exceeds the threshold - if (mouseDistance >= mouseMoveThreshold) + if (pointerDistance >= mouseMoveThreshold) { - Ray ray = mainCamera.ScreenPointToRay(currentMousePosition); + Ray ray = mainCamera.ScreenPointToRay(currentPointerPosition); if (Physics.Raycast(ray, out RaycastHit hit)) { Vector3 direction = (new Vector3(hit.point.x, 0, hit.point.z) - wallIndicator.transform.position).normalized; @@ -232,26 +285,20 @@ public class AbilitySystem : NetworkBehaviour wallIndicator.transform.rotation = Quaternion.Lerp(wallIndicator.transform.rotation, targetRotation, 0.5f); isValidPlacement = IsPlacementValid(wallIndicator.transform.position, wallIndicator.transform.rotation, playerLayer); - } } } } - private bool IsPlacementValid(Vector3 position, Quaternion rotation, LayerMask layerMask) { - // Perform overlap check after applying rotation Vector3 halfExtents = new Vector3( wallIndicator.transform.localScale.x / 2f, wallIndicator.transform.localScale.y / 2f, wallIndicator.transform.localScale.z / 2f ); - // Perform a CheckBox for the given parameters bool isOverlap = Physics.CheckBox(position, halfExtents, rotation, layerMask); - - return !isOverlap; // Return true if valid placement (no overlap) } @@ -289,13 +336,13 @@ public class AbilitySystem : NetworkBehaviour } else { - ToggleAbilityMode(ability,key); + ToggleAbilityMode(ability, key); } } public bool IsAbilityModeActive() => isAbilityActive; - private void ToggleAbilityMode(Ability ability,string abilitykey) + private void ToggleAbilityMode(Ability ability, string abilityKey) { if (isAbilityActive && activeAbility == ability) { @@ -304,7 +351,7 @@ public class AbilitySystem : NetworkBehaviour else { ActivateAbilityMode(ability); - UpdateCursorState(abilitykey); + UpdateCursorState(abilityKey); } } @@ -329,13 +376,11 @@ public class AbilitySystem : NetworkBehaviour private bool IsPlacementWithinRadius(Vector3 targetPosition) { - float placementRadius = activeAbility.abilityApplicationRadius; // Fetch radius from the active ability + float placementRadius = activeAbility.abilityApplicationRadius; float distance = Vector3.Distance(transform.position, targetPosition); - return distance <= placementRadius; } - public void UseActiveAbility() { if (activeAbility == null) return; @@ -352,7 +397,7 @@ public class AbilitySystem : NetworkBehaviour { GameObject indicator = activeAbility.abilityKey == "VectorFence" ? wallIndicator : currentAbilityIndicator; startPosition = indicator.transform.position; - direction = indicator.transform.rotation.eulerAngles; + direction = indicator.transform.forward; } if (!IsPlacementWithinRadius(startPosition)) @@ -422,7 +467,7 @@ public class AbilitySystem : NetworkBehaviour private void UpdateIndicatorPosition() { - if (Physics.Raycast(mainCamera.ScreenPointToRay(Input.mousePosition), out RaycastHit hit)) + if (Physics.Raycast(mainCamera.ScreenPointToRay(GetPointerPosition()), out RaycastHit hit)) { currentAbilityIndicator.transform.position = new Vector3(hit.point.x, 0, hit.point.z); currentAbilityIndicator.transform.localScale = Vector3.one * activeAbility.abilityRadius; @@ -440,7 +485,21 @@ public class AbilitySystem : NetworkBehaviour } else { - Debug.Log($"InitiateGlobalCooldown: Count find ability: {abilityKey}"); + Debug.Log($"InitiateGlobalCooldown: Could not find ability: {abilityKey}"); + } + } + + // Helper method to get the current pointer position based on platform + private Vector3 GetPointerPosition() + { +#if UNITY_ANDROID || UNITY_IOS + if (Input.touchCount > 0) + { + return Input.GetTouch(0).position; } + return Vector3.zero; +#else + return Input.mousePosition; +#endif } } diff --git a/Assets/Scripts/Gameplay/CNControls.meta b/Assets/Scripts/Gameplay/CNControls.meta new file mode 100644 index 00000000..f14a4ee0 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 96db2d7213172bb4d9afda66fd7b30a0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Editor.meta b/Assets/Scripts/Gameplay/CNControls/Editor.meta new file mode 100644 index 00000000..b4e65bb5 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d4d057ffeded3364d979f745117ae501 +folderAsset: yes +timeCreated: 1471342548 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Editor/AdditionaHelpingGuidance.cs b/Assets/Scripts/Gameplay/CNControls/Editor/AdditionaHelpingGuidance.cs new file mode 100644 index 00000000..ea4a24b3 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Editor/AdditionaHelpingGuidance.cs @@ -0,0 +1,56 @@ +#if UNITY_EDITOR +using System; +using System.Linq; +using System.Reflection; +using UnityEngine; +using UnityEditor; +using UnityEngine.EventSystems; +using Object = UnityEngine.Object; + +namespace CnControls +{ + /// + /// Some helping and guiding info trying to fix some common CNControls setup mistakes + /// + [InitializeOnLoad] + public class AdditionaHelpingGuidance + { + static AdditionaHelpingGuidance() + { + EditorApplication.playmodeStateChanged += PlaymodeStateChanged; + } + + private static void PlaymodeStateChanged() + { + // If we've just changed our mode to a playmode + if (EditorApplication.isPlaying && EditorApplication.isPlayingOrWillChangePlaymode) + { + var types = from t in Assembly.GetAssembly(typeof(SimpleButton)).GetTypes() + where + t.IsClass + && t.Namespace == "CnControls" + && t.IsSubclassOf(typeof(MonoBehaviour)) + select t; + + // If there are any CnControls on the scene + bool shouldCheckForErrors = types.Any(type => Object.FindObjectOfType(type)); + + if (shouldCheckForErrors) + { + CheckForEventSystemPresence(); + } + } + } + + private static void CheckForEventSystemPresence() + { + var eventSystem = Object.FindObjectOfType(); + + if (eventSystem == null) + { + ErrorPopupWindow.ShowWindow(); + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/CNControls/Editor/AdditionaHelpingGuidance.cs.meta b/Assets/Scripts/Gameplay/CNControls/Editor/AdditionaHelpingGuidance.cs.meta new file mode 100644 index 00000000..fa92af4d --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Editor/AdditionaHelpingGuidance.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: de2fdbbbfd047264c838afb6aa9e0c4d +timeCreated: 1471342566 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Editor/ErrorPopupWindow.cs b/Assets/Scripts/Gameplay/CNControls/Editor/ErrorPopupWindow.cs new file mode 100644 index 00000000..98b858fb --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Editor/ErrorPopupWindow.cs @@ -0,0 +1,54 @@ +#if UNITY_EDITOR +using UnityEngine; +using UnityEditor; +using UnityEngine.EventSystems; + +namespace CnControls +{ + public class ErrorPopupWindow : EditorWindow + { + public static void ShowWindow() + { + var window = EditorWindow.GetWindow(); + window.position = new Rect(Screen.width / 2f, Screen.height / 2f, 250, 133); + window.titleContent = new GUIContent("ERROR"); + } + + void OnGUI() + { + EditorGUILayout.LabelField( + "There's no EventSystem object in your scene (or it is disabled), CnControls won't work. Please add one using GameObject -> UI -> Event System menu or push the button below", + EditorStyles.wordWrappedLabel); + + GUILayout.Space(12); + if (GUILayout.Button("Create now!")) + { + EditorApplication.isPlaying = false; + + EditorApplication.playmodeStateChanged += OnPlaymodeChanged; + } + + GUILayout.Space(6); + + if (GUILayout.Button("Close this window")) + { + Close(); + } + } + + private void OnPlaymodeChanged() + { + if (!EditorApplication.isPlaying && !EditorApplication.isPlayingOrWillChangePlaymode) + { + EditorApplication.playmodeStateChanged -= OnPlaymodeChanged; + + var eventSystemGo = new GameObject("EventSystem"); + eventSystemGo.AddComponent(); + eventSystemGo.AddComponent(); + + Close(); + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/CNControls/Editor/ErrorPopupWindow.cs.meta b/Assets/Scripts/Gameplay/CNControls/Editor/ErrorPopupWindow.cs.meta new file mode 100644 index 00000000..2b99c300 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Editor/ErrorPopupWindow.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0f2cbf6df83c52e44a58a474d14696bb +timeCreated: 1471371441 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples.meta b/Assets/Scripts/Gameplay/CNControls/Examples.meta new file mode 100644 index 00000000..b6e8c68d --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 73bc353377863994c95e42f3712a5869 +folderAsset: yes +timeCreated: 1471272981 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes.meta new file mode 100644 index 00000000..e51d746f --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c17a05ce6e99c0c488bc748574cc5ef9 +folderAsset: yes +timeCreated: 1471272981 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D.meta new file mode 100644 index 00000000..51ed3c15 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d0ae7bc5c14713440a8c655211e93032 +folderAsset: yes +timeCreated: 1471272982 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D.unity b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D.unity new file mode 100644 index 00000000..2dfc3338 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D.unity @@ -0,0 +1,2319 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +SceneSettings: + m_ObjectHideFlags: 0 + m_PVSData: + m_PVSObjectsArray: [] + m_PVSPortalsArray: [] + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 6 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 6 + m_GIWorkflowMode: 1 + m_LightmapsMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 3 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AOMaxDistance: 1 + m_Padding: 2 + m_CompAOExponent: 0 + m_LightmapParameters: {fileID: 0} + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_LightingDataAsset: {fileID: 0} + m_RuntimeCPUUsage: 25 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + accuratePlacement: 0 + minRegionArea: 2 + cellSize: 0.16666666 + manualCellSize: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &74675234 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 74675238} + - 212: {fileID: 74675237} + - 61: {fileID: 74675236} + - 50: {fileID: 74675235} + m_Layer: 1 + m_Name: boxCrate_double (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!50 &74675235 +Rigidbody2D: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 74675234} + m_UseAutoMass: 0 + m_Mass: 10 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!61 &74675236 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 74675234} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0} + serializedVersion: 2 + m_Size: {x: 1.28, y: 1.28} +--- !u!212 &74675237 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 74675234} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 4 + m_Sprite: {fileID: 21300000, guid: ee8739f042e99cf4598897d7c9f2ac78, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!4 &74675238 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 74675234} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 3.55, y: 0.51, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 623172105} + m_RootOrder: 0 +--- !u!1 &115822836 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 115822838} + - 212: {fileID: 115822837} + m_Layer: 0 + m_Name: blue_grass (1) 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!212 &115822837 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 115822836} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 1 + m_Sprite: {fileID: 21300000, guid: 664008e3f37538b43bcf3c85cb63eb25, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!4 &115822838 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 115822836} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 14.72, y: 0.03, z: 10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1211950371} + m_RootOrder: 2 +--- !u!1 &129731923 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 129731924} + - 223: {fileID: 129731927} + - 114: {fileID: 129731926} + - 114: {fileID: 129731925} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &129731924 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 129731923} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 785156712} + - {fileID: 1315479832} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!114 &129731925 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 129731923} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &129731926 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 129731923} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 480} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &129731927 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 129731923} + m_Enabled: 1 + serializedVersion: 2 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!1 &152223554 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 152223555} + - 212: {fileID: 152223557} + - 61: {fileID: 152223556} + m_Layer: 1 + m_Name: grassHalf_mid (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &152223555 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 152223554} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -6.74, y: -2.55, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 308732209} + m_RootOrder: 3 +--- !u!61 &152223556 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 152223554} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0.27382135} + serializedVersion: 2 + m_Size: {x: 1.28, y: 0.732358} +--- !u!212 &152223557 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 152223554} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: 9cdcdb98dee6b4b40a82d7e9cff8fa8b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &209439710 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 209439711} + - 61: {fileID: 209439713} + - 114: {fileID: 209439712} + m_Layer: 1 + m_Name: Restarter + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &209439711 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 209439710} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -5.31, y: -11.4, z: 0} + m_LocalScale: {x: 1, y: 8.3779125, z: 1} + m_Children: [] + m_Father: {fileID: 308732209} + m_RootOrder: 12 +--- !u!114 &209439712 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 209439710} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e053b0a94752146e79954ce4df1b5565, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!61 &209439713 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 209439710} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_UsedByEffector: 0 + m_Offset: {x: 0.86693573, y: 0.52536076} + serializedVersion: 2 + m_Size: {x: 141.15666, y: 0.22927819} +--- !u!1001 &278910591 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 129731924} + m_Modifications: + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_SizeDelta.x + value: 194.900024 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_SizeDelta.y + value: 185.699997 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 5cd0f2565c094c14c89345b5d6081634, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &299949817 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 299949820} + - 212: {fileID: 299949819} + - 61: {fileID: 299949818} + m_Layer: 1 + m_Name: grassHalf_mid + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!61 &299949818 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 299949817} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0.27382135} + serializedVersion: 2 + m_Size: {x: 1.28, y: 0.732358} +--- !u!212 &299949819 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 299949817} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: 9cdcdb98dee6b4b40a82d7e9cff8fa8b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!4 &299949820 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 299949817} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -10.58, y: -2.55, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 308732209} + m_RootOrder: 0 +--- !u!1 &308732208 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 308732209} + m_Layer: 1 + m_Name: Ground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &308732209 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 308732208} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 4.4, y: 0.34, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 299949820} + - {fileID: 491082807} + - {fileID: 1753342301} + - {fileID: 152223555} + - {fileID: 632600205} + - {fileID: 762909389} + - {fileID: 1953868706} + - {fileID: 1802928801} + - {fileID: 690007305} + - {fileID: 989402237} + - {fileID: 689995383} + - {fileID: 950005445} + - {fileID: 209439711} + m_Father: {fileID: 0} + m_RootOrder: 1 +--- !u!1 &448351660 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 169500, guid: 1533e3cbd3874cb49963f3ef4fbba830, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1040339737} + - 212: {fileID: 448351666} + - 58: {fileID: 448351665} + - 50: {fileID: 448351664} + - 95: {fileID: 448351663} + - 114: {fileID: 448351662} + - 114: {fileID: 448351661} + m_Layer: 0 + m_Name: Alien + m_TagString: Player + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &448351661 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11415998, guid: 1533e3cbd3874cb49963f3ef4fbba830, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 448351660} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: faa4c921e52aa4c4892eeed83f878356, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &448351662 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11466618, guid: 1533e3cbd3874cb49963f3ef4fbba830, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 448351660} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d08f91df3bd212f429df17f53ce2f364, type: 3} + m_Name: + m_EditorClassIdentifier: + m_MaxSpeed: 10 + m_JumpForce: 400 + m_AirControl: 0 + m_WhatIsGround: + serializedVersion: 2 + m_Bits: 2 +--- !u!95 &448351663 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 9512448, guid: 1533e3cbd3874cb49963f3ef4fbba830, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 448351660} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 99ca6413d98ec0847bc752657029ca07, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 +--- !u!50 &448351664 +Rigidbody2D: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 5086142, guid: 1533e3cbd3874cb49963f3ef4fbba830, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 448351660} + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 4 +--- !u!58 &448351665 +CircleCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 5804744, guid: 1533e3cbd3874cb49963f3ef4fbba830, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 448351660} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: -0.66} + serializedVersion: 2 + m_Radius: 0.6495655 +--- !u!212 &448351666 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 21299612, guid: 1533e3cbd3874cb49963f3ef4fbba830, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 448351660} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: 67eb7e5c33fae9e458ac43dc2fcaedaa, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &491082806 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 491082807} + - 212: {fileID: 491082809} + - 61: {fileID: 491082808} + m_Layer: 1 + m_Name: grassHalf_mid (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &491082807 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 491082806} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -9.3, y: -2.55, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 308732209} + m_RootOrder: 1 +--- !u!61 &491082808 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 491082806} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0.27382135} + serializedVersion: 2 + m_Size: {x: 1.28, y: 0.732358} +--- !u!212 &491082809 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 491082806} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: 9cdcdb98dee6b4b40a82d7e9cff8fa8b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &517168451 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 517168454} + - 114: {fileID: 517168453} + - 114: {fileID: 517168452} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &517168452 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 517168451} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &517168453 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 517168451} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &517168454 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 517168451} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 +--- !u!1 &623172104 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 623172105} + m_Layer: 1 + m_Name: Crates + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &623172105 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 623172104} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 74675238} + - {fileID: 752394290} + - {fileID: 1123657405} + - {fileID: 1956271411} + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!1 &632600204 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 632600205} + - 212: {fileID: 632600207} + - 61: {fileID: 632600206} + m_Layer: 1 + m_Name: grassHalf_mid (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &632600205 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 632600204} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -5.46, y: -2.55, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 308732209} + m_RootOrder: 4 +--- !u!61 &632600206 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 632600204} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0.27382135} + serializedVersion: 2 + m_Size: {x: 1.28, y: 0.732358} +--- !u!212 &632600207 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 632600204} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: 9cdcdb98dee6b4b40a82d7e9cff8fa8b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &689995382 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 689995383} + - 212: {fileID: 689995385} + - 61: {fileID: 689995384} + m_Layer: 1 + m_Name: grassHalf_mid (10) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &689995383 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 689995382} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 2.22, y: -2.55, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 308732209} + m_RootOrder: 10 +--- !u!61 &689995384 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 689995382} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0.27382135} + serializedVersion: 2 + m_Size: {x: 1.28, y: 0.732358} +--- !u!212 &689995385 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 689995382} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: 3950b0d7c2916084f8be9d9b9593ee5a, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &690007304 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 690007305} + - 212: {fileID: 690007307} + - 61: {fileID: 690007306} + m_Layer: 1 + m_Name: grassHalf_mid (8) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &690007305 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 690007304} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.34, y: -2.55, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 308732209} + m_RootOrder: 8 +--- !u!61 &690007306 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 690007304} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0.27382135} + serializedVersion: 2 + m_Size: {x: 1.28, y: 0.732358} +--- !u!212 &690007307 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 690007304} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: 9cdcdb98dee6b4b40a82d7e9cff8fa8b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &752394289 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 752394290} + - 212: {fileID: 752394293} + - 61: {fileID: 752394292} + - 50: {fileID: 752394291} + m_Layer: 1 + m_Name: boxCrate_double (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &752394290 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 752394289} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 4.36, y: -0.84, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 623172105} + m_RootOrder: 1 +--- !u!50 &752394291 +Rigidbody2D: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 752394289} + m_UseAutoMass: 0 + m_Mass: 10 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!61 &752394292 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 752394289} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0} + serializedVersion: 2 + m_Size: {x: 1.28, y: 1.28} +--- !u!212 &752394293 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 752394289} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 4 + m_Sprite: {fileID: 21300000, guid: ee8739f042e99cf4598897d7c9f2ac78, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &762909388 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 762909389} + - 212: {fileID: 762909391} + - 61: {fileID: 762909390} + m_Layer: 1 + m_Name: grassHalf_mid (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &762909389 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 762909388} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.18, y: -2.55, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 308732209} + m_RootOrder: 5 +--- !u!61 &762909390 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 762909388} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0.27382135} + serializedVersion: 2 + m_Size: {x: 1.28, y: 0.732358} +--- !u!212 &762909391 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 762909388} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: 9cdcdb98dee6b4b40a82d7e9cff8fa8b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &775151539 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 775151540} + - 212: {fileID: 775151541} + m_Layer: 0 + m_Name: blue_grass 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &775151540 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 775151539} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -16, y: 0.03, z: 10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1211950371} + m_RootOrder: 3 +--- !u!212 &775151541 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 775151539} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 1 + m_Sprite: {fileID: 21300000, guid: 664008e3f37538b43bcf3c85cb63eb25, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!224 &785156712 stripped +RectTransform: + m_PrefabParentObject: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, + type: 2} + m_PrefabInternal: {fileID: 1083821418} +--- !u!1 &950005444 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 950005445} + - 212: {fileID: 950005447} + - 61: {fileID: 950005446} + m_Layer: 1 + m_Name: grassHalf_mid (11) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &950005445 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 950005444} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -11.86, y: -2.55, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 308732209} + m_RootOrder: 11 +--- !u!61 &950005446 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 950005444} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0.27382135} + serializedVersion: 2 + m_Size: {x: 1.28, y: 0.732358} +--- !u!212 &950005447 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 950005444} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: f53852f4446afe347b4c9ea54202a3d6, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &989402236 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 989402237} + - 212: {fileID: 989402239} + - 61: {fileID: 989402238} + m_Layer: 1 + m_Name: grassHalf_mid (9) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &989402237 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 989402236} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.94, y: -2.55, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 308732209} + m_RootOrder: 9 +--- !u!61 &989402238 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 989402236} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0.27382135} + serializedVersion: 2 + m_Size: {x: 1.28, y: 0.732358} +--- !u!212 &989402239 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 989402236} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: 9cdcdb98dee6b4b40a82d7e9cff8fa8b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!4 &1040339737 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 471762, guid: 1533e3cbd3874cb49963f3ef4fbba830, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 448351660} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -2.78, y: -0.29, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1616144789} + - {fileID: 1535860039} + m_Father: {fileID: 0} + m_RootOrder: 3 +--- !u!1001 &1083821418 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 129731924} + m_Modifications: + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_AnchoredPosition.x + value: -21.7800007 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_AnchoredPosition.y + value: 24.0300007 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_SizeDelta.x + value: 64 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_SizeDelta.y + value: 64 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_AnchorMin.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_Pivot.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22409286, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 81acfa4b78dfa47499a6c2fd6e521ebd, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &1123657404 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1123657405} + - 212: {fileID: 1123657408} + - 61: {fileID: 1123657407} + - 50: {fileID: 1123657406} + m_Layer: 1 + m_Name: boxCrate_double + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1123657405 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1123657404} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 2.96, y: -0.84, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 623172105} + m_RootOrder: 2 +--- !u!50 &1123657406 +Rigidbody2D: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1123657404} + m_UseAutoMass: 0 + m_Mass: 10 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!61 &1123657407 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1123657404} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0} + serializedVersion: 2 + m_Size: {x: 1.28, y: 1.28} +--- !u!212 &1123657408 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1123657404} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 4 + m_Sprite: {fileID: 21300000, guid: ee8739f042e99cf4598897d7c9f2ac78, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &1211950366 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1211950371} + - 20: {fileID: 1211950370} + - 92: {fileID: 1211950369} + - 124: {fileID: 1211950368} + - 81: {fileID: 1211950367} + - 114: {fileID: 1211950372} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1211950367 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1211950366} + m_Enabled: 1 +--- !u!124 &1211950368 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1211950366} + m_Enabled: 1 +--- !u!92 &1211950369 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1211950366} + m_Enabled: 1 +--- !u!20 &1211950370 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1211950366} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &1211950371 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1211950366} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1535694299} + - {fileID: 2006927478} + - {fileID: 115822838} + - {fileID: 775151540} + m_Father: {fileID: 0} + m_RootOrder: 2 +--- !u!114 &1211950372 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1211950366} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5d8238cc53530b64fbb7828c3d3bb591, type: 3} + m_Name: + m_EditorClassIdentifier: + target: {fileID: 1040339737} + damping: 1 + lookAheadFactor: 3 + lookAheadReturnSpeed: 0.5 + lookAheadMoveThreshold: 0.1 +--- !u!224 &1315479832 stripped +RectTransform: + m_PrefabParentObject: {fileID: 22493834, guid: 5cd0f2565c094c14c89345b5d6081634, + type: 2} + m_PrefabInternal: {fileID: 278910591} +--- !u!1 &1535694298 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1535694299} + - 212: {fileID: 1535694300} + m_Layer: 0 + m_Name: blue_grass (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1535694299 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1535694298} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 4.48, y: 0.029999971, z: 10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1211950371} + m_RootOrder: 0 +--- !u!212 &1535694300 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1535694298} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 1 + m_Sprite: {fileID: 21300000, guid: 664008e3f37538b43bcf3c85cb63eb25, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &1535860038 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 172026, guid: 1533e3cbd3874cb49963f3ef4fbba830, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1535860039} + m_Layer: 0 + m_Name: CeilingCheck + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1535860039 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 470258, guid: 1533e3cbd3874cb49963f3ef4fbba830, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1535860038} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.174, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1040339737} + m_RootOrder: 1 +--- !u!1 &1616144788 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 187154, guid: 1533e3cbd3874cb49963f3ef4fbba830, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1616144789} + m_Layer: 0 + m_Name: GroundCheck + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1616144789 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 433672, guid: 1533e3cbd3874cb49963f3ef4fbba830, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1616144788} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -1.271, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1040339737} + m_RootOrder: 0 +--- !u!1 &1753342300 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1753342301} + - 212: {fileID: 1753342303} + - 61: {fileID: 1753342302} + m_Layer: 1 + m_Name: grassHalf_mid (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1753342301 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1753342300} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -8.02, y: -2.55, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 308732209} + m_RootOrder: 2 +--- !u!61 &1753342302 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1753342300} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0.27382135} + serializedVersion: 2 + m_Size: {x: 1.28, y: 0.732358} +--- !u!212 &1753342303 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1753342300} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: 9cdcdb98dee6b4b40a82d7e9cff8fa8b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &1802928800 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1802928801} + - 212: {fileID: 1802928803} + - 61: {fileID: 1802928802} + m_Layer: 1 + m_Name: grassHalf_mid (7) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1802928801 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1802928800} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1.62, y: -2.55, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 308732209} + m_RootOrder: 7 +--- !u!61 &1802928802 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1802928800} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0.27382135} + serializedVersion: 2 + m_Size: {x: 1.28, y: 0.732358} +--- !u!212 &1802928803 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1802928800} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: 9cdcdb98dee6b4b40a82d7e9cff8fa8b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &1953868705 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1953868706} + - 212: {fileID: 1953868708} + - 61: {fileID: 1953868707} + m_Layer: 1 + m_Name: grassHalf_mid (6) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1953868706 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1953868705} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -2.9, y: -2.55, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 308732209} + m_RootOrder: 6 +--- !u!61 &1953868707 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1953868705} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0.27382135} + serializedVersion: 2 + m_Size: {x: 1.28, y: 0.732358} +--- !u!212 &1953868708 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1953868705} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: 9cdcdb98dee6b4b40a82d7e9cff8fa8b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &1956271410 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1956271411} + - 212: {fileID: 1956271414} + - 61: {fileID: 1956271413} + - 50: {fileID: 1956271412} + m_Layer: 1 + m_Name: boxCrate_double (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1956271411 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1956271410} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 3.63, y: 1.88, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 623172105} + m_RootOrder: 3 +--- !u!50 &1956271412 +Rigidbody2D: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1956271410} + m_UseAutoMass: 0 + m_Mass: 10 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!61 &1956271413 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1956271410} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0} + serializedVersion: 2 + m_Size: {x: 1.28, y: 1.28} +--- !u!212 &1956271414 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1956271410} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 4 + m_Sprite: {fileID: 21300000, guid: ee8739f042e99cf4598897d7c9f2ac78, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1 &2006927476 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 2006927478} + - 212: {fileID: 2006927477} + m_Layer: 0 + m_Name: blue_grass + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!212 &2006927477 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2006927476} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 1 + m_Sprite: {fileID: 21300000, guid: 664008e3f37538b43bcf3c85cb63eb25, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!4 &2006927478 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2006927476} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -5.76, y: 0.029999971, z: 10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1211950371} + m_RootOrder: 1 diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D.unity.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D.unity.meta new file mode 100644 index 00000000..75749099 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e6fabbdad66303343829c93cd507d54a +timeCreated: 1438019905 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics.meta new file mode 100644 index 00000000..81ad191f --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 781f7e60845fa6444bc8b9c1e77958b6 +folderAsset: yes +timeCreated: 1471272982 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Alien Anim Controller.controller b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Alien Anim Controller.controller new file mode 100644 index 00000000..5c0aa357 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Alien Anim Controller.controller @@ -0,0 +1,284 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Alien Anim Controller + serializedVersion: 5 + m_AnimatorParameters: + - m_Name: Speed + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 0} + - m_Name: Ground + m_Type: 4 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 0} + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 110732076} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 0} +--- !u!1101 &110106088 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: Ground + m_EventTreshold: .00999999978 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 110269928} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: .25 + m_TransitionOffset: 0 + m_ExitTime: .75 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1101 &110122226 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 2 + m_ConditionEvent: Ground + m_EventTreshold: .00999999978 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 110235344} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: .25 + m_TransitionOffset: 0 + m_ExitTime: 0 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1101 &110135298 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: Ground + m_EventTreshold: .00999999978 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 110205172} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: .25 + m_TransitionOffset: 0 + m_ExitTime: .75 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1101 &110177224 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 3 + m_ConditionEvent: Speed + m_EventTreshold: .00999999978 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 110205172} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: .25 + m_TransitionOffset: 0 + m_ExitTime: .75 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1101 &110186850 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 4 + m_ConditionEvent: Speed + m_EventTreshold: .00999999978 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 110269928} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: .25 + m_TransitionOffset: 0 + m_ExitTime: 0 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1101 &110188276 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 2 + m_ConditionEvent: Ground + m_EventTreshold: .00999999978 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 110235344} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: .25 + m_TransitionOffset: 0 + m_ExitTime: .75 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1102 &110205172 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Walk + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: 110186850} + - {fileID: 110122226} + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 88d74c17746135542ab1e2a0f0c11ba9, type: 2} + m_Tag: + m_SpeedParameter: Speed + m_MirrorParameter: + m_CycleOffsetParameter: +--- !u!1102 &110235344 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Jump + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: 110106088} + - {fileID: 110135298} + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 8c928960558a5a04bb9c4734a29e0c46, type: 2} + m_Tag: + m_SpeedParameter: Speed + m_MirrorParameter: + m_CycleOffsetParameter: +--- !u!1102 &110269928 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Stand + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: 110177224} + - {fileID: 110188276} + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 1014826b14d1e6d4eb8fd74499642f6e, type: 2} + m_Tag: + m_SpeedParameter: Speed + m_MirrorParameter: + m_CycleOffsetParameter: +--- !u!1107 &110732076 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 110269928} + m_Position: {x: 264, y: -36, z: 0} + - serializedVersion: 1 + m_State: {fileID: 110205172} + m_Position: {x: 516, y: 12, z: 0} + - serializedVersion: 1 + m_State: {fileID: 110235344} + m_Position: {x: 504, y: 144, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: + data: + first: {fileID: 110732076} + second: [] + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 110269928} diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Alien Anim Controller.controller.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Alien Anim Controller.controller.meta new file mode 100644 index 00000000..a908b644 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Alien Anim Controller.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 99ca6413d98ec0847bc752657029ca07 +timeCreated: 1438021991 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Alien.prefab b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Alien.prefab new file mode 100644 index 00000000..375de4c8 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Alien.prefab @@ -0,0 +1,212 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &169500 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 471762} + - 212: {fileID: 21299612} + - 58: {fileID: 5804744} + - 50: {fileID: 5086142} + - 95: {fileID: 9512448} + - 114: {fileID: 11466618} + - 114: {fileID: 11415998} + m_Layer: 0 + m_Name: Alien + m_TagString: Player + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &172026 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 470258} + m_Layer: 0 + m_Name: CeilingCheck + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &187154 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 433672} + m_Layer: 0 + m_Name: GroundCheck + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &433672 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 187154} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -1.271, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 471762} + m_RootOrder: 0 +--- !u!4 &470258 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 172026} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.174, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 471762} + m_RootOrder: 1 +--- !u!4 &471762 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169500} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -2.78, y: -0.29, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 433672} + - {fileID: 470258} + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!50 &5086142 +Rigidbody2D: + serializedVersion: 2 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169500} + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 4 +--- !u!58 &5804744 +CircleCollider2D: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169500} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: -0.66} + serializedVersion: 2 + m_Radius: 0.6495655 +--- !u!95 &9512448 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169500} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 99ca6413d98ec0847bc752657029ca07, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 +--- !u!114 &11415998 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169500} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c3d7b34a3bb2d4e4b926e7e729d3d410, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &11466618 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169500} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d08f91df3bd212f429df17f53ce2f364, type: 3} + m_Name: + m_EditorClassIdentifier: + m_MaxSpeed: 10 + m_JumpForce: 400 + m_AirControl: 0 + m_WhatIsGround: {} +--- !u!212 &21299612 +SpriteRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 169500} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 1 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 5 + m_Sprite: {fileID: 21300000, guid: 67eb7e5c33fae9e458ac43dc2fcaedaa, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 169500} + m_IsPrefabParent: 1 diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Alien.prefab.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Alien.prefab.meta new file mode 100644 index 00000000..0666a1dc --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Alien.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1533e3cbd3874cb49963f3ef4fbba830 +timeCreated: 1438022051 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Jump.anim b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Jump.anim new file mode 100644 index 00000000..1f75092e --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Jump.anim @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Jump + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: 21300000, guid: 59b0db6244e9f0e4cbb75d49b2a65bbe, type: 3} + attribute: m_Sprite + path: + classID: 212 + script: {fileID: 0} + m_SampleRate: 1 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - path: 0 + attribute: 0 + script: {fileID: 0} + classID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: 21300000, guid: 59b0db6244e9f0e4cbb75d49b2a65bbe, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_GenerateMotionCurves: 0 + m_Events: [] diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Jump.anim.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Jump.anim.meta new file mode 100644 index 00000000..9e11a92e --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Jump.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8c928960558a5a04bb9c4734a29e0c46 +timeCreated: 1438022038 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Stand.anim b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Stand.anim new file mode 100644 index 00000000..88652008 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Stand.anim @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Stand + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: 21300000, guid: 67eb7e5c33fae9e458ac43dc2fcaedaa, type: 3} + attribute: m_Sprite + path: + classID: 212 + script: {fileID: 0} + m_SampleRate: 1 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - path: 0 + attribute: 0 + script: {fileID: 0} + classID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: 21300000, guid: 67eb7e5c33fae9e458ac43dc2fcaedaa, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_GenerateMotionCurves: 0 + m_Events: [] diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Stand.anim.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Stand.anim.meta new file mode 100644 index 00000000..148d45bc --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Stand.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1014826b14d1e6d4eb8fd74499642f6e +timeCreated: 1438021990 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Walk.anim b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Walk.anim new file mode 100644 index 00000000..aa4e08e5 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Walk.anim @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Walk + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: 21300000, guid: 9d04b178abd2fdf4fbda646f08daad4a, type: 3} + - time: .125 + value: {fileID: 21300000, guid: 93f12b17172571b4cafd7fbea9093de5, type: 3} + attribute: m_Sprite + path: + classID: 212 + script: {fileID: 0} + m_SampleRate: 8 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - path: 0 + attribute: 0 + script: {fileID: 0} + classID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: 21300000, guid: 9d04b178abd2fdf4fbda646f08daad4a, type: 3} + - {fileID: 21300000, guid: 93f12b17172571b4cafd7fbea9093de5, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_StartTime: 0 + m_StopTime: .25 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_GenerateMotionCurves: 0 + m_Events: [] diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Walk.anim.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Walk.anim.meta new file mode 100644 index 00000000..09ea88fc --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/Walk.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 88d74c17746135542ab1e2a0f0c11ba9 +timeCreated: 1438022004 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_jump.png b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_jump.png new file mode 100644 index 00000000..5a74c7ae Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_jump.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_jump.png.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_jump.png.meta new file mode 100644 index 00000000..c464e80d --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_jump.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 59b0db6244e9f0e4cbb75d49b2a65bbe +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_stand.png b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_stand.png new file mode 100644 index 00000000..51fcef98 Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_stand.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_stand.png.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_stand.png.meta new file mode 100644 index 00000000..59f13547 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_stand.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 67eb7e5c33fae9e458ac43dc2fcaedaa +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_walk1.png b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_walk1.png new file mode 100644 index 00000000..3fb7fbf6 Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_walk1.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_walk1.png.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_walk1.png.meta new file mode 100644 index 00000000..cfc19c9c --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_walk1.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 9d04b178abd2fdf4fbda646f08daad4a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_walk2.png b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_walk2.png new file mode 100644 index 00000000..464c9100 Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_walk2.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_walk2.png.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_walk2.png.meta new file mode 100644 index 00000000..04a06e49 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Character Graphics/alienGreen_walk2.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 93f12b17172571b4cafd7fbea9093de5 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground.meta new file mode 100644 index 00000000..6f74d5ff --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bae0b59a2c825be4788de7ab461286c0 +folderAsset: yes +timeCreated: 1471272982 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/boxCrate_double.png b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/boxCrate_double.png new file mode 100644 index 00000000..86ed1331 Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/boxCrate_double.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/boxCrate_double.png.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/boxCrate_double.png.meta new file mode 100644 index 00000000..4b01b719 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/boxCrate_double.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: ee8739f042e99cf4598897d7c9f2ac78 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/colored_grass.png b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/colored_grass.png new file mode 100644 index 00000000..8469d4ae Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/colored_grass.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/colored_grass.png.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/colored_grass.png.meta new file mode 100644 index 00000000..32378e86 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/colored_grass.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 664008e3f37538b43bcf3c85cb63eb25 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_left.png b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_left.png new file mode 100644 index 00000000..0ac58a9e Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_left.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_left.png.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_left.png.meta new file mode 100644 index 00000000..5d94401b --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_left.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: f53852f4446afe347b4c9ea54202a3d6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_mid.png b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_mid.png new file mode 100644 index 00000000..f1cd7c1a Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_mid.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_mid.png.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_mid.png.meta new file mode 100644 index 00000000..aecb1a1f --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_mid.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 9cdcdb98dee6b4b40a82d7e9cff8fa8b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_right.png b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_right.png new file mode 100644 index 00000000..4b65788d Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_right.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_right.png.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_right.png.meta new file mode 100644 index 00000000..73748ab5 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Ground/grassHalf_right.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 3950b0d7c2916084f8be9d9b9593ee5a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts.meta new file mode 100644 index 00000000..60d8abcd --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9ad731d04a25b38429839a27334d916f +folderAsset: yes +timeCreated: 1471272982 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Camera2DFollow.cs b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Camera2DFollow.cs new file mode 100644 index 00000000..93c90210 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Camera2DFollow.cs @@ -0,0 +1,53 @@ +using System; +using UnityEngine; + +namespace UnityStandardAssets._2D +{ + public class Camera2DFollow : MonoBehaviour + { + public Transform target; + public float damping = 1; + public float lookAheadFactor = 3; + public float lookAheadReturnSpeed = 0.5f; + public float lookAheadMoveThreshold = 0.1f; + + private float m_OffsetZ; + private Vector3 m_LastTargetPosition; + private Vector3 m_CurrentVelocity; + private Vector3 m_LookAheadPos; + + // Use this for initialization + private void Start() + { + m_LastTargetPosition = target.position; + m_OffsetZ = (transform.position - target.position).z; + transform.parent = null; + } + + + // Update is called once per frame + private void Update() + { + // only update lookahead pos if accelerating or changed direction + float xMoveDelta = (target.position - m_LastTargetPosition).x; + + bool updateLookAheadTarget = Mathf.Abs(xMoveDelta) > lookAheadMoveThreshold; + + if (updateLookAheadTarget) + { + m_LookAheadPos = lookAheadFactor*Vector3.right*Mathf.Sign(xMoveDelta); + } + else + { + m_LookAheadPos = Vector3.MoveTowards(m_LookAheadPos, Vector3.zero, Time.deltaTime*lookAheadReturnSpeed); + } + + Vector3 aheadTargetPos = target.position + m_LookAheadPos + Vector3.forward*m_OffsetZ; + Vector3 newPos = Vector3.SmoothDamp(transform.position, aheadTargetPos, ref m_CurrentVelocity, damping); + + transform.position = newPos; + + m_LastTargetPosition = target.position; + } + } +} diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Camera2DFollow.cs.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Camera2DFollow.cs.meta new file mode 100644 index 00000000..81be27c6 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Camera2DFollow.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5d8238cc53530b64fbb7828c3d3bb591 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Platformer2DUserControl.cs b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Platformer2DUserControl.cs new file mode 100644 index 00000000..9e461a82 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Platformer2DUserControl.cs @@ -0,0 +1,35 @@ +using UnityEngine; +using CnControls; + +// Just in case so no "duplicate definition" stuff shows up +namespace UnityStandardAssets.Copy._2D +{ + [RequireComponent(typeof (PlatformerCharacter2D))] + public class Platformer2DUserControl : MonoBehaviour + { + private PlatformerCharacter2D m_Character; + private bool m_Jump; + + private void Awake() + { + m_Character = GetComponent(); + } + + private void Update() + { + if (!m_Jump) + { + // Read the jump input in Update so button presses aren't missed. + m_Jump = CnInputManager.GetButtonDown("Jump"); + } + } + + private void FixedUpdate() + { + float h = CnInputManager.GetAxis("Horizontal"); + // Pass all parameters to the character control script. + m_Character.Move(h, m_Jump); + m_Jump = false; + } + } +} diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Platformer2DUserControl.cs.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Platformer2DUserControl.cs.meta new file mode 100644 index 00000000..98fa9099 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Platformer2DUserControl.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: faa4c921e52aa4c4892eeed83f878356 +timeCreated: 1471678007 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/PlatformerCharacter2D.cs b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/PlatformerCharacter2D.cs new file mode 100644 index 00000000..71ec9098 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/PlatformerCharacter2D.cs @@ -0,0 +1,96 @@ +using System; +using UnityEngine; + +// Just in case so no "duplicate definition" stuff shows up +namespace UnityStandardAssets.Copy._2D +{ + public class PlatformerCharacter2D : MonoBehaviour + { + [SerializeField] + private float m_MaxSpeed = 10f; // The fastest the player can travel in the x axis. + [SerializeField] + private float m_JumpForce = 400f; // Amount of force added when the player jumps. + [SerializeField] + private bool m_AirControl = false; // Whether or not a player can steer while jumping; + [SerializeField] + private LayerMask m_WhatIsGround; // A mask determining what is ground to the character + + private Transform m_GroundCheck; // A position marking where to check if the player is grounded. + const float k_GroundedRadius = .2f; // Radius of the overlap circle to determine if grounded + private bool m_Grounded; // Whether or not the player is grounded. + private Animator m_Anim; // Reference to the player's animator component. + private Rigidbody2D m_Rigidbody2D; + private bool m_FacingRight = true; // For determining which way the player is currently facing. + + private void Awake() + { + // Setting up references. + m_GroundCheck = transform.Find("GroundCheck"); + m_Anim = GetComponent(); + m_Rigidbody2D = GetComponent(); + } + + + private void FixedUpdate() + { + m_Grounded = false; + + // The player is grounded if a circlecast to the groundcheck position hits anything designated as ground + // This can be done using layers instead but Sample Assets will not overwrite your project settings. + Collider2D[] colliders = Physics2D.OverlapCircleAll(m_GroundCheck.position, k_GroundedRadius, m_WhatIsGround); + for (int i = 0; i < colliders.Length; i++) + { + if (colliders[i].gameObject != gameObject) + m_Grounded = true; + } + m_Anim.SetBool("Ground", m_Grounded); + } + + + public void Move(float move, bool jump) + { + //only control the player if grounded or airControl is turned on + if (m_Grounded || m_AirControl) + { + // The Speed animator parameter is set to the absolute value of the horizontal input. + m_Anim.SetFloat("Speed", Mathf.Abs(move)); + + // Move the character + m_Rigidbody2D.velocity = new Vector2(move * m_MaxSpeed, m_Rigidbody2D.velocity.y); + + // If the input is moving the player right and the player is facing left... + if (move > 0 && !m_FacingRight) + { + // ... flip the player. + Flip(); + } + // Otherwise if the input is moving the player left and the player is facing right... + else if (move < 0 && m_FacingRight) + { + // ... flip the player. + Flip(); + } + } + // If the player should jump... + if (m_Grounded && jump && m_Anim.GetBool("Ground")) + { + // Add a vertical force to the player. + m_Grounded = false; + m_Anim.SetBool("Ground", false); + m_Rigidbody2D.AddForce(new Vector2(0f, m_JumpForce)); + } + } + + + private void Flip() + { + // Switch the way the player is labelled as facing. + m_FacingRight = !m_FacingRight; + + // Multiply the player's x local scale by -1. + Vector3 theScale = transform.localScale; + theScale.x *= -1; + transform.localScale = theScale; + } + } +} diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/PlatformerCharacter2D.cs.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/PlatformerCharacter2D.cs.meta new file mode 100644 index 00000000..5dd33b1a --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/PlatformerCharacter2D.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d08f91df3bd212f429df17f53ce2f364 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Restarter.cs b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Restarter.cs new file mode 100644 index 00000000..9574f4b0 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Restarter.cs @@ -0,0 +1,17 @@ +using System; +using UnityEngine; +using UnityEngine.SceneManagement; + +namespace UnityStandardAssets._2D +{ + public class Restarter : MonoBehaviour + { + private void OnTriggerEnter2D(Collider2D other) + { + if (other.tag == "Player") + { + SceneManager.LoadScene(SceneManager.GetActiveScene().name); + } + } + } +} diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Restarter.cs.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Restarter.cs.meta new file mode 100644 index 00000000..7fc891b7 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/2D/Scripts/Restarter.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e053b0a94752146e79954ce4df1b5565 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick.meta new file mode 100644 index 00000000..145d637f --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 31d92ce00799e3c4e90a9f94ec23c4fc +folderAsset: yes +timeCreated: 1471272982 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick.unity b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick.unity new file mode 100644 index 00000000..d6e1450b --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick.unity @@ -0,0 +1,1055 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +SceneSettings: + m_ObjectHideFlags: 0 + m_PVSData: + m_PVSObjectsArray: [] + m_PVSPortalsArray: [] + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 6 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 6 + m_GIWorkflowMode: 0 + m_LightmapsMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 3 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AOMaxDistance: 1 + m_Padding: 2 + m_CompAOExponent: 0 + m_LightmapParameters: {fileID: 0} + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_LightingDataAsset: {fileID: 0} + m_RuntimeCPUUsage: 25 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + accuratePlacement: 0 + minRegionArea: 2 + cellSize: 0.16666667 + manualCellSize: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &97171752 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 97171753} + - 222: {fileID: 97171755} + - 114: {fileID: 97171754} + m_Layer: 5 + m_Name: Image 3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &97171753 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 97171752} + m_LocalRotation: {x: 0, y: 0, z: -0.7071068, w: 0.7071067} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 281994580} + m_RootOrder: 3 + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 42} + m_SizeDelta: {x: 53.333332, y: 53.333332} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &97171754 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 97171752} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &97171755 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 97171752} +--- !u!1 &281994577 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 151076, guid: 943b21e331e945146beb63726ff855df, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 281994580} + - 222: {fileID: 281994579} + - 114: {fileID: 281994578} + m_Layer: 5 + m_Name: Base + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &281994578 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11480696, guid: 943b21e331e945146beb63726ff855df, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 281994577} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &281994579 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22277172, guid: 943b21e331e945146beb63726ff855df, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 281994577} +--- !u!224 &281994580 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22486632, guid: 943b21e331e945146beb63726ff855df, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 281994577} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 2065463895} + - {fileID: 1927415593} + - {fileID: 367104073} + - {fileID: 97171753} + m_Father: {fileID: 1567391646} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 100, y: 93} + m_SizeDelta: {x: 106.66666, y: 106.66666} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &367104072 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 367104073} + - 222: {fileID: 367104075} + - 114: {fileID: 367104074} + m_Layer: 5 + m_Name: Image 2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &367104073 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 367104072} + m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071067} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 281994580} + m_RootOrder: 2 + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: -42} + m_SizeDelta: {x: 53.333332, y: 53.333332} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &367104074 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 367104072} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &367104075 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 367104072} +--- !u!1 &730601709 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 730601713} + - 33: {fileID: 730601712} + - 135: {fileID: 730601711} + - 23: {fileID: 730601710} + - 114: {fileID: 730601714} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &730601710 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 730601709} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!135 &730601711 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 730601709} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &730601712 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 730601709} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &730601713 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 730601709} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 +--- !u!114 &730601714 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 730601709} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7231e344bf4fee244a3cbea5541b7188, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &735024638 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 133826, guid: 943b21e331e945146beb63726ff855df, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 735024639} + - 222: {fileID: 735024641} + - 114: {fileID: 735024640} + m_Layer: 5 + m_Name: Stick + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &735024639 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22483060, guid: 943b21e331e945146beb63726ff855df, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 735024638} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1567391646} + m_RootOrder: 1 + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -25.000053, y: -28.499987} + m_SizeDelta: {x: 64, y: 64} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &735024640 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11489796, guid: 943b21e331e945146beb63726ff855df, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 735024638} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 4bc4df1939d750840a6c849a32296205, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &735024641 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22232102, guid: 943b21e331e945146beb63726ff855df, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 735024638} +--- !u!1 &912352042 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 912352046} + - 33: {fileID: 912352045} + - 64: {fileID: 912352044} + - 23: {fileID: 912352043} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &912352043 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 912352042} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!64 &912352044 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 912352042} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &912352045 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 912352042} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &912352046 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 912352042} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 10, y: 1, z: 10} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 +--- !u!1 &916033643 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 916033645} + - 108: {fileID: 916033644} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &916033644 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 916033643} + m_Enabled: 1 + serializedVersion: 6 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_BounceIntensity: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 + m_AreaSize: {x: 1, y: 1} +--- !u!4 &916033645 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 916033643} + m_LocalRotation: {x: 0.063045286, y: 0.4630129, z: -0.29958537, w: 0.831801} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 +--- !u!1 &1056959022 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1056959026} + - 114: {fileID: 1056959025} + - 114: {fileID: 1056959024} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1056959024 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1056959022} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1056959025 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1056959022} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &1056959026 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1056959022} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 +--- !u!1 &1374478143 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1374478147} + - 223: {fileID: 1374478146} + - 114: {fileID: 1374478145} + - 114: {fileID: 1374478144} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1374478144 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1374478143} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1374478145 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1374478143} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1374478146 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1374478143} + m_Enabled: 1 + serializedVersion: 2 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1374478147 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1374478143} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1567391646} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &1378331519 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1378331524} + - 20: {fileID: 1378331523} + - 92: {fileID: 1378331522} + - 124: {fileID: 1378331521} + - 81: {fileID: 1378331520} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1378331520 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1378331519} + m_Enabled: 1 +--- !u!124 &1378331521 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1378331519} + m_Enabled: 1 +--- !u!92 &1378331522 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1378331519} + m_Enabled: 1 +--- !u!20 &1378331523 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1378331519} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &1378331524 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1378331519} + m_LocalRotation: {x: -0.16710004, y: -0.7265909, z: 0.19007656, w: -0.63876} + m_LocalPosition: {x: -5.74, y: 3.2, z: 0.04} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!1 &1567391645 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 144978, guid: 943b21e331e945146beb63726ff855df, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1567391646} + - 222: {fileID: 1567391649} + - 114: {fileID: 1567391648} + - 114: {fileID: 1567391647} + m_Layer: 5 + m_Name: Custom D-Pad-like Joystick + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1567391646 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1567391645} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 281994580} + - {fileID: 735024639} + m_Father: {fileID: 1374478147} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 250, y: 243} + m_Pivot: {x: 0, y: 0} +--- !u!114 &1567391647 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11421910, guid: 943b21e331e945146beb63726ff855df, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1567391645} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eeb64258239543b4db1c80658a0d4f2c, type: 3} + m_Name: + m_EditorClassIdentifier: + MovementRange: 50 + HorizontalAxisName: Horizontal + VerticalAxisName: Vertical + HideOnRelease: 0 + MoveBase: 0 + SnapsToFinger: 0 + JoystickMoveAxis: 3 + JoystickBase: {fileID: 281994578} + Stick: {fileID: 735024640} + TouchZone: {fileID: 1567391646} +--- !u!114 &1567391648 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11487462, guid: 943b21e331e945146beb63726ff855df, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1567391645} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1567391649 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22252930, guid: 943b21e331e945146beb63726ff855df, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1567391645} +--- !u!1 &1927415592 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1927415593} + - 222: {fileID: 1927415595} + - 114: {fileID: 1927415594} + m_Layer: 5 + m_Name: Image 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1927415593 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1927415592} + m_LocalRotation: {x: 0, y: 0, z: 1, w: -0.00000016292068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 281994580} + m_RootOrder: 1 + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 42, y: 0} + m_SizeDelta: {x: 53.333332, y: 53.333332} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1927415594 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1927415592} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1927415595 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1927415592} +--- !u!1 &2065463894 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 2065463895} + - 222: {fileID: 2065463897} + - 114: {fileID: 2065463896} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2065463895 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2065463894} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 281994580} + m_RootOrder: 0 + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -42, y: 0} + m_SizeDelta: {x: 53.333332, y: 53.333332} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2065463896 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2065463894} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &2065463897 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2065463894} diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick.unity.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick.unity.meta new file mode 100644 index 00000000..f34bddc9 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8e4b49b8277684a4a8a8688003742b24 +timeCreated: 1441002883 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick/FourWayController.cs b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick/FourWayController.cs new file mode 100644 index 00000000..c959e5b2 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick/FourWayController.cs @@ -0,0 +1,43 @@ +using CnControls; +using UnityEngine; + +namespace CustomJoystick +{ + public class FourWayController : MonoBehaviour + { + private Vector3[] directionalVectors = { Vector3.forward, Vector3.back, Vector3.right, Vector3.left }; + + private Transform _mainCameraTransform; + + private void Awake() + { + _mainCameraTransform = Camera.main.transform; + } + + private void Update() + { + var movementVector = new Vector3(CnInputManager.GetAxis("Horizontal"), 0f, CnInputManager.GetAxis("Vertical")); + if (movementVector.sqrMagnitude < 0.00001f) return; + + // Clamping + Vector3 closestDirectionVector = directionalVectors[0]; + float closestDot = Vector3.Dot(movementVector, closestDirectionVector); + for (int i = 1; i < directionalVectors.Length; i++) + { + float dot = Vector3.Dot(movementVector, directionalVectors[i]); + if (dot < closestDot) + { + closestDirectionVector = directionalVectors[i]; + closestDot = dot; + } + } + + // closestDirectionVector is what we need + var transformedDirection = _mainCameraTransform.InverseTransformDirection(closestDirectionVector); + transformedDirection.y = 0f; + transformedDirection.Normalize(); + + transform.position += transformedDirection * Time.deltaTime; + } + } +} diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick/FourWayController.cs.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick/FourWayController.cs.meta new file mode 100644 index 00000000..0483bfdc --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Custom Joystick/FourWayController.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7231e344bf4fee244a3cbea5541b7188 +timeCreated: 1441003344 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person Controller.unity b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person Controller.unity new file mode 100644 index 00000000..d3eaa1f7 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person Controller.unity @@ -0,0 +1,677 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +SceneSettings: + m_ObjectHideFlags: 0 + m_PVSData: + m_PVSObjectsArray: [] + m_PVSPortalsArray: [] + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 6 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 6 + m_GIWorkflowMode: 0 + m_LightmapsMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 3 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AOMaxDistance: 1 + m_Padding: 2 + m_CompAOExponent: 0 + m_LightmapParameters: {fileID: 0} + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_LightingDataAsset: {fileID: 0} + m_RuntimeCPUUsage: 25 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + accuratePlacement: 0 + minRegionArea: 2 + cellSize: 0.16666667 + manualCellSize: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &682570992 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 682570996} + - 114: {fileID: 682570995} + - 114: {fileID: 682570994} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &682570994 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 682570992} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &682570995 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 682570992} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &682570996 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 682570992} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 +--- !u!224 &1079495580 stripped +RectTransform: + m_PrefabParentObject: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, + type: 2} + m_PrefabInternal: {fileID: 1893938830} +--- !u!1001 &1137826725 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 400004, guid: baec086904791744185aaa07a6cf55c2, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: baec086904791744185aaa07a6cf55c2, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: baec086904791744185aaa07a6cf55c2, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: baec086904791744185aaa07a6cf55c2, type: 2} + propertyPath: m_LocalRotation.x + value: 0.10889492 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: baec086904791744185aaa07a6cf55c2, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: baec086904791744185aaa07a6cf55c2, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: baec086904791744185aaa07a6cf55c2, type: 2} + propertyPath: m_LocalRotation.w + value: 0.9940533 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: baec086904791744185aaa07a6cf55c2, type: 2} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11400000, guid: baec086904791744185aaa07a6cf55c2, type: 2} + propertyPath: m_Target + value: + objectReference: {fileID: 1690425256} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: baec086904791744185aaa07a6cf55c2, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &1690425252 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1690425256} + - 33: {fileID: 1690425255} + - 23: {fileID: 1690425253} + - 143: {fileID: 1690425257} + - 114: {fileID: 1690425254} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1690425253 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1690425252} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!114 &1690425254 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1690425252} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b36d7fcb935d73f4a8abfba088463d27, type: 3} + m_Name: + m_EditorClassIdentifier: + MovementSpeed: 10 +--- !u!33 &1690425255 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1690425252} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1690425256 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1690425252} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.61, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1767188603} + m_Father: {fileID: 0} + m_RootOrder: 2 +--- !u!143 &1690425257 +CharacterController: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1690425252} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.08 + m_MinMoveDistance: 0.001 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &1729815485 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1729815486} + - 223: {fileID: 1729815489} + - 114: {fileID: 1729815488} + - 114: {fileID: 1729815487} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1729815486 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1729815485} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1079495580} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!114 &1729815487 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1729815485} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1729815488 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1729815485} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 480} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 1 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1729815489 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1729815485} + m_Enabled: 1 + serializedVersion: 2 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!1 &1767188599 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1767188603} + - 33: {fileID: 1767188602} + - 135: {fileID: 1767188601} + - 23: {fileID: 1767188600} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1767188600 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1767188599} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!135 &1767188601 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1767188599} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1767188602 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1767188599} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1767188603 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1767188599} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.44, z: 0.33} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1690425256} + m_RootOrder: 0 +--- !u!1 &1768681292 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1768681294} + - 108: {fileID: 1768681293} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &1768681293 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1768681292} + m_Enabled: 1 + serializedVersion: 6 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 0.64 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: 1 + m_Strength: 1 + m_Bias: 0.1 + m_NormalBias: 0.35 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_BounceIntensity: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 + m_AreaSize: {x: 1, y: 1} +--- !u!4 &1768681294 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1768681292} + m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605} + m_LocalPosition: {x: 2.31, y: 0.94, z: 5.59} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!1001 &1893938830 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1729815486} + m_Modifications: + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_SizeDelta.x + value: 250 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_SizeDelta.y + value: 243 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22450750, guid: 943b21e331e945146beb63726ff855df, type: 2} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 943b21e331e945146beb63726ff855df, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &2129100250 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 2129100254} + - 33: {fileID: 2129100253} + - 64: {fileID: 2129100252} + - 23: {fileID: 2129100251} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &2129100251 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2129100250} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!64 &2129100252 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2129100250} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &2129100253 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2129100250} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2129100254 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2129100250} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 10, y: 1, z: 10} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person Controller.unity.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person Controller.unity.meta new file mode 100644 index 00000000..264163de --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person Controller.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c67192132829c4a4b885c55c2544033d +timeCreated: 1437985576 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person.meta new file mode 100644 index 00000000..b0670a11 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4515d448bf13ebe4a8a6b4baaa41bb1f +folderAsset: yes +timeCreated: 1471272982 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/AbstractTargetFollower.cs b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/AbstractTargetFollower.cs new file mode 100644 index 00000000..092bbb28 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/AbstractTargetFollower.cs @@ -0,0 +1,104 @@ +using System; +using UnityEngine; + +namespace UnityStandardAssets.Cameras +{ + public abstract class AbstractTargetFollower : MonoBehaviour + { + public enum UpdateType // The available methods of updating are: + { + FixedUpdate, // Update in FixedUpdate (for tracking rigidbodies). + LateUpdate, // Update in LateUpdate. (for tracking objects that are moved in Update) + ManualUpdate, // user must call to update camera + } + + [SerializeField] protected Transform m_Target; // The target object to follow + [SerializeField] private bool m_AutoTargetPlayer = true; // Whether the rig should automatically target the player. + [SerializeField] private UpdateType m_UpdateType; // stores the selected update type + + protected Rigidbody targetRigidbody; + + + protected virtual void Start() + { + // if auto targeting is used, find the object tagged "Player" + // any class inheriting from this should call base.Start() to perform this action! + if (m_AutoTargetPlayer) + { + FindAndTargetPlayer(); + } + if (m_Target == null) return; + targetRigidbody = m_Target.GetComponent(); + } + + + private void FixedUpdate() + { + // we update from here if updatetype is set to Fixed, or in auto mode, + // if the target has a rigidbody, and isn't kinematic. + if (m_AutoTargetPlayer && (m_Target == null || !m_Target.gameObject.activeSelf)) + { + FindAndTargetPlayer(); + } + if (m_UpdateType == UpdateType.FixedUpdate) + { + FollowTarget(Time.deltaTime); + } + } + + + private void LateUpdate() + { + // we update from here if updatetype is set to Late, or in auto mode, + // if the target does not have a rigidbody, or - does have a rigidbody but is set to kinematic. + if (m_AutoTargetPlayer && (m_Target == null || !m_Target.gameObject.activeSelf)) + { + FindAndTargetPlayer(); + } + if (m_UpdateType == UpdateType.LateUpdate) + { + FollowTarget(Time.deltaTime); + } + } + + + public void ManualUpdate() + { + // we update from here if updatetype is set to Late, or in auto mode, + // if the target does not have a rigidbody, or - does have a rigidbody but is set to kinematic. + if (m_AutoTargetPlayer && (m_Target == null || !m_Target.gameObject.activeSelf)) + { + FindAndTargetPlayer(); + } + if (m_UpdateType == UpdateType.ManualUpdate) + { + FollowTarget(Time.deltaTime); + } + } + + protected abstract void FollowTarget(float deltaTime); + + + public void FindAndTargetPlayer() + { + // auto target an object tagged player, if no target has been assigned + var targetObj = GameObject.FindGameObjectWithTag("Player"); + if (targetObj) + { + SetTarget(targetObj.transform); + } + } + + + public virtual void SetTarget(Transform newTransform) + { + m_Target = newTransform; + } + + + public Transform Target + { + get { return m_Target; } + } + } +} diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/AbstractTargetFollower.cs.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/AbstractTargetFollower.cs.meta new file mode 100644 index 00000000..da819d75 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/AbstractTargetFollower.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 89a534d869bfccd49bebf7cb6fb244b6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/AutoCam.cs b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/AutoCam.cs new file mode 100644 index 00000000..906ae0f5 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/AutoCam.cs @@ -0,0 +1,107 @@ +using System; +using UnityEngine; +#if UNITY_EDITOR + +#endif + +namespace UnityStandardAssets.Cameras +{ + [ExecuteInEditMode] + public class AutoCam : PivotBasedCameraRig + { + [SerializeField] private float m_MoveSpeed = 3; // How fast the rig will move to keep up with target's position + [SerializeField] private float m_TurnSpeed = 1; // How fast the rig will turn to keep up with target's rotation + [SerializeField] private float m_RollSpeed = 0.2f;// How fast the rig will roll (around Z axis) to match target's roll. + [SerializeField] private bool m_FollowVelocity = false;// Whether the rig will rotate in the direction of the target's velocity. + [SerializeField] private bool m_FollowTilt = true; // Whether the rig will tilt (around X axis) with the target. + [SerializeField] private float m_SpinTurnLimit = 90;// The threshold beyond which the camera stops following the target's rotation. (used in situations where a car spins out, for example) + [SerializeField] private float m_TargetVelocityLowerLimit = 4f;// the minimum velocity above which the camera turns towards the object's velocity. Below this we use the object's forward direction. + [SerializeField] private float m_SmoothTurnTime = 0.2f; // the smoothing for the camera's rotation + + private float m_LastFlatAngle; // The relative angle of the target and the rig from the previous frame. + private float m_CurrentTurnAmount; // How much to turn the camera + private float m_TurnSpeedVelocityChange; // The change in the turn speed velocity + private Vector3 m_RollUp = Vector3.up;// The roll of the camera around the z axis ( generally this will always just be up ) + + + protected override void FollowTarget(float deltaTime) + { + // if no target, or no time passed then we quit early, as there is nothing to do + if (!(deltaTime > 0) || m_Target == null) + { + return; + } + + // initialise some vars, we'll be modifying these in a moment + var targetForward = m_Target.forward; + var targetUp = m_Target.up; + + if (m_FollowVelocity && Application.isPlaying) + { + // in follow velocity mode, the camera's rotation is aligned towards the object's velocity direction + // but only if the object is traveling faster than a given threshold. + + if (targetRigidbody.velocity.magnitude > m_TargetVelocityLowerLimit) + { + // velocity is high enough, so we'll use the target's velocty + targetForward = targetRigidbody.velocity.normalized; + targetUp = Vector3.up; + } + else + { + targetUp = Vector3.up; + } + m_CurrentTurnAmount = Mathf.SmoothDamp(m_CurrentTurnAmount, 1, ref m_TurnSpeedVelocityChange, m_SmoothTurnTime); + } + else + { + // we're in 'follow rotation' mode, where the camera rig's rotation follows the object's rotation. + + // This section allows the camera to stop following the target's rotation when the target is spinning too fast. + // eg when a car has been knocked into a spin. The camera will resume following the rotation + // of the target when the target's angular velocity slows below the threshold. + var currentFlatAngle = Mathf.Atan2(targetForward.x, targetForward.z)*Mathf.Rad2Deg; + if (m_SpinTurnLimit > 0) + { + var targetSpinSpeed = Mathf.Abs(Mathf.DeltaAngle(m_LastFlatAngle, currentFlatAngle))/deltaTime; + var desiredTurnAmount = Mathf.InverseLerp(m_SpinTurnLimit, m_SpinTurnLimit*0.75f, targetSpinSpeed); + var turnReactSpeed = (m_CurrentTurnAmount > desiredTurnAmount ? .1f : 1f); + if (Application.isPlaying) + { + m_CurrentTurnAmount = Mathf.SmoothDamp(m_CurrentTurnAmount, desiredTurnAmount, + ref m_TurnSpeedVelocityChange, turnReactSpeed); + } + else + { + // for editor mode, smoothdamp won't work because it uses deltaTime internally + m_CurrentTurnAmount = desiredTurnAmount; + } + } + else + { + m_CurrentTurnAmount = 1; + } + m_LastFlatAngle = currentFlatAngle; + } + + // camera position moves towards target position: + transform.position = Vector3.Lerp(transform.position, m_Target.position, deltaTime*m_MoveSpeed); + + // camera's rotation is split into two parts, which can have independend speed settings: + // rotating towards the target's forward direction (which encompasses its 'yaw' and 'pitch') + if (!m_FollowTilt) + { + targetForward.y = 0; + if (targetForward.sqrMagnitude < float.Epsilon) + { + targetForward = transform.forward; + } + } + var rollRotation = Quaternion.LookRotation(targetForward, m_RollUp); + + // and aligning with the target object's up direction (i.e. its 'roll') + m_RollUp = m_RollSpeed > 0 ? Vector3.Slerp(m_RollUp, targetUp, m_RollSpeed*deltaTime) : Vector3.up; + transform.rotation = Quaternion.Lerp(transform.rotation, rollRotation, m_TurnSpeed*m_CurrentTurnAmount*deltaTime); + } + } +} diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/AutoCam.cs.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/AutoCam.cs.meta new file mode 100644 index 00000000..77830cf1 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/AutoCam.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a8d3968294210ba4a9d2bb96dfa74a16 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/MultipurposeCameraRig.prefab b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/MultipurposeCameraRig.prefab new file mode 100644 index 00000000..22b16f88 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/MultipurposeCameraRig.prefab @@ -0,0 +1,194 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &100000 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400000} + m_Layer: 0 + m_Name: Pivot + m_TagString: Untagged + m_Icon: {fileID: -1500306622, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100002 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400002} + - 20: {fileID: 2000000} + - 92: {fileID: 9200000} + - 124: {fileID: 12400000} + - 81: {fileID: 8100000} + m_Layer: 0 + m_Name: MainCamera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100004 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400004} + - 54: {fileID: 5400000} + - 114: {fileID: 11400000} + m_Layer: 0 + m_Name: MultipurposeCameraRig + m_TagString: Untagged + m_Icon: {fileID: -215833656, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &400000 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.34, z: -5.98} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 400002} + m_Father: {fileID: 400004} + m_RootOrder: 0 +--- !u!4 &400002 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_LocalRotation: {x: 0.064484455, y: 0, z: 0, w: 0.9979187} + m_LocalPosition: {x: 0, y: 0.11, z: -3.26} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 400000} + m_RootOrder: 0 +--- !u!4 &400004 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_LocalRotation: {x: 0.10889492, y: 0, z: 0, w: 0.9940533} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 400000} + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!20 &2000000 +Camera: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.61960787, g: 0.6745098, b: 0.76862746, a: 0.019607844} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.2 + far clip plane: 5000 + field of view: 50 + orthographic: 0 + orthographic size: 4.5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!54 &5400000 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0.2 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!81 &8100000 +AudioListener: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 +--- !u!92 &9200000 +Behaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a8d3968294210ba4a9d2bb96dfa74a16, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Target: {fileID: 0} + m_AutoTargetPlayer: 1 + m_UpdateType: 0 + m_MoveSpeed: 3 + m_TurnSpeed: 1 + m_RollSpeed: 0.2 + m_FollowVelocity: 0 + m_FollowTilt: 1 + m_SpinTurnLimit: 90 + m_TargetVelocityLowerLimit: 4 + m_SmoothTurnTime: 0.2 +--- !u!124 &12400000 +Behaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 100004} + m_IsPrefabParent: 1 diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/MultipurposeCameraRig.prefab.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/MultipurposeCameraRig.prefab.meta new file mode 100644 index 00000000..2dde8162 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/MultipurposeCameraRig.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: baec086904791744185aaa07a6cf55c2 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/PivotBasedCameraRig.cs b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/PivotBasedCameraRig.cs new file mode 100644 index 00000000..cc76a6a7 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/PivotBasedCameraRig.cs @@ -0,0 +1,28 @@ +using System; +using UnityEngine; + + +namespace UnityStandardAssets.Cameras +{ + public abstract class PivotBasedCameraRig : AbstractTargetFollower + { + // This script is designed to be placed on the root object of a camera rig, + // comprising 3 gameobjects, each parented to the next: + + // Camera Rig + // Pivot + // Camera + + protected Transform m_Cam; // the transform of the camera + protected Transform m_Pivot; // the point at which the camera pivots around + protected Vector3 m_LastTargetPosition; + + + protected virtual void Awake() + { + // find the camera in the object hierarchy + m_Cam = GetComponentInChildren().transform; + m_Pivot = m_Cam.parent; + } + } +} diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/PivotBasedCameraRig.cs.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/PivotBasedCameraRig.cs.meta new file mode 100644 index 00000000..701f56f8 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/PivotBasedCameraRig.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 58cb183e16853564e9ed457f8a296db1 +labels: +- Done +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/ThidPersonExampleController.cs b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/ThidPersonExampleController.cs new file mode 100644 index 00000000..5d7686ed --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/ThidPersonExampleController.cs @@ -0,0 +1,42 @@ +using UnityEngine; +using CnControls; + +// This is merely an example, it's for an example purpose only +// Your game WILL require a custom controller scripts, there's just no generic character control systems, +// they at least depend on the animations + +[RequireComponent(typeof(CharacterController))] +public class ThidPersonExampleController : MonoBehaviour +{ + public float MovementSpeed = 10f; + + private Transform _mainCameraTransform; + private Transform _transform; + private CharacterController _characterController; + + private void OnEnable() + { + _mainCameraTransform = Camera.main.GetComponent(); + _characterController = GetComponent(); + _transform = GetComponent(); + } + + public void Update() + { + // Just use CnInputManager. instead of Input. and you're good to go + var inputVector = new Vector3(CnInputManager.GetAxis("Horizontal"), CnInputManager.GetAxis("Vertical")); + Vector3 movementVector = Vector3.zero; + + // If we have some input + if (inputVector.sqrMagnitude > 0.001f) + { + movementVector = _mainCameraTransform.TransformDirection(inputVector); + movementVector.y = 0f; + movementVector.Normalize(); + _transform.forward = movementVector; + } + + movementVector += Physics.gravity; + _characterController.Move(movementVector * Time.deltaTime); + } +} diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/ThidPersonExampleController.cs.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/ThidPersonExampleController.cs.meta new file mode 100644 index 00000000..652d724b --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Third Person/ThidPersonExampleController.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b36d7fcb935d73f4a8abfba088463d27 +timeCreated: 1438017452 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera.meta new file mode 100644 index 00000000..dbf1c39c --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3dd7b86f784fa8949ba6bee7858c4425 +folderAsset: yes +timeCreated: 1471272982 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera.unity b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera.unity new file mode 100644 index 00000000..168e6318 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera.unity @@ -0,0 +1,960 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +SceneSettings: + m_ObjectHideFlags: 0 + m_PVSData: + m_PVSObjectsArray: [] + m_PVSPortalsArray: [] + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 6 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 6 + m_GIWorkflowMode: 1 + m_LightmapsMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 3 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AOMaxDistance: 1 + m_Padding: 2 + m_CompAOExponent: 0 + m_LightmapParameters: {fileID: 0} + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_LightingDataAsset: {fileID: 0} + m_RuntimeCPUUsage: 25 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + accuratePlacement: 0 + minRegionArea: 2 + cellSize: 0.16666666 + manualCellSize: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &55403299 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 55403300} + - 108: {fileID: 55403301} + m_Layer: 0 + m_Name: Directional light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &55403300 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 55403299} + m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.10938166, w: 0.8754261} + m_LocalPosition: {x: 0.62, y: 3.29, z: 0.84} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 849750726} + m_RootOrder: 1 +--- !u!108 &55403301 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 55403299} + m_Enabled: 1 + serializedVersion: 6 + m_Type: 1 + m_Color: {r: 0.9981744, g: 1, b: 0.86764705, a: 1} + m_Intensity: 0.8 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_BounceIntensity: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 + m_AreaSize: {x: 1, y: 1} +--- !u!1 &213368247 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 213368248} + - 33: {fileID: 213368251} + - 135: {fileID: 213368250} + - 23: {fileID: 213368249} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &213368248 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 213368247} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.54, y: 0.59, z: 0.25} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 849750726} + m_RootOrder: 3 +--- !u!23 &213368249 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 213368247} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 0 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!135 &213368250 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 213368247} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &213368251 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 213368247} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &368366861 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 368366865} + - 223: {fileID: 368366864} + - 114: {fileID: 368366863} + - 114: {fileID: 368366862} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &368366862 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 368366861} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &368366863 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 368366861} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &368366864 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 368366861} + m_Enabled: 1 + serializedVersion: 2 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &368366865 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 368366861} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 914997947} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &849750725 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 849750726} + m_Layer: 0 + m_Name: Objects + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &849750726 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 849750725} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1650487428} + - {fileID: 55403300} + - {fileID: 1644587487} + - {fileID: 213368248} + - {fileID: 967508021} + - {fileID: 1403237442} + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!1 &892656175 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 892656179} + - 114: {fileID: 892656178} + - 114: {fileID: 892656177} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &892656177 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 892656175} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &892656178 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 892656175} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &892656179 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 892656175} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 +--- !u!224 &914997947 stripped +RectTransform: + m_PrefabParentObject: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, + type: 2} + m_PrefabInternal: {fileID: 2027539251} +--- !u!1 &967508020 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 967508021} + - 33: {fileID: 967508024} + - 135: {fileID: 967508023} + - 23: {fileID: 967508022} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &967508021 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 967508020} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1.67, y: 0.59, z: -0.75} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 849750726} + m_RootOrder: 4 +--- !u!23 &967508022 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 967508020} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 0 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!135 &967508023 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 967508020} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &967508024 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 967508020} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1403237441 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1403237442} + - 33: {fileID: 1403237445} + - 65: {fileID: 1403237444} + - 23: {fileID: 1403237443} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1403237442 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1403237441} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1.52, y: 0.68, z: 1.17} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 849750726} + m_RootOrder: 5 +--- !u!23 &1403237443 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1403237441} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 0 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!65 &1403237444 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1403237441} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1403237445 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1403237441} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1644587486 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1644587487} + - 33: {fileID: 1644587490} + - 65: {fileID: 1644587489} + - 23: {fileID: 1644587488} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1644587487 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1644587486} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1.53, y: 0.68, z: -0.74} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 849750726} + m_RootOrder: 2 +--- !u!23 &1644587488 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1644587486} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 0 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!65 &1644587489 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1644587486} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1644587490 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1644587486} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1650487424 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1650487428} + - 33: {fileID: 1650487427} + - 64: {fileID: 1650487426} + - 23: {fileID: 1650487425} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1650487425 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1650487424} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 0 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!64 &1650487426 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1650487424} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1650487427 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1650487424} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1650487428 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1650487424} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 849750726} + m_RootOrder: 0 +--- !u!1 &1770100850 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100000, guid: 12694413a7cd86d47807dffb0c0b2368, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1770100851} + m_Layer: 0 + m_Name: CameraOffset + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1770100851 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400004, guid: 12694413a7cd86d47807dffb0c0b2368, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1770100850} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.9410808, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 2098868493} + m_Father: {fileID: 1854435950} + m_RootOrder: 0 +--- !u!1 &1854435949 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100002, guid: 12694413a7cd86d47807dffb0c0b2368, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1854435950} + - 114: {fileID: 1854435951} + - 114: {fileID: 1854435952} + m_Layer: 0 + m_Name: CameraSetup + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1854435950 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400000, guid: 12694413a7cd86d47807dffb0c0b2368, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1854435949} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.01858, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1770100851} + m_Father: {fileID: 0} + m_RootOrder: 1 +--- !u!114 &1854435951 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1854435949} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7b96484bda987c4449e27b6505453998, type: 3} + m_Name: + m_EditorClassIdentifier: + Min: -15 + Max: 15 +--- !u!114 &1854435952 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1854435949} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 60aafd75dd462f2449b270080f141917, type: 3} + m_Name: + m_EditorClassIdentifier: + RotationSpeed: 5 + OriginTransform: {fileID: 1854435950} +--- !u!1001 &2027539251 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 368366865} + m_Modifications: + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_SizeDelta.x + value: 264 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_SizeDelta.y + value: 248 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22455830, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 844d770c99f6cf24da670a158eaf4fe1, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &2098868492 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100004, guid: 12694413a7cd86d47807dffb0c0b2368, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 2098868493} + - 20: {fileID: 2098868497} + - 92: {fileID: 2098868496} + - 124: {fileID: 2098868495} + m_Layer: 0 + m_Name: Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2098868493 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400002, guid: 12694413a7cd86d47807dffb0c0b2368, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2098868492} + m_LocalRotation: {x: 0.30070582, y: 0, z: 0, w: 0.95371693} + m_LocalPosition: {x: 0, y: 3.6879168, z: -5.126153} + m_LocalScale: {x: 1, y: 1, z: 0.9999997} + m_Children: [] + m_Father: {fileID: 1770100851} + m_RootOrder: 0 +--- !u!124 &2098868495 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 12400000, guid: 12694413a7cd86d47807dffb0c0b2368, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2098868492} + m_Enabled: 1 +--- !u!92 &2098868496 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 9200000, guid: 12694413a7cd86d47807dffb0c0b2368, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2098868492} + m_Enabled: 1 +--- !u!20 &2098868497 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2000000, guid: 12694413a7cd86d47807dffb0c0b2368, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2098868492} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 1} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.5 + far clip plane: 5000 + field of view: 60 + orthographic: 0 + orthographic size: 100 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera.unity.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera.unity.meta new file mode 100644 index 00000000..ca039235 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3420cd9431c710b48afd18a9303834d9 +timeCreated: 1440872649 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera/RotateCamera.cs b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera/RotateCamera.cs new file mode 100644 index 00000000..78a31e14 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera/RotateCamera.cs @@ -0,0 +1,18 @@ +using CnControls; +using UnityEngine; + +namespace Examples.Scenes.TouchpadCamera +{ + public class RotateCamera : MonoBehaviour + { + public float RotationSpeed = 15f; + public Transform OriginTransform; + + public void Update() + { + var horizontalMovement = CnInputManager.GetAxis("Horizontal"); + + OriginTransform.Rotate(Vector3.up, horizontalMovement * Time.deltaTime * RotationSpeed); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera/RotateCamera.cs.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera/RotateCamera.cs.meta new file mode 100644 index 00000000..20b982d6 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera/RotateCamera.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 60aafd75dd462f2449b270080f141917 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera/RotationConstraint.cs b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera/RotationConstraint.cs new file mode 100644 index 00000000..fa749982 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera/RotationConstraint.cs @@ -0,0 +1,53 @@ +using UnityEngine; +using System.Collections; + +namespace Examples.Scenes.TouchpadCamera +{ + public class RotationConstraint : MonoBehaviour + { + public float Min = -15f; + public float Max = 15f; + + private Transform _transformCache; + private Quaternion _minQuaternion; + private Quaternion _maxQuaternion; + private Vector3 _rotateAround; + private float _range; + + private void Awake() + { + _transformCache = transform; + + _rotateAround = Vector3.right; + var axisRotation = Quaternion.AngleAxis(_transformCache.localRotation.eulerAngles[0], _rotateAround); + _minQuaternion = axisRotation * Quaternion.AngleAxis(Min, _rotateAround); + _maxQuaternion = axisRotation * Quaternion.AngleAxis(Max, _rotateAround); + _range = Max - Min; + } + + private void LateUpdate() + { + var localRotation = _transformCache.localRotation; + var axisRotation = Quaternion.AngleAxis(localRotation.eulerAngles[0], _rotateAround); + var angleFromMin = Quaternion.Angle(axisRotation, _minQuaternion); + var angleFromMax = Quaternion.Angle(axisRotation, _maxQuaternion); + + if (angleFromMin <= _range && angleFromMax <= _range) + { + return; // within range + } + else + { + // Let's keep the current rotations around other axes and only + // correct the axis that has fallen out of range. + var euler = localRotation.eulerAngles; + if (angleFromMin > angleFromMax) + euler[0] = _maxQuaternion.eulerAngles[0]; + else + euler[0] = _minQuaternion.eulerAngles[0]; + + _transformCache.localEulerAngles = euler; + } + } + } +} diff --git a/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera/RotationConstraint.cs.meta b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera/RotationConstraint.cs.meta new file mode 100644 index 00000000..0fb25af5 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Examples/Scenes/Touchpad Camera/RotationConstraint.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7b96484bda987c4449e27b6505453998 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Scripts/Gameplay/CNControls/Graphics.meta b/Assets/Scripts/Gameplay/CNControls/Graphics.meta new file mode 100644 index 00000000..a0e0eecc --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Graphics.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 31f2b5961af776749bdc0738cb10c279 +folderAsset: yes +timeCreated: 1471272981 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Graphics/flatDark00.png b/Assets/Scripts/Gameplay/CNControls/Graphics/flatDark00.png new file mode 100644 index 00000000..e124dbfc Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Graphics/flatDark00.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Graphics/flatDark00.png.meta b/Assets/Scripts/Gameplay/CNControls/Graphics/flatDark00.png.meta new file mode 100644 index 00000000..5a522223 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Graphics/flatDark00.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 4bc4df1939d750840a6c849a32296205 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Graphics/flatDark06.png b/Assets/Scripts/Gameplay/CNControls/Graphics/flatDark06.png new file mode 100644 index 00000000..dc8530e1 Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Graphics/flatDark06.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Graphics/flatDark06.png.meta b/Assets/Scripts/Gameplay/CNControls/Graphics/flatDark06.png.meta new file mode 100644 index 00000000..6befd028 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Graphics/flatDark06.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: b29ef1894836dc440b43ab036ca764cb +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight05.png b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight05.png new file mode 100644 index 00000000..2c8f6efa Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight05.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight05.png.meta b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight05.png.meta new file mode 100644 index 00000000..25e63801 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight05.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 8c5266785fc2e8f4a8b291b47e2cda1a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 150 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight22.png b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight22.png new file mode 100644 index 00000000..ff2e2187 Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight22.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight22.png.meta b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight22.png.meta new file mode 100644 index 00000000..34c6b6f1 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight22.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 2cd0473fd8ba8a9478a6ea98025a16f0 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 150 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight46.png b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight46.png new file mode 100644 index 00000000..1e29068d Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight46.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight46.png.meta b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight46.png.meta new file mode 100644 index 00000000..09755479 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight46.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 22802cebf78d3434b9d715f82bbe80c7 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight49.png b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight49.png new file mode 100644 index 00000000..b26ca4fd Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight49.png differ diff --git a/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight49.png.meta b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight49.png.meta new file mode 100644 index 00000000..c4011613 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Graphics/flatLight49.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 56bb3ea0d75a41248b88961a278b9599 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 150 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs.meta b/Assets/Scripts/Gameplay/CNControls/Prefabs.meta new file mode 100644 index 00000000..f467fa5e --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8fc328ad1f348e44bbbad8a23eb13603 +folderAsset: yes +timeCreated: 1471272981 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/2 Ways DPad Horizontal.prefab b/Assets/Scripts/Gameplay/CNControls/Prefabs/2 Ways DPad Horizontal.prefab new file mode 100644 index 00000000..c55063b7 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/2 Ways DPad Horizontal.prefab @@ -0,0 +1,219 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &111286 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22421908} + - 222: {fileID: 22244858} + - 114: {fileID: 11418066} + - 114: {fileID: 11410990} + m_Layer: 5 + m_Name: Left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &145036 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22482606} + - 222: {fileID: 22252370} + - 114: {fileID: 11451720} + - 114: {fileID: 11485602} + m_Layer: 5 + m_Name: Right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &164446 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22493834} + - 222: {fileID: 22230300} + - 114: {fileID: 11477240} + m_Layer: 5 + m_Name: 2 Ways DPad Horizontal + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11410990 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 111286} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0f6ae34570738c447a8f81bcb10d610c, type: 3} + m_Name: + m_EditorClassIdentifier: + AxisName: Horizontal + AxisMultiplier: -1 +--- !u!114 &11418066 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 111286} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11451720 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 145036} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11477240 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 164446} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2fa290c3290a9e04cb780c61b130e5af, type: 3} + m_Name: + m_EditorClassIdentifier: + DpadAxis: + - {fileID: 11410990} + - {fileID: 11485602} +--- !u!114 &11485602 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 145036} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0f6ae34570738c447a8f81bcb10d610c, type: 3} + m_Name: + m_EditorClassIdentifier: + AxisName: Horizontal + AxisMultiplier: 1 +--- !u!222 &22230300 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 164446} +--- !u!222 &22244858 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 111286} +--- !u!222 &22252370 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 145036} +--- !u!224 &22421908 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 111286} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22493834} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: .5} + m_AnchorMax: {x: 0, y: .5} + m_AnchoredPosition: {x: 50, y: 0} + m_SizeDelta: {x: 53.3333321, y: 53.3333321} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22482606 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 145036} + m_LocalRotation: {x: 0, y: 0, z: 1, w: -2.81631947e-06} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22493834} + m_RootOrder: 1 + m_AnchorMin: {x: 1, y: .5} + m_AnchorMax: {x: 1, y: .5} + m_AnchoredPosition: {x: -50, y: 0} + m_SizeDelta: {x: 53.3333321, y: 53.3333321} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22493834 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 164446} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22421908} + - {fileID: 22482606} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 194.900024, y: 185.699997} + m_Pivot: {x: 0, y: 0} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 164446} + m_IsPrefabParent: 1 diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/2 Ways DPad Horizontal.prefab.meta b/Assets/Scripts/Gameplay/CNControls/Prefabs/2 Ways DPad Horizontal.prefab.meta new file mode 100644 index 00000000..4bb311e8 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/2 Ways DPad Horizontal.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5cd0f2565c094c14c89345b5d6081634 +timeCreated: 1438005360 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/2 Ways DPad Vertical.prefab b/Assets/Scripts/Gameplay/CNControls/Prefabs/2 Ways DPad Vertical.prefab new file mode 100644 index 00000000..d63b6467 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/2 Ways DPad Vertical.prefab @@ -0,0 +1,219 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &101280 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22421832} + - 222: {fileID: 22280070} + - 114: {fileID: 11479480} + - 114: {fileID: 11431922} + m_Layer: 5 + m_Name: Down + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &102786 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22407522} + - 222: {fileID: 22280248} + - 114: {fileID: 11481010} + - 114: {fileID: 11499496} + m_Layer: 5 + m_Name: Up + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &113056 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22488274} + - 222: {fileID: 22268864} + - 114: {fileID: 11499200} + m_Layer: 5 + m_Name: 2 Ways DPad Vertical + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11431922 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 101280} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0f6ae34570738c447a8f81bcb10d610c, type: 3} + m_Name: + m_EditorClassIdentifier: + AxisName: Vertical + AxisMultiplier: -1 +--- !u!114 &11479480 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 101280} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11481010 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 102786} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11499200 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 113056} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2fa290c3290a9e04cb780c61b130e5af, type: 3} + m_Name: + m_EditorClassIdentifier: + DpadAxis: + - {fileID: 11431922} + - {fileID: 11499496} +--- !u!114 &11499496 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 102786} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0f6ae34570738c447a8f81bcb10d610c, type: 3} + m_Name: + m_EditorClassIdentifier: + AxisName: Vertical + AxisMultiplier: 1 +--- !u!222 &22268864 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 113056} +--- !u!222 &22280070 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 101280} +--- !u!222 &22280248 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 102786} +--- !u!224 &22407522 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 102786} + m_LocalRotation: {x: 0, y: 0, z: .707104445, w: -.707109153} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22488274} + m_RootOrder: 1 + m_AnchorMin: {x: .5, y: 1} + m_AnchorMax: {x: .5, y: 1} + m_AnchoredPosition: {x: 0, y: -50.5} + m_SizeDelta: {x: 53.3333321, y: 53.3333321} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22421832 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 101280} + m_LocalRotation: {x: 0, y: 0, z: .707109928, w: .707103729} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22488274} + m_RootOrder: 0 + m_AnchorMin: {x: .5, y: 0} + m_AnchorMax: {x: .5, y: 0} + m_AnchoredPosition: {x: 0, y: 50.5} + m_SizeDelta: {x: 53.3333321, y: 53.3333321} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22488274 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 113056} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22421832} + - {fileID: 22407522} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -97.5, y: 92.7999954} + m_SizeDelta: {x: 194.899994, y: 185.699997} + m_Pivot: {x: .5, y: .5} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 113056} + m_IsPrefabParent: 1 diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/2 Ways DPad Vertical.prefab.meta b/Assets/Scripts/Gameplay/CNControls/Prefabs/2 Ways DPad Vertical.prefab.meta new file mode 100644 index 00000000..0422f131 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/2 Ways DPad Vertical.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b75bc7ed435ad74409d972e2615f10d6 +timeCreated: 1438005389 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/4 Ways DPad.prefab b/Assets/Scripts/Gameplay/CNControls/Prefabs/4 Ways DPad.prefab new file mode 100644 index 00000000..d57943c5 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/4 Ways DPad.prefab @@ -0,0 +1,373 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &134710 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22438226} + - 222: {fileID: 22293874} + - 114: {fileID: 11444212} + - 114: {fileID: 11477646} + m_Layer: 5 + m_Name: Down + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &141556 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22458030} + - 222: {fileID: 22217044} + - 114: {fileID: 11430016} + - 114: {fileID: 11445802} + m_Layer: 5 + m_Name: Left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &151386 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22458516} + - 222: {fileID: 22264936} + - 114: {fileID: 11470322} + - 114: {fileID: 11483808} + m_Layer: 5 + m_Name: Right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &171938 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22408430} + - 222: {fileID: 22218032} + - 114: {fileID: 11499542} + m_Layer: 5 + m_Name: 4 Ways DPad + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &183878 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22418884} + - 222: {fileID: 22259110} + - 114: {fileID: 11454360} + - 114: {fileID: 11406244} + m_Layer: 5 + m_Name: Up + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11406244 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 183878} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0f6ae34570738c447a8f81bcb10d610c, type: 3} + m_Name: + m_EditorClassIdentifier: + AxisName: Vertical + AxisMultiplier: 1 +--- !u!114 &11430016 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 141556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11444212 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134710} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11445802 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 141556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0f6ae34570738c447a8f81bcb10d610c, type: 3} + m_Name: + m_EditorClassIdentifier: + AxisName: Horizontal + AxisMultiplier: -1 +--- !u!114 &11454360 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 183878} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11470322 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151386} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11477646 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134710} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0f6ae34570738c447a8f81bcb10d610c, type: 3} + m_Name: + m_EditorClassIdentifier: + AxisName: Vertical + AxisMultiplier: -1 +--- !u!114 &11483808 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151386} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0f6ae34570738c447a8f81bcb10d610c, type: 3} + m_Name: + m_EditorClassIdentifier: + AxisName: Horizontal + AxisMultiplier: 1 +--- !u!114 &11499542 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 171938} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2fa290c3290a9e04cb780c61b130e5af, type: 3} + m_Name: + m_EditorClassIdentifier: + DpadAxis: + - {fileID: 11445802} + - {fileID: 11483808} + - {fileID: 11477646} + - {fileID: 11406244} +--- !u!222 &22217044 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 141556} +--- !u!222 &22218032 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 171938} +--- !u!222 &22259110 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 183878} +--- !u!222 &22264936 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151386} +--- !u!222 &22293874 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134710} +--- !u!224 &22408430 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 171938} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22458030} + - {fileID: 22458516} + - {fileID: 22438226} + - {fileID: 22418884} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -134, y: 123.5} + m_SizeDelta: {x: 268, y: 247} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22418884 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 183878} + m_LocalRotation: {x: 0, y: 0, z: .707104445, w: -.707109153} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22408430} + m_RootOrder: 3 + m_AnchorMin: {x: .5, y: 1} + m_AnchorMax: {x: .5, y: 1} + m_AnchoredPosition: {x: 0, y: -50.5} + m_SizeDelta: {x: 100, y: 101} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22438226 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134710} + m_LocalRotation: {x: 0, y: 0, z: .707109928, w: .707103729} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22408430} + m_RootOrder: 2 + m_AnchorMin: {x: .5, y: 0} + m_AnchorMax: {x: .5, y: 0} + m_AnchoredPosition: {x: 0, y: 50.5} + m_SizeDelta: {x: 100, y: 101} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22458030 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 141556} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22408430} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: .5} + m_AnchorMax: {x: 0, y: .5} + m_AnchoredPosition: {x: 50, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22458516 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151386} + m_LocalRotation: {x: 0, y: 0, z: 1, w: -2.81631947e-06} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22408430} + m_RootOrder: 1 + m_AnchorMin: {x: 1, y: .5} + m_AnchorMax: {x: 1, y: .5} + m_AnchoredPosition: {x: -50, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: .5, y: .5} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 171938} + m_IsPrefabParent: 1 diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/4 Ways DPad.prefab.meta b/Assets/Scripts/Gameplay/CNControls/Prefabs/4 Ways DPad.prefab.meta new file mode 100644 index 00000000..84dcd845 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/4 Ways DPad.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c91b9e68ad78eb24c864bb9a4840ffae +timeCreated: 1437920939 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/Button.prefab b/Assets/Scripts/Gameplay/CNControls/Prefabs/Button.prefab new file mode 100644 index 00000000..2b56bea4 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/Button.prefab @@ -0,0 +1,92 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &189116 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22409286} + - 222: {fileID: 22292980} + - 114: {fileID: 11499078} + - 114: {fileID: 11460876} + m_Layer: 5 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11460876 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 189116} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6f80d719f998a67438e69f9f995732ae, type: 3} + m_Name: + m_EditorClassIdentifier: + ButtonName: Jump +--- !u!114 &11499078 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 189116} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 22802cebf78d3434b9d715f82bbe80c7, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &22292980 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 189116} +--- !u!224 &22409286 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 189116} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -94, y: 76.5} + m_SizeDelta: {x: 64, y: 64} + m_Pivot: {x: .5, y: .5} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 0} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: 59cc0c38fea8dac439f212edba8607b6, + type: 3} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 189116} + m_IsPrefabParent: 1 diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/Button.prefab.meta b/Assets/Scripts/Gameplay/CNControls/Prefabs/Button.prefab.meta new file mode 100644 index 00000000..92fd4431 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/Button.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 81acfa4b78dfa47499a6c2fd6e521ebd +timeCreated: 1437919517 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/Joystick.prefab b/Assets/Scripts/Gameplay/CNControls/Prefabs/Joystick.prefab new file mode 100644 index 00000000..fdd00771 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/Joystick.prefab @@ -0,0 +1,220 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &133826 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22483060} + - 222: {fileID: 22232102} + - 114: {fileID: 11489796} + m_Layer: 5 + m_Name: Stick + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &144978 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22450750} + - 222: {fileID: 22252930} + - 114: {fileID: 11487462} + - 114: {fileID: 11421910} + m_Layer: 5 + m_Name: Joystick + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &151076 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22486632} + - 222: {fileID: 22277172} + - 114: {fileID: 11480696} + m_Layer: 5 + m_Name: JoystickBase + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11421910 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 144978} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eeb64258239543b4db1c80658a0d4f2c, type: 3} + m_Name: + m_EditorClassIdentifier: + MovementRange: 50 + HorizontalAxisName: Horizontal + VerticalAxisName: Vertical + HideOnRelease: 1 + MoveBase: 1 + SnapsToFinger: 1 + JoystickMoveAxis: 3 + JoystickBase: {fileID: 11480696} + Stick: {fileID: 11489796} + TouchZone: {fileID: 22450750} +--- !u!114 &11480696 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151076} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: b29ef1894836dc440b43ab036ca764cb, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11487462 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 144978} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11489796 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 133826} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 4bc4df1939d750840a6c849a32296205, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &22232102 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 133826} +--- !u!222 &22252930 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 144978} +--- !u!222 &22277172 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151076} +--- !u!224 &22450750 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 144978} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22486632} + - {fileID: 22483060} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 250, y: 243} + m_Pivot: {x: 0, y: 0} +--- !u!224 &22483060 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 133826} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22450750} + m_RootOrder: 1 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: -25.0000534, y: -28.4999866} + m_SizeDelta: {x: 64, y: 64} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22486632 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151076} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22450750} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 100, y: 93} + m_SizeDelta: {x: 106.666656, y: 106.666656} + m_Pivot: {x: .5, y: .5} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 144978} + m_IsPrefabParent: 1 diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/Joystick.prefab.meta b/Assets/Scripts/Gameplay/CNControls/Prefabs/Joystick.prefab.meta new file mode 100644 index 00000000..ab5c1af9 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/Joystick.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 943b21e331e945146beb63726ff855df +timeCreated: 1437919467 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/SensitiveJoystick.prefab b/Assets/Scripts/Gameplay/CNControls/Prefabs/SensitiveJoystick.prefab new file mode 100644 index 00000000..9830fe9e --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/SensitiveJoystick.prefab @@ -0,0 +1,235 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &100000 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400000} + - 222: {fileID: 22200000} + - 114: {fileID: 11400002} + m_Layer: 5 + m_Name: Stick + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100002 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400002} + - 222: {fileID: 22200002} + - 114: {fileID: 11400004} + m_Layer: 5 + m_Name: Joystick Base + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100004 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400004} + - 222: {fileID: 22200004} + - 114: {fileID: 11400006} + - 114: {fileID: 11400000} + m_Layer: 5 + m_Name: SensitiveJoystick + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 82b762eb0f3558f409212c8907843e62, type: 3} + m_Name: + m_EditorClassIdentifier: + MovementRange: 50 + HorizontalAxisName: Horizontal + VerticalAxisName: Vertical + HideOnRelease: 0 + MoveBase: 1 + SnapsToFinger: 1 + JoystickMoveAxis: 3 + JoystickBase: {fileID: 11400004} + Stick: {fileID: 11400002} + TouchZone: {fileID: 22400004} + SensitivityCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 10 + - time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 +--- !u!114 &11400002 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 4bc4df1939d750840a6c849a32296205, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400004 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: b29ef1894836dc440b43ab036ca764cb, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400006 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &22200000 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} +--- !u!222 &22200002 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} +--- !u!222 &22200004 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} +--- !u!224 &22400000 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400004} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 96, y: 82} + m_SizeDelta: {x: 64, y: 64} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400002 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400004} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 96, y: 82} + m_SizeDelta: {x: 106.666656, y: 106.666656} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400004 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22400002} + - {fileID: 22400000} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 264, y: 248} + m_Pivot: {x: 0, y: 0} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 100004} + m_IsPrefabParent: 1 diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/SensitiveJoystick.prefab.meta b/Assets/Scripts/Gameplay/CNControls/Prefabs/SensitiveJoystick.prefab.meta new file mode 100644 index 00000000..d3574b5f --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/SensitiveJoystick.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bb945e2a87718084184a72db9cf1ee27 +timeCreated: 1440831317 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/Touchpad.prefab b/Assets/Scripts/Gameplay/CNControls/Prefabs/Touchpad.prefab new file mode 100644 index 00000000..a0281fd5 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/Touchpad.prefab @@ -0,0 +1,91 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &112956 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22455830} + - 222: {fileID: 22204170} + - 114: {fileID: 11455772} + - 114: {fileID: 11435220} + m_Layer: 5 + m_Name: Touchpad + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11435220 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 112956} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 15aa632517b93b5438ffbbbdfe98661d, type: 3} + m_Name: + m_EditorClassIdentifier: + HorizontalAxisName: Horizontal + VerticalAxisName: Vertical + PreserveInertia: 1 + Friction: 3 + ControlMoveAxis: 3 +--- !u!114 &11455772 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 112956} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: .643137276} + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &22204170 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 112956} +--- !u!224 &22455830 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 112956} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 264, y: 248} + m_Pivot: {x: 0, y: 0} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 112956} + m_IsPrefabParent: 1 diff --git a/Assets/Scripts/Gameplay/CNControls/Prefabs/Touchpad.prefab.meta b/Assets/Scripts/Gameplay/CNControls/Prefabs/Touchpad.prefab.meta new file mode 100644 index 00000000..f930056e --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Prefabs/Touchpad.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 844d770c99f6cf24da670a158eaf4fe1 +timeCreated: 1440872848 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/README.pdf b/Assets/Scripts/Gameplay/CNControls/README.pdf new file mode 100644 index 00000000..470cfc64 Binary files /dev/null and b/Assets/Scripts/Gameplay/CNControls/README.pdf differ diff --git a/Assets/Scripts/Gameplay/CNControls/README.pdf.meta b/Assets/Scripts/Gameplay/CNControls/README.pdf.meta new file mode 100644 index 00000000..92e6b059 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/README.pdf.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0a797d1f86cc2df40818ef3ddcb472ae +timeCreated: 1441024113 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts.meta b/Assets/Scripts/Gameplay/CNControls/Scripts.meta new file mode 100644 index 00000000..4bc58d0c --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 91095ab7683a9564da040e25c8b796de +folderAsset: yes +timeCreated: 1471272981 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem.meta b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem.meta new file mode 100644 index 00000000..4c592a6a --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d9deab3a09ed6124e8cbc43ca7eebd76 +folderAsset: yes +timeCreated: 1471272981 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/CnInputManager.cs b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/CnInputManager.cs new file mode 100644 index 00000000..9b25aa28 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/CnInputManager.cs @@ -0,0 +1,336 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace CnControls +{ + /// + /// Common input manager class + /// Can be used instead of Input logic, as it replicates the standard behaviour but adds additional logic + /// + public class CnInputManager + { + private static CnInputManager _instance; + + private static CnInputManager Instance + { + get { return _instance ?? (_instance = new CnInputManager()); } + } + + private CnInputManager() { } + + /// + /// Dictionary of virtual axis + /// Every axis can be mapped to a number of actual virtual axis, + /// as with standard Unity Input system where you can create different buttons for, say, "Horizontal" axis + /// + private Dictionary> _virtualAxisDictionary = + new Dictionary>(); + + /// + /// Dictionary of virtual buttons + /// Every button can be mapped to a number of actual virtual buttons, + /// as with standard Unity Input system where you can create different buttons for, say, "Jump" button + /// + private Dictionary> _virtualButtonsDictionary = + new Dictionary>(); + + /// + /// Additional logic for touch retreival + /// It's possible to add some reflection-based emulated touches + /// + public static int TouchCount + { + get + { + return Input.touchCount; + } + } + + /// + /// Additional logic for touch retreival + /// It's possible to add some reflection-based emulated touches + /// + public static Touch GetTouch(int touchIndex) + { + return Input.GetTouch(touchIndex); + } + + /// + /// GetAxis method for getting current values for any desired axis + /// + /// The name of the axis to get value from + /// + /// Current value of FIRST NON ZERO axis that are registered for that name + /// ZERO if non if the virtual axis are being tweaked + /// + public static float GetAxis(string axisName) + { + return GetAxis(axisName, false); + } + + /// + /// "Copy" of the Input.GetAxisRaw method + /// + /// The name of the axis to get value from + /// + /// Current value of FIRST NON ZERO axis that are registered for that name + /// ZERO if non if the virtual axis are being tweaked + /// + public static float GetAxisRaw(string axisName) + { + return GetAxis(axisName, true); + } + + /// + /// Common private method for getting the axis values + /// + /// The name of the axis to get value from + /// Whether the method sould return the raw value of the axis + /// + private static float GetAxis(string axisName, bool isRaw) + { + // If we have the axis registered as virtual, we call the retreival logic + if (AxisExists(axisName)) + { + return GetVirtualAxisValue(Instance._virtualAxisDictionary[axisName], axisName, isRaw); + } + + // If we don't have the desired virtual axis registered, we just fallback to the default Unity Input behaviour + return isRaw ? Input.GetAxisRaw(axisName) : Input.GetAxis(axisName); + } + + /// + /// Method for retrieval of the desired button pressed state + /// + /// The name of the desired button + /// Is the button being currently pressed? + public static bool GetButton(string buttonName) + { + // We first check the stadard Button behaviour + var standardInputButtonState = Input.GetButton(buttonName); + // If the stadard Unity Input button is being pressed, we just retur true + if (standardInputButtonState == true) return true; + + // If not, we check our virtual buttons + if (ButtonExists(buttonName)) + { + return GetAnyVirtualButton(Instance._virtualButtonsDictionary[buttonName]);; + } + + // If there is no such button registered, we return false; + return false; + } + + /// + /// Method for retrieval of the desired button "has just been pressed" state + /// + /// The name of the desired button + /// Is the button has just been pressed? + public static bool GetButtonDown(string buttonName) + { + // We first check the stadard Button behaviour + var standardInputButtonState = Input.GetButtonDown(buttonName); + // If the stadard Unity Input button is being pressed, we just retur true + if (standardInputButtonState == true) return true; + + // If not, we check our virtual buttons + if (ButtonExists(buttonName)) + { + return GetAnyVirtualButtonDown(Instance._virtualButtonsDictionary[buttonName]); + } + + // If there is no such button registered, we return false; + return false; + } + + /// + /// Method for retrieval of the desired button "has just been released" state + /// + /// The name of the desired button + /// Is the button has just been released? + public static bool GetButtonUp(string buttonName) + { + // We first check the stadard Button behaviour + var standardInputButtonState = Input.GetButtonUp(buttonName); + // If the stadard Unity Input button is being pressed, we just retur true + if (standardInputButtonState == true) return true; + + // If not, we check our virtual buttons + if (ButtonExists(buttonName)) + { + return GetAnyVirtualButtonUp(Instance._virtualButtonsDictionary[buttonName]); + } + + // If there is no such button registered, we return false; + return false; + } + + /// + /// Check whether the specified axis exists + /// + /// Name of the axis to check + /// Does this axis exist? + public static bool AxisExists(string axisName) + { + return Instance._virtualAxisDictionary.ContainsKey(axisName); + } + + /// + /// Check whether the specified button exists + /// + /// Name of the button to check + /// Does this button exist? + public static bool ButtonExists(string buttonName) + { + return Instance._virtualButtonsDictionary.ContainsKey(buttonName); + } + + /// + /// Registers the provided virtual axis + /// + /// Virtual axis to register + public static void RegisterVirtualAxis(VirtualAxis virtualAxis) + { + // If it's the first such virtual axis, create a new list for that axis name + if (!Instance._virtualAxisDictionary.ContainsKey(virtualAxis.Name)) + { + Instance._virtualAxisDictionary[virtualAxis.Name] = new List(); + } + + Instance._virtualAxisDictionary[virtualAxis.Name].Add(virtualAxis); + } + + /// + /// Unregisters the provided virtual axis + /// + /// Virtual axis to unregister + public static void UnregisterVirtualAxis(VirtualAxis virtualAxis) + { + // If it's the first such virtual axis, create a new list for that axis name + if (Instance._virtualAxisDictionary.ContainsKey(virtualAxis.Name)) + { + if (!Instance._virtualAxisDictionary[virtualAxis.Name].Remove(virtualAxis)) + { + Debug.LogError("Requested axis " + virtualAxis.Name + " exists, but there's no such virtual axis that you're trying to unregister"); + } + } + else + { + Debug.LogError("Trying to unregister an axis " + virtualAxis.Name + " that was never registered"); + } + } + + /// + /// Registers the provided virtual button + /// + /// Virtual button to register + public static void RegisterVirtualButton(VirtualButton virtualButton) + { + if (!Instance._virtualButtonsDictionary.ContainsKey(virtualButton.Name)) + { + Instance._virtualButtonsDictionary[virtualButton.Name] = new List(); + } + + Instance._virtualButtonsDictionary[virtualButton.Name].Add(virtualButton); + } + + /// + /// Unregisters the provided virtual button + /// + /// Virtual button to unregister + public static void UnregisterVirtualButton(VirtualButton virtualButton) + { + if (Instance._virtualButtonsDictionary.ContainsKey(virtualButton.Name)) + { + if (!Instance._virtualButtonsDictionary[virtualButton.Name].Remove(virtualButton)) + { + Debug.LogError("Requested button axis exists, but there's no such virtual button that you're trying to unregister"); + } + } + else + { + Debug.LogError("Trying to unregister a button that was never registered"); + } + } + + /// + /// Private method that get's the value of the first non-zero virtual axis, registered with the specified name + /// + /// List of virtual axis to search through + /// Name of the axis (for the standard Input behaviour) + /// Whether the method should return the Raw value of the axis + /// + private static float GetVirtualAxisValue(List virtualAxisList, string axisName, bool isRaw) + { + // The method is really straightforward here + // First, we check the standard Input.GetAxis method + // If it's not zero, we return the value + // If it IS zero, we return first non-zero value of any of the passed virtual axis + // Or zero if all of them are zero + + float axisValue = isRaw ? Input.GetAxisRaw(axisName) : Input.GetAxis(axisName); + if (!Mathf.Approximately(axisValue, 0f)) + { + return axisValue; + } + + for (int i = 0; i < virtualAxisList.Count; i++) + { + var currentAxisValue = virtualAxisList[i].Value; + if (!Mathf.Approximately(currentAxisValue, 0f)) + { + return currentAxisValue; + } + } + + return 0f; + } + + /// + /// Simple logic for checking whether is any of the virtual buttons has been just pressed + /// + /// Virtual buttons to search through + /// Is any of the buttons has just been pressed? + private static bool GetAnyVirtualButtonDown(List virtualButtons) + { + for (int i = 0; i < virtualButtons.Count; i++) + { + if (virtualButtons[i].GetButtonDown) return true; + } + + return false; + } + + /// + /// Simple logic for checking whether is any of the virtual buttons has been just released + /// + /// Virtual buttons to search through + /// Is any of the buttons has just been released? + private static bool GetAnyVirtualButtonUp(List virtualButtons) + { + for (int i = 0; i < virtualButtons.Count; i++) + { + if (virtualButtons[i].GetButtonUp) return true; + } + + return false; + } + + /// + /// Simple logic for checking whether is any of the virtual buttons is currently pressed + /// + /// Virtual buttons to search through + /// Is any of the buttons currently pressed? + private static bool GetAnyVirtualButton(List virtualButtons) + { + for (int i = 0; i < virtualButtons.Count; i++) + { + if (virtualButtons[i].GetButton) return true; + } + + return false; + } + + } +} + diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/CnInputManager.cs.meta b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/CnInputManager.cs.meta new file mode 100644 index 00000000..303aba42 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/CnInputManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2cfc89c3e4780c94b9c4bf0df5faf591 +timeCreated: 1437294313 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/VirtualAxis.cs b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/VirtualAxis.cs new file mode 100644 index 00000000..46289f0a --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/VirtualAxis.cs @@ -0,0 +1,23 @@ +namespace CnControls +{ + /// + /// Virtual axis class + /// + public class VirtualAxis + { + /// + /// Name of the axis for which this virtual axis has to be registered + /// + public string Name { get; set; } + + /// + /// Curret value of the axis + /// + public float Value { get; set; } + + public VirtualAxis(string name) + { + Name = name; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/VirtualAxis.cs.meta b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/VirtualAxis.cs.meta new file mode 100644 index 00000000..6c3ab450 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/VirtualAxis.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1088a533affeb5e48971abf7fcc1d038 +timeCreated: 1437295312 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/VirtualButton.cs b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/VirtualButton.cs new file mode 100644 index 00000000..7e60353d --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/VirtualButton.cs @@ -0,0 +1,87 @@ +using UnityEngine; + +namespace CnControls +{ + /// + /// Virtual button class + /// + public class VirtualButton + { + /// + /// Name of the button for which this virtual button has to be registered + /// + public string Name { get; set; } + + /// + /// Is this button currently pressed? + /// + public bool IsPressed { get; private set; } + + /// + /// The last frame this button was pressed + /// + private int _lastPressedFrame = -1; + + /// + /// The last frame this butto was released + /// + private int _lastReleasedFrame = -1; + + public VirtualButton(string name) + { + Name = name; + } + + /// + /// Press logic sets the current state of the button to "IsPressed" untill the Release() method is called + /// + public void Press() + { + if (IsPressed) + { + return; + } + IsPressed = true; + _lastPressedFrame = Time.frameCount; + } + + /// + /// Release logic frees the button from its "IsPressed" state + /// + public void Release() + { + IsPressed = false; + _lastReleasedFrame = Time.frameCount; + } + + /// + /// Is this button currently pressed? + /// + public bool GetButton + { + get { return IsPressed; } + } + + /// + /// Check whether this button has just been pressed + /// + public bool GetButtonDown + { + get + { + return _lastPressedFrame != -1 && _lastPressedFrame - Time.frameCount == -1; + } + } + + /// + /// Check whether this button has just been released + /// + public bool GetButtonUp + { + get + { + return _lastReleasedFrame != -1 && _lastReleasedFrame == Time.frameCount - 1; + } + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/VirtualButton.cs.meta b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/VirtualButton.cs.meta new file mode 100644 index 00000000..28dfe2b9 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/CnInputSystem/VirtualButton.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 31e002a3108352a4ba5d5ff7719fe265 +timeCreated: 1437295313 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers.meta b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers.meta new file mode 100644 index 00000000..44ae9807 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ad022afeb51162240a2e4d9b119d7532 +folderAsset: yes +timeCreated: 1471272981 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/CommonOnScreenControl.cs b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/CommonOnScreenControl.cs new file mode 100644 index 00000000..92ccc9bb --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/CommonOnScreenControl.cs @@ -0,0 +1,6 @@ +using UnityEngine; + +public class CommonOnScreenControl : MonoBehaviour +{ + +} diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/CommonOnScreenControl.cs.meta b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/CommonOnScreenControl.cs.meta new file mode 100644 index 00000000..1a59a6d6 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/CommonOnScreenControl.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2cc30ec9654a3874699b5f5a8af57270 +timeCreated: 1471369077 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/Dpad.cs b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/Dpad.cs new file mode 100644 index 00000000..68be85dd --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/Dpad.cs @@ -0,0 +1,37 @@ +using UnityEngine; +using UnityEngine.EventSystems; + +namespace CnControls +{ + public class Dpad : MonoBehaviour, IPointerDownHandler, IPointerUpHandler + { + public DpadAxis[] DpadAxis; + + /// + /// Current event camera reference. Needed for the sake of Unity Remote input + /// + public Camera CurrentEventCamera { get; set; } + + public void OnPointerDown(PointerEventData eventData) + { + CurrentEventCamera = eventData.pressEventCamera ?? CurrentEventCamera; + + foreach (var dpadAxis in DpadAxis) + { + if (RectTransformUtility.RectangleContainsScreenPoint(dpadAxis.RectTransform, eventData.position, + CurrentEventCamera)) + { + dpadAxis.Press(eventData.position, CurrentEventCamera, eventData.pointerId); + } + } + } + + public void OnPointerUp(PointerEventData eventData) + { + foreach (var dpadAxis in DpadAxis) + { + dpadAxis.TryRelease(eventData.pointerId); + } + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/Dpad.cs.meta b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/Dpad.cs.meta new file mode 100644 index 00000000..b1af2b2d --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/Dpad.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2fa290c3290a9e04cb780c61b130e5af +timeCreated: 1437919838 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/DpadAxis.cs b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/DpadAxis.cs new file mode 100644 index 00000000..349c5042 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/DpadAxis.cs @@ -0,0 +1,47 @@ +using UnityEngine; + +namespace CnControls +{ + public class DpadAxis : MonoBehaviour + { + public string AxisName; + public float AxisMultiplier; + + public RectTransform RectTransform { get; private set; } + public int LastFingerId { get; set; } + private VirtualAxis _virtualAxis; + + private void Awake() + { + RectTransform = GetComponent(); + } + + private void OnEnable() + { + _virtualAxis = _virtualAxis ?? new VirtualAxis(AxisName); + LastFingerId = -1; + + CnInputManager.RegisterVirtualAxis(_virtualAxis); + } + + private void OnDisable() + { + CnInputManager.UnregisterVirtualAxis(_virtualAxis); + } + + public void Press(Vector2 screenPoint, Camera eventCamera, int pointerId) + { + _virtualAxis.Value = Mathf.Clamp(AxisMultiplier, -1f, 1f); + LastFingerId = pointerId; + } + + public void TryRelease(int pointerId) + { + if (LastFingerId == pointerId) + { + _virtualAxis.Value = 0f; + LastFingerId = -1; + } + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/DpadAxis.cs.meta b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/DpadAxis.cs.meta new file mode 100644 index 00000000..2be73f52 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/DpadAxis.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0f6ae34570738c447a8f81bcb10d610c +timeCreated: 1437920835 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SensitiveJoystick.cs b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SensitiveJoystick.cs new file mode 100644 index 00000000..48ee8539 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SensitiveJoystick.cs @@ -0,0 +1,26 @@ +using UnityEngine.EventSystems; +using UnityEngine; + +namespace CnControls +{ + public class SensitiveJoystick : SimpleJoystick + { + public AnimationCurve SensitivityCurve = new AnimationCurve( + new Keyframe(0f, 0f, 1f, 1f), + new Keyframe(1f, 1f, 1f, 1f)); + + public override void OnDrag(PointerEventData eventData) + { + base.OnDrag(eventData); + + var linearHorizontalValue = HorizintalAxis.Value; + var linearVecticalValue = VerticalAxis.Value; + + var horizontalSign = Mathf.Sign(linearHorizontalValue); + var verticalSign = Mathf.Sign(linearVecticalValue); + + HorizintalAxis.Value = horizontalSign * SensitivityCurve.Evaluate(horizontalSign * linearHorizontalValue); + VerticalAxis.Value = verticalSign * SensitivityCurve.Evaluate(verticalSign * linearVecticalValue); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SensitiveJoystick.cs.meta b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SensitiveJoystick.cs.meta new file mode 100644 index 00000000..1eceb14e --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SensitiveJoystick.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 82b762eb0f3558f409212c8907843e62 +timeCreated: 1440831255 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SimpleButton.cs b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SimpleButton.cs new file mode 100644 index 00000000..752a0138 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SimpleButton.cs @@ -0,0 +1,60 @@ +using UnityEngine; +using UnityEngine.EventSystems; + +namespace CnControls +{ + /// + /// Simple button class + /// Handles press, hold and release, just like a normal button + /// + public class SimpleButton : MonoBehaviour, IPointerUpHandler, IPointerDownHandler + { + /// + /// The name of the button + /// + public string ButtonName = "Jump"; + + /// + /// Utility object that is registered in the system + /// + private VirtualButton _virtualButton; + + /// + /// It's pretty simple here + /// When we enable, we register our button in the input system + /// + private void OnEnable() + { + _virtualButton = _virtualButton ?? new VirtualButton(ButtonName); + CnInputManager.RegisterVirtualButton(_virtualButton); + } + + /// + /// When we disable, we unregister our button + /// + private void OnDisable() + { + CnInputManager.UnregisterVirtualButton(_virtualButton); + } + + /// + /// uGUI Event system stuff + /// It's also utilised by the editor input helper + /// + /// Data of the passed event + public void OnPointerUp(PointerEventData eventData) + { + _virtualButton.Release(); + } + + /// + /// uGUI Event system stuff + /// It's also utilised by the editor input helper + /// + /// Data of the passed event + public void OnPointerDown(PointerEventData eventData) + { + _virtualButton.Press(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SimpleButton.cs.meta b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SimpleButton.cs.meta new file mode 100644 index 00000000..59444862 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SimpleButton.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6f80d719f998a67438e69f9f995732ae +timeCreated: 1437737392 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SimpleJoystick.cs b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SimpleJoystick.cs new file mode 100644 index 00000000..ca45fde6 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SimpleJoystick.cs @@ -0,0 +1,265 @@ +using System; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + +namespace CnControls +{ + [Flags] + public enum ControlMovementDirection + { + Horizontal = 0x1, + Vertical = 0x2, + Both = Horizontal | Vertical + } + + /// + /// Simple joystick class + /// Contains logic for creating a simple joystick + /// + public class SimpleJoystick : MonoBehaviour, IDragHandler, IPointerUpHandler, IPointerDownHandler + { + /// + /// Current event camera reference. Needed for the sake of Unity Remote input + /// + public Camera CurrentEventCamera { get; set; } + + // ------- Inspector visible variables --------------------------------------- + + /// + /// The range in non-scaled pixels for which we can drag the joystick around + /// + public float MovementRange = 50f; + + /// + /// The name of the horizontal axis for this joystick to update + /// + public string HorizontalAxisName = "Horizontal"; + + /// + /// The name of the vertical axis for this joystick to update + /// + public string VerticalAxisName = "Vertical"; + + /// + /// Should the joystick be hidden when the user releases the finger? + /// [Space(15f)] attribute is needed only for the editor, it creates some spacing in the inspector + /// + [Space(15f)] + [Tooltip("Should the joystick be hidden on release?")] + public bool HideOnRelease; + + /// + /// Should the joystick be moved along with the finger + /// + [Tooltip("Should the Base image move along with the finger without any constraints?")] + public bool MoveBase = true; + + /// + /// Should the joystick be moved along with the finger + /// + [Tooltip("Should the joystick snap to finger? If it's FALSE, the MoveBase checkbox logic will be ommited")] + public bool SnapsToFinger = true; + + /// + /// Joystick movement direction + /// Specifies the axis along which it can move + /// + [Tooltip("Constraints on the joystick movement axis")] + public ControlMovementDirection JoystickMoveAxis = ControlMovementDirection.Both; + + /// + /// Image of the joystick base + /// + [Tooltip("Image of the joystick base")] + public Image JoystickBase; + + /// + /// Image of the stick itself + /// + [Tooltip("Image of the stick itself")] + public Image Stick; + + /// + /// Rect Transform of the touch zone + /// + [Tooltip("Touch Zone transform")] + public RectTransform TouchZone; + + // --------------------------------------------------------------------------- + + private Vector2 _initialStickPosition; + private Vector2 _intermediateStickPosition; + private Vector2 _initialBasePosition; + private RectTransform _baseTransform; + private RectTransform _stickTransform; + + private float _oneOverMovementRange; + + protected VirtualAxis HorizintalAxis; + protected VirtualAxis VerticalAxis; + + private void Awake() + { + _stickTransform = Stick.GetComponent(); + _baseTransform = JoystickBase.GetComponent(); + + _initialStickPosition = _stickTransform.anchoredPosition; + _intermediateStickPosition = _initialStickPosition; + _initialBasePosition = _baseTransform.anchoredPosition; + + _stickTransform.anchoredPosition = _initialStickPosition; + _baseTransform.anchoredPosition = _initialBasePosition; + + _oneOverMovementRange = 1f / MovementRange; + + if (HideOnRelease) + { + Hide(true); + } + } + + private void OnEnable() + { + // When we enable, we get our virtual axis + + HorizintalAxis = HorizintalAxis ?? new VirtualAxis(HorizontalAxisName); + VerticalAxis = VerticalAxis ?? new VirtualAxis(VerticalAxisName); + + // And register them in our input system + CnInputManager.RegisterVirtualAxis(HorizintalAxis); + CnInputManager.RegisterVirtualAxis(VerticalAxis); + } + + private void OnDisable() + { + // When we disable, we just unregister our axis + // It also happens before the game object is Destroyed + CnInputManager.UnregisterVirtualAxis(HorizintalAxis); + CnInputManager.UnregisterVirtualAxis(VerticalAxis); + } + + public virtual void OnDrag(PointerEventData eventData) + { + // Unity remote multitouch related thing + // When we feed fake PointerEventData we can't really provide a camera, + // it has a lot of private setters via not created objects, so even the Reflection magic won't help a lot here + // Instead, we just provide an actual event camera as a public property so we can easily set it in the Input Helper class + CurrentEventCamera = eventData.pressEventCamera ?? CurrentEventCamera; + + // We get the local position of the joystick + Vector3 worldJoystickPosition; + RectTransformUtility.ScreenPointToWorldPointInRectangle(_stickTransform, eventData.position, + CurrentEventCamera, out worldJoystickPosition); + + // Then we change it's actual position so it snaps to the user's finger + _stickTransform.position = worldJoystickPosition; + // We then query it's anchored position. It's calculated internally and quite tricky to do from scratch here in C# + var stickAnchoredPosition = _stickTransform.anchoredPosition; + + // Some bitwise logic for constraining the joystick along one of the axis + // If the "Both" option was selected, non of these two checks will yield "true" + if ((JoystickMoveAxis & ControlMovementDirection.Horizontal) == 0) + { + stickAnchoredPosition.x = _intermediateStickPosition.x; + } + if ((JoystickMoveAxis & ControlMovementDirection.Vertical) == 0) + { + stickAnchoredPosition.y = _intermediateStickPosition.y; + } + + _stickTransform.anchoredPosition = stickAnchoredPosition; + + // Find current difference between the previous central point of the joystick and it's current position + Vector2 difference = new Vector2(stickAnchoredPosition.x, stickAnchoredPosition.y) - _intermediateStickPosition; + + // Normalisation stuff + var diffMagnitude = difference.magnitude; + var normalizedDifference = difference / diffMagnitude; + + // If the joystick is being dragged outside of it's range + if (diffMagnitude > MovementRange) + { + if (MoveBase && SnapsToFinger) + { + // We move the base so it maps the new joystick center position + var baseMovementDifference = difference.magnitude - MovementRange; + var addition = normalizedDifference * baseMovementDifference; + _baseTransform.anchoredPosition += addition; + _intermediateStickPosition += addition; + } + else + { + _stickTransform.anchoredPosition = _intermediateStickPosition + normalizedDifference * MovementRange; + } + } + + // We should now calculate axis values based on final position and not on "virtual" one + var finalStickAnchoredPosition = _stickTransform.anchoredPosition; + // Sanity recalculation + Vector2 finalDifference = new Vector2(finalStickAnchoredPosition.x, finalStickAnchoredPosition.y) - _intermediateStickPosition; + // We don't need any values that are greater than 1 or less than -1 + var horizontalValue = Mathf.Clamp(finalDifference.x * _oneOverMovementRange, -1f, 1f); + var verticalValue = Mathf.Clamp(finalDifference.y * _oneOverMovementRange, -1f, 1f); + + // Finally, we update our virtual axis + HorizintalAxis.Value = horizontalValue; + VerticalAxis.Value = verticalValue; + } + + public void OnPointerUp(PointerEventData eventData) + { + // When we lift our finger, we reset everything to the initial state + _baseTransform.anchoredPosition = _initialBasePosition; + _stickTransform.anchoredPosition = _initialStickPosition; + _intermediateStickPosition = _initialStickPosition; + + HorizintalAxis.Value = VerticalAxis.Value = 0f; + + // We also hide it if we specified that behaviour + if (HideOnRelease) + { + Hide(true); + } + } + + public void OnPointerDown(PointerEventData eventData) + { + // When we press, we first want to snap the joystick to the user's finger + if (SnapsToFinger) + { + CurrentEventCamera = eventData.pressEventCamera ?? CurrentEventCamera; + + Vector3 localStickPosition; + Vector3 localBasePosition; + RectTransformUtility.ScreenPointToWorldPointInRectangle(_stickTransform, eventData.position, + CurrentEventCamera, out localStickPosition); + RectTransformUtility.ScreenPointToWorldPointInRectangle(_baseTransform, eventData.position, + CurrentEventCamera, out localBasePosition); + + _baseTransform.position = localBasePosition; + _stickTransform.position = localStickPosition; + _intermediateStickPosition = _stickTransform.anchoredPosition; + } + else + { + OnDrag(eventData); + } + // We also want to show it if we specified that behaviour + if (HideOnRelease) + { + Hide(false); + } + } + + /// + /// Simple "Hide" behaviour + /// + /// Whether the joystick should be hidden + private void Hide(bool isHidden) + { + JoystickBase.gameObject.SetActive(!isHidden); + Stick.gameObject.SetActive(!isHidden); + } + } +} diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SimpleJoystick.cs.meta b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SimpleJoystick.cs.meta new file mode 100644 index 00000000..8e8bfc91 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/SimpleJoystick.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: eeb64258239543b4db1c80658a0d4f2c +timeCreated: 1437298014 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/Touchpad.cs b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/Touchpad.cs new file mode 100644 index 00000000..cb010d75 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/Touchpad.cs @@ -0,0 +1,112 @@ +using UnityEngine; +using UnityEngine.EventSystems; + +namespace CnControls +{ + public class Touchpad : MonoBehaviour, IDragHandler, IPointerUpHandler, IPointerDownHandler + { + /// + /// Current event camera reference. Needed for the sake of Unity Remote input + /// + public Camera CurrentEventCamera { get; set; } + + /// + /// The name of the horizontal axis for this touchpad to update + /// + public string HorizontalAxisName = "Horizontal"; + + /// + /// The name of the vertical axis for this touchpad to update + /// + public string VerticalAxisName = "Vertical"; + + /// + /// Whether this touchpad should preserve inertia when the finger is lifted + /// + public bool PreserveInertia = true; + + /// + /// The speed of decay of inertia + /// + public float Friction = 3f; + + private VirtualAxis _horizintalAxis; + private VirtualAxis _verticalAxis; + private int _lastDragFrameNumber; + private bool _isCurrentlyTweaking; + + /// + /// Joystick movement direction + /// Specifies the axis along which it can move + /// + [Tooltip("Constraints on the joystick movement axis")] + public ControlMovementDirection ControlMoveAxis = ControlMovementDirection.Both; + + private void OnEnable() + { + // When we enable, we get our virtual axis + + _horizintalAxis = _horizintalAxis ?? new VirtualAxis(HorizontalAxisName); + _verticalAxis = _verticalAxis ?? new VirtualAxis(VerticalAxisName); + + // And register them in our input system + CnInputManager.RegisterVirtualAxis(_horizintalAxis); + CnInputManager.RegisterVirtualAxis(_verticalAxis); + } + + private void OnDisable() + { + // When we disable, we just unregister our axis + // It also happens before the game object is Destroyed + CnInputManager.UnregisterVirtualAxis(_horizintalAxis); + CnInputManager.UnregisterVirtualAxis(_verticalAxis); + } + + public virtual void OnDrag(PointerEventData eventData) + { + // Some bitwise logic for constraining the touchpad along one of the axis + // If the "Both" option was selected, non of these two checks will yield "true" + if ((ControlMoveAxis & ControlMovementDirection.Horizontal) != 0) + { + _horizintalAxis.Value = eventData.delta.x; + } + if ((ControlMoveAxis & ControlMovementDirection.Vertical) != 0) + { + _verticalAxis.Value = eventData.delta.y; + } + + _lastDragFrameNumber = Time.renderedFrameCount; + } + + public void OnPointerUp(PointerEventData eventData) + { + _isCurrentlyTweaking = false; + if (!PreserveInertia) + { + _horizintalAxis.Value = 0f; + _verticalAxis.Value = 0f; + } + } + + public void OnPointerDown(PointerEventData eventData) + { + _isCurrentlyTweaking = true; + OnDrag(eventData); + } + + private void Update() + { + if (_isCurrentlyTweaking && _lastDragFrameNumber < Time.renderedFrameCount - 2) + { + _horizintalAxis.Value = 0f; + _verticalAxis.Value = 0f; + } + + if (PreserveInertia && !_isCurrentlyTweaking) + { + _horizintalAxis.Value = Mathf.Lerp(_horizintalAxis.Value, 0f, Friction * Time.deltaTime); + _verticalAxis.Value = Mathf.Lerp(_verticalAxis.Value, 0f, Friction * Time.deltaTime); + } + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/Touchpad.cs.meta b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/Touchpad.cs.meta new file mode 100644 index 00000000..48fda625 --- /dev/null +++ b/Assets/Scripts/Gameplay/CNControls/Scripts/Controllers/Touchpad.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 15aa632517b93b5438ffbbbdfe98661d +timeCreated: 1440872696 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/GameplayObjects/RuntimeDataContainers/GameDataSource.cs b/Assets/Scripts/Gameplay/GameplayObjects/RuntimeDataContainers/GameDataSource.cs index bc64e6a4..eb9600ee 100644 --- a/Assets/Scripts/Gameplay/GameplayObjects/RuntimeDataContainers/GameDataSource.cs +++ b/Assets/Scripts/Gameplay/GameplayObjects/RuntimeDataContainers/GameDataSource.cs @@ -87,6 +87,8 @@ namespace Unity.BossRoom.Gameplay.GameplayObjects public string VectorWallAbilityKey = "VectorWall"; public string TheExecutionerKey = "TheExecutioner"; public string CrowsForesightKey = "CrowsForesight"; + public string SwapButtonKey = "Swap"; + public string SprintButtonKey = "Sprint"; public List m_AllActions; diff --git a/Assets/Standard Assets.meta b/Assets/Standard Assets.meta new file mode 100644 index 00000000..86ac627c --- /dev/null +++ b/Assets/Standard Assets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5da83ca3c987d754aa5da08b78f5b219 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/URP/Mobile/0_UniversalRenderPipelineAsset_Mobile_Low.asset b/Assets/URP/Mobile/0_UniversalRenderPipelineAsset_Mobile_Low.asset index d979ed1e..3299a873 100644 --- a/Assets/URP/Mobile/0_UniversalRenderPipelineAsset_Mobile_Low.asset +++ b/Assets/URP/Mobile/0_UniversalRenderPipelineAsset_Mobile_Low.asset @@ -72,6 +72,7 @@ MonoBehaviour: m_ColorGradingMode: 0 m_ColorGradingLutSize: 16 m_UseFastSRGBLinearConversion: 1 + m_SupportDataDrivenLensFlare: 1 m_ShadowType: 1 m_LocalShadowsSupported: 0 m_LocalShadowsAtlasResolution: 256 @@ -81,9 +82,9 @@ MonoBehaviour: m_Textures: blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} - m_PrefilteringModeMainLightShadows: 1 + m_PrefilteringModeMainLightShadows: 0 m_PrefilteringModeAdditionalLight: 1 - m_PrefilteringModeAdditionalLightShadows: 2 + m_PrefilteringModeAdditionalLightShadows: 0 m_PrefilterXRKeywords: 1 m_PrefilteringModeForwardPlus: 0 m_PrefilteringModeDeferredRendering: 0 @@ -103,6 +104,10 @@ MonoBehaviour: m_PrefilterDBufferMRT1: 1 m_PrefilterDBufferMRT2: 1 m_PrefilterDBufferMRT3: 1 + m_PrefilterSoftShadowsQualityLow: 1 + m_PrefilterSoftShadowsQualityMedium: 1 + m_PrefilterSoftShadowsQualityHigh: 1 + m_PrefilterSoftShadows: 0 m_PrefilterScreenCoord: 1 m_PrefilterNativeRenderPass: 1 m_ShaderVariantLogLevel: 0 diff --git a/Assets/URP/Mobile/1_UniversalRenderPipelineAsset_Mobile_Medium.asset b/Assets/URP/Mobile/1_UniversalRenderPipelineAsset_Mobile_Medium.asset index f94e1b10..c0b99f1a 100644 --- a/Assets/URP/Mobile/1_UniversalRenderPipelineAsset_Mobile_Medium.asset +++ b/Assets/URP/Mobile/1_UniversalRenderPipelineAsset_Mobile_Medium.asset @@ -72,6 +72,7 @@ MonoBehaviour: m_ColorGradingMode: 0 m_ColorGradingLutSize: 16 m_UseFastSRGBLinearConversion: 0 + m_SupportDataDrivenLensFlare: 1 m_ShadowType: 1 m_LocalShadowsSupported: 0 m_LocalShadowsAtlasResolution: 256 @@ -81,9 +82,9 @@ MonoBehaviour: m_Textures: blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} - m_PrefilteringModeMainLightShadows: 1 + m_PrefilteringModeMainLightShadows: 0 m_PrefilteringModeAdditionalLight: 3 - m_PrefilteringModeAdditionalLightShadows: 2 + m_PrefilteringModeAdditionalLightShadows: 0 m_PrefilterXRKeywords: 1 m_PrefilteringModeForwardPlus: 0 m_PrefilteringModeDeferredRendering: 0 @@ -103,6 +104,10 @@ MonoBehaviour: m_PrefilterDBufferMRT1: 1 m_PrefilterDBufferMRT2: 1 m_PrefilterDBufferMRT3: 1 + m_PrefilterSoftShadowsQualityLow: 1 + m_PrefilterSoftShadowsQualityMedium: 1 + m_PrefilterSoftShadowsQualityHigh: 1 + m_PrefilterSoftShadows: 0 m_PrefilterScreenCoord: 1 m_PrefilterNativeRenderPass: 1 m_ShaderVariantLogLevel: 0 diff --git a/Assets/URP/Mobile/2_UniversalRenderPipelineAsset_Mobile_High.asset b/Assets/URP/Mobile/2_UniversalRenderPipelineAsset_Mobile_High.asset index f401c041..538f3206 100644 --- a/Assets/URP/Mobile/2_UniversalRenderPipelineAsset_Mobile_High.asset +++ b/Assets/URP/Mobile/2_UniversalRenderPipelineAsset_Mobile_High.asset @@ -72,6 +72,7 @@ MonoBehaviour: m_ColorGradingMode: 0 m_ColorGradingLutSize: 16 m_UseFastSRGBLinearConversion: 0 + m_SupportDataDrivenLensFlare: 1 m_ShadowType: 1 m_LocalShadowsSupported: 0 m_LocalShadowsAtlasResolution: 256 @@ -81,7 +82,7 @@ MonoBehaviour: m_Textures: blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} - m_PrefilteringModeMainLightShadows: 1 + m_PrefilteringModeMainLightShadows: 0 m_PrefilteringModeAdditionalLight: 3 m_PrefilteringModeAdditionalLightShadows: 2 m_PrefilterXRKeywords: 1 @@ -103,6 +104,10 @@ MonoBehaviour: m_PrefilterDBufferMRT1: 1 m_PrefilterDBufferMRT2: 1 m_PrefilterDBufferMRT3: 1 + m_PrefilterSoftShadowsQualityLow: 1 + m_PrefilterSoftShadowsQualityMedium: 1 + m_PrefilterSoftShadowsQualityHigh: 1 + m_PrefilterSoftShadows: 0 m_PrefilterScreenCoord: 1 m_PrefilterNativeRenderPass: 1 m_ShaderVariantLogLevel: 0 diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset index b16147e9..2e3408b8 100644 --- a/ProjectSettings/InputManager.asset +++ b/ProjectSettings/InputManager.asset @@ -101,6 +101,118 @@ InputManager: type: 0 axis: 0 joyNum: 0 + - serializedVersion: 3 + m_Name: Sprint + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Swap + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: CrowsForesight + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: TheExecutioner + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: VectorWall + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: FreezeThrow + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: DashNCrash + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 - serializedVersion: 3 m_Name: Mouse X descriptiveName: @@ -485,3 +597,4 @@ InputManager: type: 2 axis: 5 joyNum: 0 + m_UsePhysicalKeys: 1