diff options
| author | alex <[email protected]> | 2026-07-23 16:11:18 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2026-07-23 16:11:18 +0200 |
| commit | 7e0c071a0d86563f9d450bf9073e06006abfa86e (patch) | |
| tree | de57b3da664b67bfb8979fbba08c8a1460bf29d0 /Player.cs | |
| parent | ddb50b0b66c838bc97e79c826ff5375e15f8f038 (diff) | |
| download | godot-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.cs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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(); } |
