Small ResourceManager refactor, add ResourceSaver<T>.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user