Movement/Runtime/IMovementController.cs

53 lines
1.8 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
2023-03-20 22:39:21 +03:00
using Syntriax.Modules.State;
2022-03-05 18:59:41 +03:00
namespace Syntriax.Modules.Movement
{
public interface IMovementController
{
2022-12-01 23:30:02 +03:00
/// <summary>
/// <see cref="IStateEnable"/> to control the state of the <see cref="IMovementController"/> is on or off
2022-12-01 23:30:02 +03:00
/// </summary>
IStateEnable StateEnable { get; }
2022-12-01 23:30:02 +03:00
/// <summary>
/// Currently active <see cref="IMovement"/>
/// </summary>
IMovement ActiveMovement { get; }
/// <summary>
/// List of all <see cref="IMovement"/>s controlled by this controller, can be updated by calling <see cref="RecacheMovements"/> method
/// </summary>
List<IMovement> Movements { get; }
/// <summary>
/// Called when a <see cref="IMovement"/> is deactivated when another <see cref="IMovement"/> takes over it's place
/// </summary>
/// <value>Deactived <see cref="IMovement"/></value>
Action<IMovement> OnMovementDeactivated { get; set; }
/// <summary>
/// Called when a new <see cref="IMovement"/> takes over by the controller
/// </summary>
/// <value>Actived <see cref="IMovement"/></value>
Action<IMovement> OnMovementActivated { get; set; }
2022-12-01 23:30:02 +03:00
/// <summary>
/// Called when <see cref="Move"/> is called
/// </summary>
/// <value>The x, y, z values of <see cref="Move"/></value>
Action<float, float, float> OnMoveCalled { get; set; }
/// <summary>
/// Updates the <see cref="Movements"/> list
/// </summary>
void RecacheMovements();
/// <summary>
/// Apply the movement data that <see cref="IMovement"/>s will use
/// </summary>
void Move(float x = 0, float y = 0, float z = 0);
}
2022-03-05 18:59:41 +03:00
}