feat: Player Dash & DoubleJump

This commit is contained in:
2026-06-09 14:01:18 +02:00
parent 1e9e4ace81
commit 8698d55b9f
10 changed files with 11190 additions and 238 deletions

View File

@@ -45,9 +45,10 @@ public class PlayerAnimation : MonoBehaviour
private void Init()
{
_stateMapper = new PlayerAnimationStateMapper[8];
_stateMapper = new PlayerAnimationStateMapper[9];
int i = 0;
_stateMapper[0] = new PlayerAnimationStateMapper()
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
PlayerState = Player.PlayerState.Idle,
AnimatorState = "move",
@@ -55,7 +56,7 @@ public class PlayerAnimation : MonoBehaviour
Trigger = "trigger_move",
};
_stateMapper[1] = new PlayerAnimationStateMapper()
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
PlayerState = Player.PlayerState.Moving,
AnimatorState = "move",
@@ -63,7 +64,7 @@ public class PlayerAnimation : MonoBehaviour
Trigger = "trigger_move",
};
_stateMapper[2] = new PlayerAnimationStateMapper()
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
PlayerState = Player.PlayerState.Jumping,
AnimatorState = "jump",
@@ -71,7 +72,15 @@ public class PlayerAnimation : MonoBehaviour
Trigger = "trigger_jump",
};
_stateMapper[3] = new PlayerAnimationStateMapper()
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
PlayerState = Player.PlayerState.Dashing,
AnimatorState = "dash",
BlockingState = "",
Trigger = "trigger_dash",
};
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
PlayerState = Player.PlayerState.Falling,
AnimatorState = "fall",
@@ -79,7 +88,7 @@ public class PlayerAnimation : MonoBehaviour
Trigger = "trigger_fall",
};
_stateMapper[4] = new PlayerAnimationStateMapper()
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
PlayerState = Player.PlayerState.Stunned,
AnimatorState = "stun",
@@ -87,7 +96,7 @@ public class PlayerAnimation : MonoBehaviour
Trigger = "trigger_stun",
};
_stateMapper[5] = new PlayerAnimationStateMapper()
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
PlayerState = Player.PlayerState.Dead,
AnimatorState = "eliminate",
@@ -95,7 +104,7 @@ public class PlayerAnimation : MonoBehaviour
Trigger = "trigger_eliminate",
};
_stateMapper[6] = new PlayerAnimationStateMapper()
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
PlayerState = Player.PlayerState.Loser,
AnimatorState = "lose",
@@ -103,7 +112,7 @@ public class PlayerAnimation : MonoBehaviour
Trigger = "trigger_lose",
};
_stateMapper[7] = new PlayerAnimationStateMapper()
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
PlayerState = Player.PlayerState.Winner,
AnimatorState = "win",