Skip to content
Snippets Groups Projects
Commit f7ebea3a authored by Kenneth Ezekiel's avatar Kenneth Ezekiel
Browse files

fix: error on stats

parent 63135d2b
Branches
No related merge requests found
...@@ -27,9 +27,9 @@ public class Player : PlayerEntity ...@@ -27,9 +27,9 @@ public class Player : PlayerEntity
Health *= GameConfig.DIFFICULTY_MODIFIERS[GameSaveData.instance.difficulty].playerHealthMultiplier; Health *= GameConfig.DIFFICULTY_MODIFIERS[GameSaveData.instance.difficulty].playerHealthMultiplier;
stateController = new PlayerStateController(this); stateController = new PlayerStateController(this);
inputController = new PlayerInputController(this); inputController = new PlayerInputController(this);
stats = new PlayerStats(this);
movementController = new PlayerMovementController(this); movementController = new PlayerMovementController(this);
animationController = new PlayerAnimationController(this); animationController = new PlayerAnimationController(this);
stats = new PlayerStats(this);
WeaponList.AddRange(GetComponentsInChildren<WeaponObject>()); WeaponList.AddRange(GetComponentsInChildren<WeaponObject>());
......
...@@ -41,8 +41,6 @@ public class PlayerMovementController ...@@ -41,8 +41,6 @@ public class PlayerMovementController
Vector3 dampVelocity = Vector3.zero; Vector3 dampVelocity = Vector3.zero;
Vector3 movementVector = inputX * axisX.normalized + inputZ * axisZ.normalized; Vector3 movementVector = inputX * axisX.normalized + inputZ * axisZ.normalized;
Debug.Log(player.stats);
Vector3 modifierVector = movementVector.normalized * player.stats.MaxSpeed; Vector3 modifierVector = movementVector.normalized * player.stats.MaxSpeed;
velocity.x = modifierVector.x; velocity.x = modifierVector.x;
velocity.z = modifierVector.z; velocity.z = modifierVector.z;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment