summaryrefslogtreecommitdiff
path: root/Player.cs
diff options
context:
space:
mode:
authoralex <[email protected]>2026-07-23 16:11:18 +0200
committeralex <[email protected]>2026-07-23 16:11:18 +0200
commit7e0c071a0d86563f9d450bf9073e06006abfa86e (patch)
treede57b3da664b67bfb8979fbba08c8a1460bf29d0 /Player.cs
parentddb50b0b66c838bc97e79c826ff5375e15f8f038 (diff)
downloadgodot-testing-7e0c071a0d86563f9d450bf9073e06006abfa86e.tar.xz
godot-testing-7e0c071a0d86563f9d450bf9073e06006abfa86e.zip
created EntityStats resourec to serve as the base stats system
Diffstat (limited to 'Player.cs')
-rw-r--r--Player.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Player.cs b/Player.cs
index 8a5f5d4..6ad370b 100644
--- a/Player.cs
+++ b/Player.cs
@@ -2,7 +2,7 @@ using Godot;
public partial class Player : CharacterBody2D
{
- [Export] public float Speed { get; set; } = 300.0f;
+ [Export] public EntityStats BaseStats { get; set; }
[Export] public PackedScene BulletScene { get; set; }
// Create a reference for your Sprite
@@ -17,7 +17,7 @@ public partial class Player : CharacterBody2D
public override void _PhysicsProcess(double delta)
{
Vector2 direction = Input.GetVector("ui_left", "ui_right", "ui_up", "ui_down");
- Velocity = direction * Speed;
+ Velocity = direction * BaseStats.MoveSpeed;
MoveAndSlide();
}