diff --git a/Assets/Player.prefab b/Assets/Player.prefab index 63645b0..1217bb3 100644 --- a/Assets/Player.prefab +++ b/Assets/Player.prefab @@ -110,7 +110,7 @@ MonoBehaviour: swingDistance: 10 damageStrength: 10 attackCooldownSeconds: 2 - dashDistance: 5 + dashDistance: 20 dashCooldownSeconds: 5 lastAttackTime: 0 lastDashTime: 0 diff --git a/Assets/Ratbot.prefab b/Assets/Ratbot.prefab index 4ddd195..0e0208b 100644 --- a/Assets/Ratbot.prefab +++ b/Assets/Ratbot.prefab @@ -78,7 +78,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 0 + m_SortingOrder: 1 m_Sprite: {fileID: -3751497128136096670, guid: 520c934c186517356929c5948597af6f, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 524732a..d653549 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -199,7 +199,7 @@ Canvas: m_AdditionalShaderChannelsFlag: 25 m_UpdateRectTransformForStandalone: 0 m_SortingLayerID: 0 - m_SortingOrder: 0 + m_SortingOrder: 4 m_TargetDisplay: 0 --- !u!224 &109163895 RectTransform: @@ -323,6 +323,10 @@ PrefabInstance: propertyPath: attackCooldownSeconds value: 3 objectReference: {fileID: 0} + - target: {fileID: 7692843314178062085, guid: e05928a0d673caf999d31b31b994a112, type: 3} + propertyPath: m_SortingOrder + value: 2 + objectReference: {fileID: 0} m_RemovedComponents: - {fileID: 0} m_RemovedGameObjects: [] @@ -1063,7 +1067,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 1 + m_SortingOrder: 3 m_Sprite: {fileID: -3753825769889500098, guid: 9216a0f04ef201ab08cf158320feac60, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 diff --git a/Assets/Teo.cs b/Assets/Teo.cs index 3a14d87..63edc11 100644 --- a/Assets/Teo.cs +++ b/Assets/Teo.cs @@ -67,11 +67,12 @@ public class Teo : MonoBehaviour dashing = true; collider.enabled = false; controller.linearDamping = 0; + controller.linearVelocity = Vector2.zero; controller.AddRelativeForce (new Vector2( Input.mousePosition.x - Screen.width/2, Input.mousePosition.y - Screen.height/2 ).normalized * dashDistance); - yield return new WaitForSeconds(0.5F); + yield return new WaitForSeconds(0.2F); dashing = false; collider.enabled = true; controller.linearDamping = 15;