2022-11-15 13:08:37 +03:00
|
|
|
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);
|
2022-11-15 13:08:37 +03:00
|
|
|
|
|
|
|
/// <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);
|
2022-11-15 13:08:37 +03:00
|
|
|
}
|
|
|
|
}
|