Improve dash feel/balance and fix z order

This commit is contained in:
2024-10-22 00:22:05 -07:00
parent fb16f650ac
commit 7be8e90d2a
4 changed files with 10 additions and 5 deletions

View File

@@ -110,7 +110,7 @@ MonoBehaviour:
swingDistance: 10 swingDistance: 10
damageStrength: 10 damageStrength: 10
attackCooldownSeconds: 2 attackCooldownSeconds: 2
dashDistance: 5 dashDistance: 20
dashCooldownSeconds: 5 dashCooldownSeconds: 5
lastAttackTime: 0 lastAttackTime: 0
lastDashTime: 0 lastDashTime: 0

View File

@@ -78,7 +78,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 1
m_Sprite: {fileID: -3751497128136096670, guid: 520c934c186517356929c5948597af6f, type: 3} m_Sprite: {fileID: -3751497128136096670, guid: 520c934c186517356929c5948597af6f, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0 m_FlipX: 0

View File

@@ -199,7 +199,7 @@ Canvas:
m_AdditionalShaderChannelsFlag: 25 m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0 m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingOrder: 0 m_SortingOrder: 4
m_TargetDisplay: 0 m_TargetDisplay: 0
--- !u!224 &109163895 --- !u!224 &109163895
RectTransform: RectTransform:
@@ -323,6 +323,10 @@ PrefabInstance:
propertyPath: attackCooldownSeconds propertyPath: attackCooldownSeconds
value: 3 value: 3
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7692843314178062085, guid: e05928a0d673caf999d31b31b994a112, type: 3}
propertyPath: m_SortingOrder
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: m_RemovedComponents:
- {fileID: 0} - {fileID: 0}
m_RemovedGameObjects: [] m_RemovedGameObjects: []
@@ -1063,7 +1067,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 1 m_SortingOrder: 3
m_Sprite: {fileID: -3753825769889500098, guid: 9216a0f04ef201ab08cf158320feac60, type: 3} m_Sprite: {fileID: -3753825769889500098, guid: 9216a0f04ef201ab08cf158320feac60, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0 m_FlipX: 0

View File

@@ -67,11 +67,12 @@ public class Teo : MonoBehaviour
dashing = true; dashing = true;
collider.enabled = false; collider.enabled = false;
controller.linearDamping = 0; controller.linearDamping = 0;
controller.linearVelocity = Vector2.zero;
controller.AddRelativeForce (new Vector2( controller.AddRelativeForce (new Vector2(
Input.mousePosition.x - Screen.width/2, Input.mousePosition.x - Screen.width/2,
Input.mousePosition.y - Screen.height/2 Input.mousePosition.y - Screen.height/2
).normalized * dashDistance); ).normalized * dashDistance);
yield return new WaitForSeconds(0.5F); yield return new WaitForSeconds(0.2F);
dashing = false; dashing = false;
collider.enabled = true; collider.enabled = true;
controller.linearDamping = 15; controller.linearDamping = 15;