Movement/Runtime/IMovementControllerExtensio...

20 lines
806 B
C#
Raw Normal View History

using UnityEngine;
namespace Syntriax.Modules.Movement
{
public static class IMovementControllerExtensions
{
/// <summary>
/// Calls <see cref="IMovementController.Move"/> with a <see cref="Vector2"/>'s values accordingly, leaving the z parameter 0
/// </summary>
public static void Move(this IMovementController movementController, Vector2 moveVector)
2022-12-01 23:30:02 +03:00
=> movementController.Move(moveVector.x, moveVector.y, 0f);
/// <summary>
/// Calls <see cref="IMovementController.Move"/> with a <see cref="Vector3"/>'s values accordingly
/// </summary>
public static void Move(this IMovementController movementController, Vector3 moveVector)
2022-12-01 23:30:02 +03:00
=> movementController.Move(moveVector.x, moveVector.y, moveVector.z);
}
}