MovementKit
|
Topics | |
Animation relateted | |
Classes | |
struct | RiverExplorer.Player.PlayerControl.Facing |
struct | RiverExplorer.Player.PlayerControl.Moving |
Functions | |
delegate void | RiverExplorer.Player.PlayerControl.NoMovement (Facing PlayerFacing, float TotalNoMovementTime) |
delegate void | RiverExplorer.Player.PlayerControl.Walk (Facing PlayerFacing, Moving PlayerMoving) |
Properties | |
float | RiverExplorer.Player.PlayerControl.BackwardSpeed [get, private set] |
float | RiverExplorer.Player.PlayerControl.ForwardSpeed [get, private set] |
float | RiverExplorer.Player.PlayerControl.RightDirection [get, private set] |
Movement can be disabled by settings EnableMovement to false.
General Compass directions. Can be used to indicate the direction an object is facing or moving.
All player movement is by ApplyForce or by moving the transform.
A general direction an object is moving.
Enumerator | |
---|---|
UnknownDirection | Unknown or not determinable at this time. |
NotMoving | Not moving. Object is in the same place, or within dead zone distance of the last position. |
IndependentOfDirection | Direction irrelevant. Used when there is no specific direction, or a generic animation. |
Circle | Move or act in a circle. |
Forward | Forward - The player velocity or is facing between: >= +337.5° (-22.5°) and < +22.5°. |
ForwardRight | Forward to the Right - The player velocity or is facing between: >= +22.5° and < +67.5°. |
Right | Right - The player velocity is or facing between: >= +67.5° and < +112.5°. |
BackwardRight | Backward Right - The player velocity is or facing between: >= +112.5° and < +157.5°. |
Backward | Backward - The player velocity or is facing between: >= +157.5° and < +202.5°. |
BackwardLeft | Backward Left - The player velocity or is facing between: >= +202.5 < +247.5°. |
Left | Left - The player velocity or is facing between: >= +247.5° and < +292.5°. |
ForwardLeft | Forward Left - The player velocity or is facing between: >= +292.5.0 and < +337.5° |
Down | Down - The player velocity or is facing down. |
Up | Up - The player velocity or is facing up. |
UpStairs | Moving Up Stairs. |
DownStairs | Moving Down Stairs. |
delegate void RiverExplorer.Player.PlayerControl.NoMovement | ( | Facing | PlayerFacing, |
float | TotalNoMovementTime ) |
#include <G:/Unity/AssetStoreProjects/MovementKit/Assets/RiverExplorer/PlayerControl/Scripts/PlayerControl.cs>
Delegate The player has been stopped for at least NoMovementCallInterval seconds.
PlayerFacing | The direction the player is facing. |
TotalNoMovementTime | The number of seconds the player has not moved itself. |
#include <G:/Unity/AssetStoreProjects/MovementKit/Assets/RiverExplorer/PlayerControl/Scripts/PlayerControl.cs>
Run forward, facing forward.
This is activated when the player is running in Direction, while facing Facing direction.
PlayerFacing | The direction the player is facing. |
PlayerMoving | The direction the player is moving. |
|
private |
The last position the player moved.
|
private |
The latest movement input value.
|
private |
The last time the player moved.
|
private |
How long the player has not moved.
bool RiverExplorer.Player.PlayerControl.EnableMoving = true |
float RiverExplorer.Player.PlayerControl.GamepadMinDeadZone = 0.125f |
float RiverExplorer.Player.PlayerControl.MovementSpeed = 1000 |
If the player has a Rigidbody, then this value will have more or less effect when the Rigidbody has less or more mass, or drag.
|
private |
How movement will be accomplished. When set to UseApplyForce, the player must have a RigidBody.
float RiverExplorer.Player.PlayerControl.NoMovementCallInterval = 1.0f |
|
private |
|
private |
bool RiverExplorer.Player.PlayerControl.PlayerIsRunning = false |
|
private |
Players last position.
|
getprivate set |
The speed multipliers for backward direction.
|
getprivate set |
The speed multipliers for forward direction.
|
getprivate set |
What part of the players velocity is to the right. Minus is to the left. Value calculated in FixedUpdate().