From 1e50fc05d0acac2db715deb61403d5e27ab0cbef Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 1 Dec 2018 18:46:41 +0100 Subject: [PATCH] Add jump --- Assets/PhysMats.meta | 8 + .../A bit more of Friction.physicsMaterial2D | 10 + ...it more of Friction.physicsMaterial2D.meta | 8 + .../Almost one Friction.physicsMaterial2D | 10 + ...Almost one Friction.physicsMaterial2D.meta | 8 + ...about even more Friction.physicsMaterial2D | 10 + ... even more Friction.physicsMaterial2D.meta | 8 + .../Maybe a bit of Friction.physicsMaterial2D | 10 + ...e a bit of Friction.physicsMaterial2D.meta | 8 + Assets/PhysMats/No Friction.physicsMaterial2D | 10 + .../No Friction.physicsMaterial2D.meta | 8 + .../PhysMats/One Friction.physicsMaterial2D | 10 + .../One Friction.physicsMaterial2D.meta | 8 + Assets/Scenes/Main.unity | 275 +++++++++++++++++- Assets/Scripts/PlayerController.cs | 47 ++- Assets/Scripts/RotateTowardsMouse.cs | 15 + Assets/Scripts/RotateTowardsMouse.cs.meta | 11 + ProjectSettings/InputManager.asset | 4 +- ProjectSettings/Physics2DSettings.asset | 22 +- 19 files changed, 477 insertions(+), 13 deletions(-) create mode 100644 Assets/PhysMats.meta create mode 100644 Assets/PhysMats/A bit more of Friction.physicsMaterial2D create mode 100644 Assets/PhysMats/A bit more of Friction.physicsMaterial2D.meta create mode 100644 Assets/PhysMats/Almost one Friction.physicsMaterial2D create mode 100644 Assets/PhysMats/Almost one Friction.physicsMaterial2D.meta create mode 100644 Assets/PhysMats/How about even more Friction.physicsMaterial2D create mode 100644 Assets/PhysMats/How about even more Friction.physicsMaterial2D.meta create mode 100644 Assets/PhysMats/Maybe a bit of Friction.physicsMaterial2D create mode 100644 Assets/PhysMats/Maybe a bit of Friction.physicsMaterial2D.meta create mode 100644 Assets/PhysMats/No Friction.physicsMaterial2D create mode 100644 Assets/PhysMats/No Friction.physicsMaterial2D.meta create mode 100644 Assets/PhysMats/One Friction.physicsMaterial2D create mode 100644 Assets/PhysMats/One Friction.physicsMaterial2D.meta create mode 100644 Assets/Scripts/RotateTowardsMouse.cs create mode 100644 Assets/Scripts/RotateTowardsMouse.cs.meta diff --git a/Assets/PhysMats.meta b/Assets/PhysMats.meta new file mode 100644 index 0000000..0e0fcc1 --- /dev/null +++ b/Assets/PhysMats.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0591344437d3e884b9aa1944384e3fbd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PhysMats/A bit more of Friction.physicsMaterial2D b/Assets/PhysMats/A bit more of Friction.physicsMaterial2D new file mode 100644 index 0000000..885b596 --- /dev/null +++ b/Assets/PhysMats/A bit more of Friction.physicsMaterial2D @@ -0,0 +1,10 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!62 &6200000 +PhysicsMaterial2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: A bit more of Friction + friction: 0.4 + bounciness: 0 diff --git a/Assets/PhysMats/A bit more of Friction.physicsMaterial2D.meta b/Assets/PhysMats/A bit more of Friction.physicsMaterial2D.meta new file mode 100644 index 0000000..d62e008 --- /dev/null +++ b/Assets/PhysMats/A bit more of Friction.physicsMaterial2D.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 672659ddaa952984393a5d5e195fb5a9 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 6200000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PhysMats/Almost one Friction.physicsMaterial2D b/Assets/PhysMats/Almost one Friction.physicsMaterial2D new file mode 100644 index 0000000..a9971d9 --- /dev/null +++ b/Assets/PhysMats/Almost one Friction.physicsMaterial2D @@ -0,0 +1,10 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!62 &6200000 +PhysicsMaterial2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Almost one Friction + friction: 0.8 + bounciness: 0 diff --git a/Assets/PhysMats/Almost one Friction.physicsMaterial2D.meta b/Assets/PhysMats/Almost one Friction.physicsMaterial2D.meta new file mode 100644 index 0000000..e076364 --- /dev/null +++ b/Assets/PhysMats/Almost one Friction.physicsMaterial2D.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a2c35ba4983930b4aac404229a8166ea +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 6200000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PhysMats/How about even more Friction.physicsMaterial2D b/Assets/PhysMats/How about even more Friction.physicsMaterial2D new file mode 100644 index 0000000..460d08b --- /dev/null +++ b/Assets/PhysMats/How about even more Friction.physicsMaterial2D @@ -0,0 +1,10 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!62 &6200000 +PhysicsMaterial2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: How about even more Friction + friction: 0.6 + bounciness: 0 diff --git a/Assets/PhysMats/How about even more Friction.physicsMaterial2D.meta b/Assets/PhysMats/How about even more Friction.physicsMaterial2D.meta new file mode 100644 index 0000000..ca1f9be --- /dev/null +++ b/Assets/PhysMats/How about even more Friction.physicsMaterial2D.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 621bca8896ce75d49904062f67638952 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 6200000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PhysMats/Maybe a bit of Friction.physicsMaterial2D b/Assets/PhysMats/Maybe a bit of Friction.physicsMaterial2D new file mode 100644 index 0000000..284f7eb --- /dev/null +++ b/Assets/PhysMats/Maybe a bit of Friction.physicsMaterial2D @@ -0,0 +1,10 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!62 &6200000 +PhysicsMaterial2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Maybe a bit of Friction + friction: 0.2 + bounciness: 0 diff --git a/Assets/PhysMats/Maybe a bit of Friction.physicsMaterial2D.meta b/Assets/PhysMats/Maybe a bit of Friction.physicsMaterial2D.meta new file mode 100644 index 0000000..f0f3040 --- /dev/null +++ b/Assets/PhysMats/Maybe a bit of Friction.physicsMaterial2D.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2718fd464b52f8d4eb59cf000beeb34d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 6200000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PhysMats/No Friction.physicsMaterial2D b/Assets/PhysMats/No Friction.physicsMaterial2D new file mode 100644 index 0000000..2a29f84 --- /dev/null +++ b/Assets/PhysMats/No Friction.physicsMaterial2D @@ -0,0 +1,10 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!62 &6200000 +PhysicsMaterial2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: No Friction + friction: 0 + bounciness: 0 diff --git a/Assets/PhysMats/No Friction.physicsMaterial2D.meta b/Assets/PhysMats/No Friction.physicsMaterial2D.meta new file mode 100644 index 0000000..5deb2df --- /dev/null +++ b/Assets/PhysMats/No Friction.physicsMaterial2D.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 72b2e122a5a447c4e8bc2b8e82e7b769 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 6200000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PhysMats/One Friction.physicsMaterial2D b/Assets/PhysMats/One Friction.physicsMaterial2D new file mode 100644 index 0000000..9fd1ef6 --- /dev/null +++ b/Assets/PhysMats/One Friction.physicsMaterial2D @@ -0,0 +1,10 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!62 &6200000 +PhysicsMaterial2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: One Friction + friction: 1 + bounciness: 0 diff --git a/Assets/PhysMats/One Friction.physicsMaterial2D.meta b/Assets/PhysMats/One Friction.physicsMaterial2D.meta new file mode 100644 index 0000000..7b76f1b --- /dev/null +++ b/Assets/PhysMats/One Friction.physicsMaterial2D.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fbaa84dbda1fd274a8d3d7f5ed845199 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 6200000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 5dc9992..825661f 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -190,6 +190,250 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1404513268 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1404513272} + - component: {fileID: 1404513271} + - component: {fileID: 1404513270} + - component: {fileID: 1404513269} + m_Layer: 0 + m_Name: BlankSquare + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!50 &1404513269 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1404513268} + m_BodyType: 2 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 1 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!61 &1404513270 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1404513268} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1, y: 1} + newSize: {x: 1, y: 1} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 +--- !u!212 &1404513271 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1404513268} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + 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_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: a085a1d8dd249e44ab3240f69b09b723, type: 3} + m_Color: {r: 0.5188679, g: 0.5188679, b: 0.5188679, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &1404513272 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1404513268} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1.1, y: -4.04, z: 0} + m_LocalScale: {x: 9.302, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1691113317 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1691113321} + - component: {fileID: 1691113320} + - component: {fileID: 1691113319} + - component: {fileID: 1691113318} + m_Layer: 0 + m_Name: BlankSquare (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!50 &1691113318 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1691113317} + m_BodyType: 2 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 1 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!61 &1691113319 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1691113317} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1, y: 1} + newSize: {x: 1, y: 1} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 +--- !u!212 &1691113320 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1691113317} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + 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_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: a085a1d8dd249e44ab3240f69b09b723, type: 3} + m_Color: {r: 0.5188679, g: 0.5188679, b: 0.5188679, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &1691113321 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1691113317} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 4.09, y: -1.64, z: 0} + m_LocalScale: {x: 9.302, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1757104811 GameObject: m_ObjectHideFlags: 0 @@ -201,9 +445,11 @@ GameObject: - component: {fileID: 1757104814} - component: {fileID: 1757104813} - component: {fileID: 1757104812} + - component: {fileID: 1757104817} + - component: {fileID: 1757104816} m_Layer: 0 m_Name: Player - m_TagString: Untagged + m_TagString: Player m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 @@ -312,3 +558,30 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1757104816 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1757104811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 99a09fb4b7b83b84b90ddaa3bbb2ade5, type: 3} + m_Name: + m_EditorClassIdentifier: + currentHealth: 100 + maximumHealth: 100 +--- !u!114 &1757104817 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1757104811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d344a42c03e782945beb225928941a40, type: 3} + m_Name: + m_EditorClassIdentifier: + movementSpeed: 2 + initialJumpForce: 400 + pushDownOnReleaseForce: 200 diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs index 90e2946..5013fca 100644 --- a/Assets/Scripts/PlayerController.cs +++ b/Assets/Scripts/PlayerController.cs @@ -4,13 +4,44 @@ using UnityEngine; public class PlayerController : MonoBehaviour { - // Use this for initialization - void Start () { - - } - - // Update is called once per frame - void Update () { - + public float movementSpeed = 1f; + public float initialJumpForce = 10f; + public float pushDownOnReleaseForce = 5f; + public bool jumpAvailable = true; + + private new Rigidbody2D rigidbody; + + private void Start() + { + rigidbody = GetComponent(); + } + + private void FixedUpdate () { + float horizontalMovement = 0; + if(Input.GetKey(KeyCode.A)) { + horizontalMovement -= movementSpeed; + } + if(Input.GetKey(KeyCode.D)) + { + horizontalMovement += movementSpeed; + } + if(jumpAvailable && Input.GetKeyDown(KeyCode.W)) + { + jumpAvailable = false; + rigidbody.AddForce(Vector2.up * initialJumpForce); + } + if(Input.GetKeyUp(KeyCode.W)) + { + rigidbody.AddForce(Vector2.down * pushDownOnReleaseForce); + } + rigidbody.velocity = new Vector3(horizontalMovement * movementSpeed, rigidbody.velocity.y); } + + private void OnCollisionEnter2D(Collision2D collision) + { + if(collision.gameObject.CompareTag("Terrain")) + { + jumpAvailable = true; + } + } } diff --git a/Assets/Scripts/RotateTowardsMouse.cs b/Assets/Scripts/RotateTowardsMouse.cs new file mode 100644 index 0000000..78fdfad --- /dev/null +++ b/Assets/Scripts/RotateTowardsMouse.cs @@ -0,0 +1,15 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class RotateTowardsMouse : MonoBehaviour { + //Circa qualcosa così + + void Update() { + //Trova la direzione tra il transform e il braccio + Vector2 screenPosition = Camera.main.WorldToScreenPoint(transform.position); + Vector2 direction = (Vector2)Input.mousePosition - screenPosition; + //Cambia la rotazione dell'oggetto + transform.rotation = Quaternion.identity; + } +} diff --git a/Assets/Scripts/RotateTowardsMouse.cs.meta b/Assets/Scripts/RotateTowardsMouse.cs.meta new file mode 100644 index 0000000..c237edf --- /dev/null +++ b/Assets/Scripts/RotateTowardsMouse.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0fd81cb8014f74a4c989cf7c52c4138e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset index 17c8f53..c146675 100644 --- a/ProjectSettings/InputManager.asset +++ b/ProjectSettings/InputManager.asset @@ -13,9 +13,9 @@ InputManager: positiveButton: right altNegativeButton: a altPositiveButton: d - gravity: 3 + gravity: 100000000 dead: 0.001 - sensitivity: 3 + sensitivity: 100000000 snap: 1 invert: 0 type: 0 diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset index 132ee6b..5ff3359 100644 --- a/ProjectSettings/Physics2DSettings.asset +++ b/ProjectSettings/Physics2DSettings.asset @@ -5,7 +5,7 @@ Physics2DSettings: m_ObjectHideFlags: 0 serializedVersion: 3 m_Gravity: {x: 0, y: -9.81} - m_DefaultMaterial: {fileID: 0} + m_DefaultMaterial: {fileID: 6200000, guid: fbaa84dbda1fd274a8d3d7f5ed845199, type: 2} m_VelocityIterations: 8 m_PositionIterations: 3 m_VelocityThreshold: 1 @@ -19,10 +19,28 @@ Physics2DSettings: m_LinearSleepTolerance: 0.01 m_AngularSleepTolerance: 2 m_DefaultContactOffset: 0.01 + m_JobOptions: + serializedVersion: 2 + useMultithreading: 0 + useConsistencySorting: 0 + m_InterpolationPosesPerJob: 100 + m_NewContactsPerJob: 30 + m_CollideContactsPerJob: 100 + m_ClearFlagsPerJob: 200 + m_ClearBodyForcesPerJob: 200 + m_SyncDiscreteFixturesPerJob: 50 + m_SyncContinuousFixturesPerJob: 50 + m_FindNearestContactsPerJob: 100 + m_UpdateTriggerContactsPerJob: 100 + m_IslandSolverCostThreshold: 100 + m_IslandSolverBodyCostScale: 1 + m_IslandSolverContactCostScale: 10 + m_IslandSolverJointCostScale: 10 + m_IslandSolverBodiesPerJob: 50 + m_IslandSolverContactsPerJob: 50 m_AutoSimulation: 1 m_QueriesHitTriggers: 1 m_QueriesStartInColliders: 1 - m_ChangeStopsCallbacks: 0 m_CallbacksOnDisable: 1 m_AutoSyncTransforms: 1 m_AlwaysShowColliders: 0