Climbable
A class in Root.Township, the global namespace.
Marks a surface players can climb. Hands add pressure each physics step, and the grip breaks if it goes over the maximum.
- Listed in Global namespace: C to D
- Inherits or implements
MonoBehaviour,IClimbable - Derived types
DebugClimbable
Constructors
| Member | What it is |
|---|---|
Climbable() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
9 private and internal fields
| Member | What it is |
|---|---|
private bool canMove | Backing field for CanMove. |
private NetworkEntity entity | Backing field for Entity. Must be on this object or a parent. |
private float gripPriority | Backing field for GripPriority. Negative means ungrabbable. |
private float lastTime | Fixed time pressure was last applied. Used to reset the total each physics step. |
private float maximumPressure | Backing field for MaximumPressure. Above it the grip breaks; -1 means it never breaks. |
private float oldPressureMagnitude | Total pressure from the previous physics step. |
private Rigidbody rigidbody | Rigidbody this surface is on. If it is not kinematic, the surface can't be gripped. |
private Vector3 totalPressure | Pressure added this physics step. |
private float totalPressureMagnitude | Magnitude of totalPressure. |
Properties
| Member | What it is |
|---|---|
bool CanClimb { get; } | Always true. |
bool CanMove { get; } | Whether the surface can move, set in the inspector. |
Vector3 CurentPressure { get; } | This step's total pressure, fading out soon after hands stop pushing. |
float CurrentPressureRatio { get; } | This step's pressure as a share of the maximum. |
NetworkEntity Entity { get; } | The network entity the climbable belongs to. |
float GripPriority { get; protected set; } | Priority over other grips the hand overlaps. -1 (ungrabbable) while its Rigidbody is non-kinematic. |
float MaximumPressure { get; } | Pressure that breaks the grip. -1 means it never breaks. |
float OldPressureRatio { get; } | Last step's pressure as a share of the maximum. |
bool ReleasesImmediately { get; } | Always false. |
1 private and internal property
Events
| Member | What it is |
|---|---|
event Action Break | Raised when pressure goes over MaximumPressure. |
Methods
Used in
Members of other types that take, return or hold a Climbable: