Class AcrobatMotor
Assembly: Assembly-CSharp.dll
Syntax
[RequireComponent(typeof(PlayerMotor))]
[RequireComponent(typeof(CharacterController))]
public class AcrobatMotor : MonoBehaviour
Fields
|
Improve this Doc
View Source
airControl
Declaration
Field Value
|
Improve this Doc
View Source
crouchingJumpDelta
Declaration
public float crouchingJumpDelta
Field Value
|
Improve this Doc
View Source
fallingDamageThreshold
Declaration
public float fallingDamageThreshold
Field Value
|
Improve this Doc
View Source
gravity
Declaration
Field Value
|
Improve this Doc
View Source
jumpSpeed
Declaration
Field Value
Properties
|
Improve this Doc
View Source
Falling
Declaration
public bool Falling { get; set; }
Property Value
|
Improve this Doc
View Source
Jumping
Declaration
public bool Jumping { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
AdjustFallStart(Single)
Call this when floating origin ticks on Y to ensure player doesn't die by jumping right at threshold
Declaration
public void AdjustFallStart(float y)
Parameters
Type |
Name |
Description |
Single |
y |
Amount to increment to fallstart
|
|
Improve this Doc
View Source
ApplyGravity(ref Vector3)
Declaration
public void ApplyGravity(ref Vector3 moveDirection)
Parameters
Type |
Name |
Description |
Vector3 |
moveDirection |
|
|
Improve this Doc
View Source
CheckAirControl(ref Vector3, Single)
If air control is allowed, check movement but don't touch the y component
Declaration
public void CheckAirControl(ref Vector3 moveDirection, float speed)
Parameters
Type |
Name |
Description |
Vector3 |
moveDirection |
the Vector to adjust for movement
|
Single |
speed |
The speed multiplier
|
|
Improve this Doc
View Source
CheckFallingDamage()
If we were falling, and we fell a vertical distance greater than the threshold, run a falling damage routine
Declaration
public void CheckFallingDamage()
|
Improve this Doc
View Source
CheckInitFall(ref Vector3)
If we stepped over a cliff or something, set the height at which we started falling
Declaration
public void CheckInitFall(ref Vector3 moveDirection)
Parameters
Type |
Name |
Description |
Vector3 |
moveDirection |
|
|
Improve this Doc
View Source
ClearFallingDamage()
Declaration
public void ClearFallingDamage()
|
Improve this Doc
View Source
Declaration
public void HandleJumpInput(ref Vector3 moveDirection)
Parameters
Type |
Name |
Description |
Vector3 |
moveDirection |
|
|
Improve this Doc
View Source
HitHead(ref Vector3)
Declaration
public void HitHead(ref Vector3 moveDirection)
Parameters
Type |
Name |
Description |
Vector3 |
moveDirection |
|
Extension Methods
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)