Typo Fix and Namespace Changes

This commit is contained in:
Syntriax 2021-12-23 13:41:32 +03:00
parent 8c3d0695b5
commit 2c996a9a29
7 changed files with 10 additions and 13 deletions

View File

@ -1,5 +1,4 @@
using Syntriax.Modules.Movement.ColliderCheck; using Syntriax.Modules.Movement.ColliderCheck;
using Syntriax.Modules.Movement.ColliderCheck.Ground;
using UnityEngine; using UnityEngine;
namespace Syntriax.Modules.Movement namespace Syntriax.Modules.Movement
@ -14,7 +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 SpeedMultiplier { get; set; } = 1f; public float MovementMultiplier { get; set; } = 1f;
private void Start() private void Start()
{ {
@ -48,7 +47,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 * SpeedMultiplier; moveValue = x * MovementMultiplier;
} }
} }
} }

View File

@ -1,5 +1,4 @@
using Syntriax.Modules.Movement.ColliderCheck; using Syntriax.Modules.Movement.ColliderCheck;
using Syntriax.Modules.Movement.ColliderCheck.Ground;
using UnityEngine; using UnityEngine;
namespace Syntriax.Modules.Movement namespace Syntriax.Modules.Movement
@ -13,7 +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 SpeedMultiplier { get; set; } = 1f; public float MovementMultiplier { get; set; } = 1f;
private void Start() private void Start()
{ {
@ -38,7 +37,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 * SpeedMultiplier; moveValue = x * MovementMultiplier;
} }
} }
} }

View File

@ -1,4 +1,4 @@
namespace Syntriax.Modules.Movement.ColliderCheck.Ground namespace Syntriax.Modules.Movement.ColliderCheck
{ {
public interface IGroundCheck : IColliderCheck { } public interface IGroundCheck : IColliderCheck { }
} }

View File

@ -1,4 +1,4 @@
namespace Syntriax.Modules.Movement.ColliderCheck.Ground namespace Syntriax.Modules.Movement.ColliderCheck
{ {
public class TwoDimensionalBoxChildGroundCheck : TwoDimensionalBoxChildColliderCheck, IGroundCheck { } public class TwoDimensionalBoxChildGroundCheck : TwoDimensionalBoxChildColliderCheck, IGroundCheck { }
} }

View File

@ -2,7 +2,7 @@ namespace Syntriax.Modules.Movement
{ {
public interface IMovement public interface IMovement
{ {
float SpeedMultiplier { 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);
} }

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: bc4a8610b5876e14ab81beef027850b2 guid: 02daadcda38072a4ca4798b8f8800f53
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@ -1,5 +1,4 @@
using Syntriax.Modules.Movement.ColliderCheck; using Syntriax.Modules.Movement.ColliderCheck;
using Syntriax.Modules.Movement.ColliderCheck.Ground;
using UnityEngine; using UnityEngine;
namespace Syntriax.Modules.Movement.SpecialAction namespace Syntriax.Modules.Movement.SpecialAction
@ -42,9 +41,9 @@ namespace Syntriax.Modules.Movement.SpecialAction
ApplySuspension(fallMultiplier); ApplySuspension(fallMultiplier);
} }
private void ApplySuspension(float multipier) private void ApplySuspension(float multiplier)
{ {
rigid.velocity += Physics2D.gravity * multipier; rigid.velocity += Physics2D.gravity * multiplier;
} }
private void Jump() private void Jump()