20 lines
866 B
C#
20 lines
866 B
C#
using UnityEngine;
|
|
|
|
namespace Syntriax.Modules.Movement
|
|
{
|
|
public static class IMovementExtensions
|
|
{
|
|
/// <summary>
|
|
/// Applies a <see cref="Vector2"/> parameter into the <see cref="IMovement"/>'s <see cref="IMovement.Move(x, y, z)"/> method by applying the vector's X and Y values accordingly
|
|
/// </summary>
|
|
public static void Move(this IMovement movement, Vector2 moveVector)
|
|
=> movement.Move(moveVector.x, moveVector.y);
|
|
|
|
/// <summary>
|
|
/// Applies a <see cref="Vector3"/> parameter into the <see cref="IMovement"/>'s <see cref="IMovement.Move(x, y, z)"/> method by applying the vector's X, Y and Z values accordingly
|
|
/// </summary>
|
|
public static void Move(this IMovement movement, Vector3 moveVector)
|
|
=> movement.Move(moveVector.x, moveVector.y, moveVector.z);
|
|
}
|
|
}
|