Small ResourceManager refactor, add ResourceSaver<T>.

This commit is contained in:
2024-01-21 20:24:53 +01:00
parent cfec5a59b1
commit 62e0e013f1
16 changed files with 215 additions and 54 deletions

View File

@@ -5,6 +5,7 @@ using DaggerFramework.Utils;
public class TestPlayer : RectangleShape2d
{
public float SprintSpeed { get; set; } = 400f;
protected override void OnStart()
{
base.OnStart();
@@ -26,7 +27,7 @@ public class TestPlayer : RectangleShape2d
base.OnUpdate(dt);
var sprinting = Input.IsActionDown("sprint");
_speed = sprinting ? 400f : 200f;
_speed = sprinting ? SprintSpeed : 200f;
var velocity = Input.GetInputDirection("left", "right", "up", "down") * _speed;
Position += velocity * (float)dt;