Base Speed value added to IMovement

This commit is contained in:
Syntriax 2022-02-19 16:02:38 +03:00
parent 1139293328
commit 54ea8d9a35
3 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,7 @@ namespace Syntriax.Modules.Movement
public bool IsActive => StateEnabled && !groundCheck.IsCollided();
public bool StateEnabled { get; set; } = true;
public float BaseSpeed { get; set; } = 1f;
public float MovementMultiplier { get; set; } = 1f;
private void Start()

View File

@ -12,6 +12,7 @@ namespace Syntriax.Modules.Movement
public bool IsActive => StateEnabled && groundCheck.IsCollided();
public bool StateEnabled { get; set; } = true;
public float BaseSpeed { get; set; } = 1f;
public float MovementMultiplier { get; set; } = 1f;
private void Start()
@ -37,7 +38,7 @@ namespace Syntriax.Modules.Movement
public void Move(float x = 0, float y = 0, float z = 0)
{
moveValue = x * MovementMultiplier;
moveValue = x * BaseSpeed * MovementMultiplier;
}
}
}

View File

@ -2,6 +2,7 @@ namespace Syntriax.Modules.Movement
{
public interface IMovement
{
float BaseSpeed { get; set; }
float MovementMultiplier { get; set; }
bool IsActive { get; }
void Move(float x = 0f, float y = 0f, float z = 0f);