diff --git a/Assets/Goldenwere/GWSU/Controller/Character/Core/Runtime/BaseModuleAction.cs b/Assets/Goldenwere/GWSU/Controller/Character/Core/Runtime/BaseModuleAction.cs
index 533f4d6..245e868 100644
--- a/Assets/Goldenwere/GWSU/Controller/Character/Core/Runtime/BaseModuleAction.cs
+++ b/Assets/Goldenwere/GWSU/Controller/Character/Core/Runtime/BaseModuleAction.cs
@@ -3,13 +3,89 @@ using UnityEngine;
namespace Goldenwere.GWSU.CTRL.CHAR.Core
{
+ ///
+ /// Defines how a module action should be implemented.
+ /// Notes regarding implementation are ideal and may not represent
+ /// the final method an input module implements them.
+ ///
public enum ModuleActionType : uint
{
+ ///
+ ///
+ /// Specifies that an input:
+ /// - Starts when it is first pressed
+ /// - Ends when it is first released
+ ///
+ ///
+ /// For BaseModuleAction with void type, this means that
+ /// the listener should be invoked on press and on release.
+ ///
+ ///
+ /// For BaseModuleAction with value type, this means that
+ /// the listener should be invoked every time the value is updated,
+ /// including on release.
+ ///
+ ///
Held = 0,
+ ///
+ ///
+ /// Specifies that an input:
+ /// - Is called when it is first pressed
+ ///
+ ///
+ /// For BaseModuleAction with void type, this means that
+ /// the listener should be invoked on press.
+ ///
+ ///
+ /// For BaseModuleAction with value type, this means that
+ /// the listener should be invoked with the value
+ /// that it was first invoked with. Value types typically don't
+ /// make sense with pressed inputs.
+ ///
+ ///
Pressed = 1,
+ ///
+ ///
+ /// Specifies that an input:
+ /// - Is called when it is first pressed
+ /// - Is called when it is released
+ /// only if preference given to held inputs
+ /// This is useful for actions that can function either toggled or held,
+ /// and ideally should be used over type Held.
+ /// For example, actions like crouch and sprint can be HeldOrPressed,
+ /// whereas traditional first-person movement in most cases only works as Held.
+ ///
+ ///
+ /// For BaseModuleAction with void type, this means that
+ /// the listener should be invoked on press
+ /// and on release if allowed by some sort of bool setting.
+ ///
+ ///
+ /// For BaseModuleAction with value type, this means that
+ /// the listener should be invoked with the value
+ /// that it was first invoked with,
+ /// then be invoked with the default/zero value on release.
+ /// Value types typically don't make sense with HeldOrPressed inputs.
+ ///
+ ///
HeldOrPressed = 2,
}
+ ///
+ ///
+ /// Class representing a base module action with no association to any value type.
+ ///
+ ///
+ /// At base, a module is a bridge between an emitter and a listener.
+ /// - The emitter is some sort of ScriptableObject which emits input
+ /// from a general input system. E.g. InputActionReference
+ /// - The listener is the method on a module that subscribes to the emitter.
+ ///
+ ///
+ /// Additionally, it defines the action's type,
+ /// which describes how the controller should implement its emitted input.
+ ///
+ ///
public class BaseModuleAction
{
[SerializeField] private ScriptableObject emitter;
@@ -36,6 +112,21 @@ namespace Goldenwere.GWSU.CTRL.CHAR.Core
}
}
+ ///
+ ///
+ /// Class representing a base module action associated with a value type.
+ ///
+ ///
+ /// At base, a module is a bridge between an emitter and a listener.
+ /// - The emitter is some sort of ScriptableObject which emits input
+ /// from a general input system. E.g. InputActionReference
+ /// - The listener is the method on a module that subscribes to the emitter.
+ ///
+ ///
+ /// Additionally, it defines the action's type,
+ /// which describes how the controller should implement its emitted input.
+ ///
+ ///
public class BaseModuleAction
where T : struct
{