Base Speed value added to IMovement
This commit is contained in:
parent
1139293328
commit
54ea8d9a35
|
@ -13,6 +13,7 @@ namespace Syntriax.Modules.Movement
|
||||||
|
|
||||||
public bool IsActive => StateEnabled && !groundCheck.IsCollided();
|
public bool IsActive => StateEnabled && !groundCheck.IsCollided();
|
||||||
public bool StateEnabled { get; set; } = true;
|
public bool StateEnabled { get; set; } = true;
|
||||||
|
public float BaseSpeed { get; set; } = 1f;
|
||||||
public float MovementMultiplier { get; set; } = 1f;
|
public float MovementMultiplier { get; set; } = 1f;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace Syntriax.Modules.Movement
|
||||||
|
|
||||||
public bool IsActive => StateEnabled && groundCheck.IsCollided();
|
public bool IsActive => StateEnabled && groundCheck.IsCollided();
|
||||||
public bool StateEnabled { get; set; } = true;
|
public bool StateEnabled { get; set; } = true;
|
||||||
|
public float BaseSpeed { get; set; } = 1f;
|
||||||
public float MovementMultiplier { get; set; } = 1f;
|
public float MovementMultiplier { get; set; } = 1f;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
|
@ -37,7 +38,7 @@ namespace Syntriax.Modules.Movement
|
||||||
|
|
||||||
public void Move(float x = 0, float y = 0, float z = 0)
|
public void Move(float x = 0, float y = 0, float z = 0)
|
||||||
{
|
{
|
||||||
moveValue = x * MovementMultiplier;
|
moveValue = x * BaseSpeed * MovementMultiplier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ namespace Syntriax.Modules.Movement
|
||||||
{
|
{
|
||||||
public interface IMovement
|
public interface IMovement
|
||||||
{
|
{
|
||||||
|
float BaseSpeed { get; set; }
|
||||||
float MovementMultiplier { get; set; }
|
float MovementMultiplier { get; set; }
|
||||||
bool IsActive { get; }
|
bool IsActive { get; }
|
||||||
void Move(float x = 0f, float y = 0f, float z = 0f);
|
void Move(float x = 0f, float y = 0f, float z = 0f);
|
||||||
|
|
Loading…
Reference in New Issue