Property | Type | Description | |
---|---|---|---|
applyFlightPhysicsOnGround | bool | ||
crashSoundClip | |||
crashSpeed | float | ||
directionalSensitivity | float | ||
divingSoundClip | |||
enabledCrashing | bool | ||
enabledDiving | bool | ||
enabledFlapping | bool | ||
enabledFlaring | bool | ||
enabledGliding | bool | ||
enabledGround | bool | ||
enabledJumping | bool | ||
enabledLanding | bool | ||
enabledLaunchIfAirborn | bool | ||
enabledTakeoff | bool | ||
enabledWindNoise | bool | ||
flapSoundClip | |||
flapStrength | float | ||
flareAngle | float | ||
flareSoundClip | |||
flareSpeed | float | ||
groundDrag | float | ||
jumpHeight | float | ||
jumpingNoiseClip | |||
landingSoundClip | |||
launchTime | float | ||
maxGroundForwardSpeed | float | ||
maxGroundTurningDegreesSecond | float | ||
maxPitch | float | ||
maxStandUpTime | float | ||
maxTurnBank | float | ||
minHeightToLaunchIfAirborn | float | ||
standUpSpeed | float | ||
takeoffSoundClip | |||
walkingNoiseClip | |||
windNoiseClip | |||
windNoiseMaxSpeed | float | ||
windNoiseStartSpeed | float |
Property | Type | Description | |
---|---|---|---|
_inputDiving | bool | ||
_inputFlap | bool | ||
_inputFlaring | bool | ||
_inputInvertedSetting | int | ||
_inputJump | bool | ||
_inputTakeoff | bool |
Property | Type | Description | |
---|---|---|---|
applyGroundInputs | void | ||
getFlightInputs | void | ||
getGroundInputs | void | ||
groundMove | void | ||
jump | void | ||
land | void | ||
launchIfAirborn | void | ||
timedLaunch | void |
Method | Description | |
---|---|---|
Awake ( ) : void | ||
FixedUpdate ( ) : void |
In relation to Update() this is where we decide how to act on the user input, then compute the physics and animation accordingly
|
|
Start ( ) : void | ||
Update ( ) : void |
Get input from the player
|
|
applyFlightInputs ( ) : void | ||
isFlying ( ) : bool | ||
isGrounded ( ) : bool |
Method | Description | |
---|---|---|
OnCollisionEnter ( Collision col ) : void | ||
applyWindNoise ( ) : void | ||
dive ( ) : void | ||
flap ( ) : void | ||
flare ( ) : void | ||
getBank ( ) : float | ||
getPitch ( bool flare ) : float |
Calculates pitch, based on user input and configured pitch parameters.
|
|
playSound ( |
||
setupSound ( |
Sets up the audio component for the sound source. Does nothing if the source already exists and has a clip.
|
|
standUp ( ) : IEnumerator |
Straightenes the flight object on landing, by rotating the roll and pitch to zero over time. Public vars "standUpSpeed" and "maxStandUpTime" can be used to tweak behaviour.
|
|
takeoff ( bool flapLaunch = false ) : void |
Set the state to flying and enable flight physics. Optionally, flapLaunch can be set to true to apply a "flap" to help get the object off the ground.
|
Method | Description | |
---|---|---|
applyGroundInputs ( ) : void | ||
getFlightInputs ( ) : void | ||
getGroundInputs ( ) : void | ||
groundMove ( ) : void | ||
jump ( ) : void | ||
land ( ) : void | ||
launchIfAirborn ( float minHeight ) : void |
Launchs if airborn.
|
|
timedLaunch ( bool triggerSet ) : void |
Calls takeoff() after "triggerSet" has been true for "launchTime". This method needs to be called in Update or FixedUpdate to work properly.
|
protected OnCollisionEnter ( Collision col ) : void | ||
col | Collision | |
return | void |
protected getPitch ( bool flare ) : float | ||
flare | bool | If set to |
return | float |
protected playSound ( |
||
source | ||
return | void |
protected setupSound ( |
||
sound | Sound. | |
source | Source. | |
return |
protected takeoff ( bool flapLaunch = false ) : void | ||
flapLaunch | bool | If set to |
return | void |
public AudioClip,UnityEngine crashSoundClip | ||
return |
public AudioClip,UnityEngine divingSoundClip | ||
return |
public AudioClip,UnityEngine flapSoundClip | ||
return |
public AudioClip,UnityEngine flareSoundClip | ||
return |
public AudioClip,UnityEngine jumpingNoiseClip | ||
return |
public AudioClip,UnityEngine landingSoundClip | ||
return |
public float maxGroundTurningDegreesSecond | ||
return | float |
public AudioClip,UnityEngine takeoffSoundClip | ||
return |
public AudioClip,UnityEngine walkingNoiseClip | ||
return |
public AudioClip,UnityEngine windNoiseClip | ||
return |