This commit is contained in:
BOT Alex 2024-02-03 21:44:56 +01:00
commit 364aaced8b
4 changed files with 8 additions and 2 deletions

View File

@ -226,6 +226,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3dbdb849a2f5df14d9e109a7776c5ac0, type: 3} m_Script: {fileID: 11500000, guid: 3dbdb849a2f5df14d9e109a7776c5ac0, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
animationHandler: {fileID: 3878447480781341932}
moveSpeed: 70 moveSpeed: 70
stepCooldown: 0.2 stepCooldown: 0.2
stepVibrationTime: 0.05 stepVibrationTime: 0.05

View File

@ -226,6 +226,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3dbdb849a2f5df14d9e109a7776c5ac0, type: 3} m_Script: {fileID: 11500000, guid: 3dbdb849a2f5df14d9e109a7776c5ac0, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
animationHandler: {fileID: 3878447480781341932}
moveSpeed: 65 moveSpeed: 65
stepCooldown: 0.2 stepCooldown: 0.2
stepVibrationTime: 0.05 stepVibrationTime: 0.05

View File

@ -7,6 +7,7 @@ using System.Linq;
[RequireComponent(typeof(PlayerInput))] [RequireComponent(typeof(PlayerInput))]
public class PlayerMovement : MonoBehaviour public class PlayerMovement : MonoBehaviour
{ {
public PlayerAnimationHandler animationHandler;
public float moveSpeed = 5f; public float moveSpeed = 5f;
private Rigidbody2D rb; private Rigidbody2D rb;
@ -48,7 +49,7 @@ public class PlayerMovement : MonoBehaviour
if (playerInput.movement != Vector2.zero) if (playerInput.movement != Vector2.zero)
{ {
RumbleWalk(); RumbleWalk();
GetComponent<PlayerAnimationHandler>().Run(); animationHandler.Run();
} }
} }
private void FixedUpdate() private void FixedUpdate()

View File

@ -263,7 +263,10 @@ public class RopeSimulator : MonoBehaviour
// Handle squeze kills // Handle squeze kills
foreach (var collider in colliderToSquezeForce) foreach (var collider in colliderToSquezeForce)
{ {
ISquezeDamageReceiver squezeDamageReceiver = collider.Key.GetComponent<ISquezeDamageReceiver>(); ISquezeDamageReceiver squezeDamageReceiver = collider.Key.transform.root.GetComponent<ISquezeDamageReceiver>();
if (squezeDamageReceiver == null)
squezeDamageReceiver = collider.Key.GetComponent<ISquezeDamageReceiver>();
if (squezeDamageReceiver == null) continue; if (squezeDamageReceiver == null) continue;
squezeDamageReceiver.TakeSquezeDamage(collider.Value * squezeDamage); squezeDamageReceiver.TakeSquezeDamage(collider.Value * squezeDamage);