platformer
|
Fake input for AI. More...
Public Member Functions | |
void | EnableAction (string action) |
Enable action More... | |
void | DisableAction (string action) |
Disable action More... | |
void | SetAxis (Vector2 v) |
Modify axis More... | |
void | SetX (float x) |
Modify X axis More... | |
void | SetY (float y) |
Modify Y axis More... | |
override bool | IsActionHeld (string action) |
Returns true while the Action(~Button) is held down. More... | |
override bool | IsActionDown (string action) |
Returns true this frame the Action(~Button) is down. NOTE you could miss down event, use Held instead More... | |
override bool | IsActionUp (string action) |
Returns true this frame the Action(~Button) is up. NOTE you could miss up event, use Held instead More... | |
override bool | IsLeftDown () |
Returns true while Left is down. More... | |
override bool | IsRightDown () |
Returns true while Right is down. More... | |
override bool | IsUpDown () |
Returns true while Up is down. More... | |
override bool | IsDownDown () |
Returns true while Down is down. More... | |
override float | GetAxisRawX () |
Returns Input.GetAxisRaw ("Horizontal") or equivalent More... | |
override float | GetAxisRawY () |
Returns Input.GetAxisRaw ("Vertical") or equivalent More... | |
override Vector2 | GetAxisRaw () |
Returns a Vector2 with GetAxisRawX and GetAxisRawY More... | |
![]() | |
delegate void | InputActionDelegate (string button) |
callback type for keyup/keydown More... | |
virtual void | Start () |
Init actions Dictionary More... | |
virtual void | Update () |
Listen to changs in Unity Input More... | |
Additional Inherited Members | |
![]() | |
List< string > | listenActions = new List<string> {"Jump", "Attack", "Use", "Run", "Pull"} |
List of all available actions to listen More... | |
InputActionDelegate | onActionUp |
callback when action up (key/button associated is up) More... | |
InputActionDelegate | onActionDown |
callback when action down (key/button associated is down) More... | |
![]() | |
InputDictionary | actions = new InputDictionary() |
Dictionary of actions/states More... | |
Fake input for AI.
Allow to manually (by code) control input/actions.
This way a AI is exactly like a playable character so no code duplication :)
|
inline |
Disable action
|
inline |
Enable action
|
inlinevirtual |
Returns a Vector2 with GetAxisRawX and GetAxisRawY
Implements UnityPlatformer.PlatformerInput.
|
inlinevirtual |
Returns Input.GetAxisRaw ("Horizontal") or equivalent
Implements UnityPlatformer.PlatformerInput.
|
inlinevirtual |
Returns Input.GetAxisRaw ("Vertical") or equivalent
Implements UnityPlatformer.PlatformerInput.
|
inlinevirtual |
Returns true this frame the Action(~Button) is down. NOTE you could miss down event, use Held instead
Implements UnityPlatformer.PlatformerInput.
|
inlinevirtual |
Returns true while the Action(~Button) is held down.
Implements UnityPlatformer.PlatformerInput.
|
inlinevirtual |
Returns true this frame the Action(~Button) is up. NOTE you could miss up event, use Held instead
Implements UnityPlatformer.PlatformerInput.
|
inlinevirtual |
Returns true while Down is down.
Implements UnityPlatformer.PlatformerInput.
|
inlinevirtual |
Returns true while Left is down.
Implements UnityPlatformer.PlatformerInput.
|
inlinevirtual |
Returns true while Right is down.
Implements UnityPlatformer.PlatformerInput.
|
inlinevirtual |
Returns true while Up is down.
Implements UnityPlatformer.PlatformerInput.
|
inline |
Modify axis
|
inline |
Modify X axis
|
inline |
Modify Y axis