C# Class ProjectStorms.AirshipStallingBehaviour

A simple script that sets the behaviour for the falling airship state. The player's ship will free-fall and the camera will stay in place and look at the ship.
Inheritance: UnityEngine.MonoBehaviour
Show file Open project: patferguson/Storms-Project Class Usage Examples

Public Properties

Property Type Description
airshipMainCam AirshipCamBehaviour
fallAcceleration float
stallYRevertMult float

Public Methods

Method Description
Awake ( ) : void
FixedUpdate ( ) : void
OnEnable ( ) : void
SetAboveStallY ( float a_stallY ) : void

Notifies this script that the player entered the state because they were above the stall Y. Will reset when they fall below the limit again.

Start ( ) : void
Update ( ) : void

Method Details

Awake() public method

public Awake ( ) : void
return void

FixedUpdate() public method

public FixedUpdate ( ) : void
return void

OnEnable() public method

public OnEnable ( ) : void
return void

SetAboveStallY() public method

Notifies this script that the player entered the state because they were above the stall Y. Will reset when they fall below the limit again.
public SetAboveStallY ( float a_stallY ) : void
a_stallY float
return void

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void

Property Details

airshipMainCam public property

Handle to the airship camera script.
public AirshipCamBehaviour,ProjectStorms airshipMainCam
return AirshipCamBehaviour

fallAcceleration public property

How fast the player ship will fall, defaults to the Earth gravitational constant.
public float fallAcceleration
return float

stallYRevertMult public property

Multiplier to revert the player's control at. E.g. If 0.9 only revert to the control state if the player is below 90% of the stallY and moving down.
public float stallYRevertMult
return float