C# 클래스 FreeFlight, Unity-Free-Flight

상속: MonoBehaviour
파일 보기 프로젝트 열기: NickolausDS/Unity-Free-Flight 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
applyFlightPhysicsOnGround bool
crashSoundClip UnityEngine.AudioClip
crashSpeed float
directionalSensitivity float
divingSoundClip UnityEngine.AudioClip
enabledCrashing bool
enabledDiving bool
enabledFlapping bool
enabledFlaring bool
enabledGliding bool
enabledGround bool
enabledJumping bool
enabledLanding bool
enabledLaunchIfAirborn bool
enabledTakeoff bool
enabledWindNoise bool
flapSoundClip UnityEngine.AudioClip
flapStrength float
flareAngle float
flareSoundClip UnityEngine.AudioClip
flareSpeed float
groundDrag float
jumpHeight float
jumpingNoiseClip UnityEngine.AudioClip
landingSoundClip UnityEngine.AudioClip
launchTime float
maxGroundForwardSpeed float
maxGroundTurningDegreesSecond float
maxPitch float
maxStandUpTime float
maxTurnBank float
minHeightToLaunchIfAirborn float
standUpSpeed float
takeoffSoundClip UnityEngine.AudioClip
walkingNoiseClip UnityEngine.AudioClip
windNoiseClip UnityEngine.AudioClip
windNoiseMaxSpeed float
windNoiseStartSpeed float

보호된 프로퍼티들

프로퍼티 타입 설명
_inputDiving bool
_inputFlap bool
_inputFlaring bool
_inputInvertedSetting int
_inputJump bool
_inputTakeoff bool

Private Properties

프로퍼티 타입 설명
applyGroundInputs void
getFlightInputs void
getGroundInputs void
groundMove void
jump void
land void
launchIfAirborn void
timedLaunch void

공개 메소드들

메소드 설명
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

보호된 메소드들

메소드 설명
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 ( AudioSource source ) : void
setupSound ( AudioClip sound, AudioSource &source ) : AudioSource

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.

비공개 메소드들

메소드 설명
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.

메소드 상세

Awake() 공개 메소드

public Awake ( ) : void
리턴 void

FixedUpdate() 공개 메소드

In relation to Update() this is where we decide how to act on the user input, then compute the physics and animation accordingly
public FixedUpdate ( ) : void
리턴 void

OnCollisionEnter() 보호된 메소드

protected OnCollisionEnter ( Collision col ) : void
col Collision
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

Update() 공개 메소드

Get input from the player
public Update ( ) : void
리턴 void

applyFlightInputs() 공개 메소드

public applyFlightInputs ( ) : void
리턴 void

applyWindNoise() 보호된 메소드

protected applyWindNoise ( ) : void
리턴 void

dive() 보호된 메소드

protected dive ( ) : void
리턴 void

flap() 보호된 메소드

protected flap ( ) : void
리턴 void

flare() 보호된 메소드

protected flare ( ) : void
리턴 void

getBank() 보호된 메소드

protected getBank ( ) : float
리턴 float

getPitch() 보호된 메소드

Calculates pitch, based on user input and configured pitch parameters.
protected getPitch ( bool flare ) : float
flare bool If set to true calculates pitch of a flare angle.
리턴 float

isFlying() 공개 메소드

public isFlying ( ) : bool
리턴 bool

isGrounded() 공개 메소드

public isGrounded ( ) : bool
리턴 bool

playSound() 보호된 메소드

protected playSound ( AudioSource source ) : void
source UnityEngine.AudioSource
리턴 void

setupSound() 보호된 메소드

Sets up the audio component for the sound source. Does nothing if the source already exists and has a clip.
protected setupSound ( AudioClip sound, AudioSource &source ) : AudioSource
sound UnityEngine.AudioClip Sound.
source UnityEngine.AudioSource Source.
리턴 UnityEngine.AudioSource

standUp() 보호된 메소드

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.
protected standUp ( ) : IEnumerator
리턴 IEnumerator

takeoff() 보호된 메소드

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.
protected takeoff ( bool flapLaunch = false ) : void
flapLaunch bool If set to true flap launch.
리턴 void

프로퍼티 상세

_inputDiving 보호되어 있는 프로퍼티

protected bool _inputDiving
리턴 bool

_inputFlap 보호되어 있는 프로퍼티

protected bool _inputFlap
리턴 bool

_inputFlaring 보호되어 있는 프로퍼티

protected bool _inputFlaring
리턴 bool

_inputInvertedSetting 보호되어 있는 프로퍼티

protected int _inputInvertedSetting
리턴 int

_inputJump 보호되어 있는 프로퍼티

protected bool _inputJump
리턴 bool

_inputTakeoff 보호되어 있는 프로퍼티

protected bool _inputTakeoff
리턴 bool

applyFlightPhysicsOnGround 공개적으로 프로퍼티

public bool applyFlightPhysicsOnGround
리턴 bool

crashSoundClip 공개적으로 프로퍼티

public AudioClip,UnityEngine crashSoundClip
리턴 UnityEngine.AudioClip

crashSpeed 공개적으로 프로퍼티

public float crashSpeed
리턴 float

directionalSensitivity 공개적으로 프로퍼티

public float directionalSensitivity
리턴 float

divingSoundClip 공개적으로 프로퍼티

public AudioClip,UnityEngine divingSoundClip
리턴 UnityEngine.AudioClip

enabledCrashing 공개적으로 프로퍼티

public bool enabledCrashing
리턴 bool

enabledDiving 공개적으로 프로퍼티

public bool enabledDiving
리턴 bool

enabledFlapping 공개적으로 프로퍼티

public bool enabledFlapping
리턴 bool

enabledFlaring 공개적으로 프로퍼티

public bool enabledFlaring
리턴 bool

enabledGliding 공개적으로 프로퍼티

public bool enabledGliding
리턴 bool

enabledGround 공개적으로 프로퍼티

public bool enabledGround
리턴 bool

enabledJumping 공개적으로 프로퍼티

public bool enabledJumping
리턴 bool

enabledLanding 공개적으로 프로퍼티

public bool enabledLanding
리턴 bool

enabledLaunchIfAirborn 공개적으로 프로퍼티

public bool enabledLaunchIfAirborn
리턴 bool

enabledTakeoff 공개적으로 프로퍼티

public bool enabledTakeoff
리턴 bool

enabledWindNoise 공개적으로 프로퍼티

public bool enabledWindNoise
리턴 bool

flapSoundClip 공개적으로 프로퍼티

public AudioClip,UnityEngine flapSoundClip
리턴 UnityEngine.AudioClip

flapStrength 공개적으로 프로퍼티

public float flapStrength
리턴 float

flareAngle 공개적으로 프로퍼티

public float flareAngle
리턴 float

flareSoundClip 공개적으로 프로퍼티

public AudioClip,UnityEngine flareSoundClip
리턴 UnityEngine.AudioClip

flareSpeed 공개적으로 프로퍼티

public float flareSpeed
리턴 float

groundDrag 공개적으로 프로퍼티

public float groundDrag
리턴 float

jumpHeight 공개적으로 프로퍼티

public float jumpHeight
리턴 float

jumpingNoiseClip 공개적으로 프로퍼티

public AudioClip,UnityEngine jumpingNoiseClip
리턴 UnityEngine.AudioClip

landingSoundClip 공개적으로 프로퍼티

public AudioClip,UnityEngine landingSoundClip
리턴 UnityEngine.AudioClip

launchTime 공개적으로 프로퍼티

public float launchTime
리턴 float

maxGroundForwardSpeed 공개적으로 프로퍼티

public float maxGroundForwardSpeed
리턴 float

maxGroundTurningDegreesSecond 공개적으로 프로퍼티

public float maxGroundTurningDegreesSecond
리턴 float

maxPitch 공개적으로 프로퍼티

public float maxPitch
리턴 float

maxStandUpTime 공개적으로 프로퍼티

public float maxStandUpTime
리턴 float

maxTurnBank 공개적으로 프로퍼티

public float maxTurnBank
리턴 float

minHeightToLaunchIfAirborn 공개적으로 프로퍼티

public float minHeightToLaunchIfAirborn
리턴 float

standUpSpeed 공개적으로 프로퍼티

public float standUpSpeed
리턴 float

takeoffSoundClip 공개적으로 프로퍼티

public AudioClip,UnityEngine takeoffSoundClip
리턴 UnityEngine.AudioClip

walkingNoiseClip 공개적으로 프로퍼티

public AudioClip,UnityEngine walkingNoiseClip
리턴 UnityEngine.AudioClip

windNoiseClip 공개적으로 프로퍼티

public AudioClip,UnityEngine windNoiseClip
리턴 UnityEngine.AudioClip

windNoiseMaxSpeed 공개적으로 프로퍼티

public float windNoiseMaxSpeed
리턴 float

windNoiseStartSpeed 공개적으로 프로퍼티

public float windNoiseStartSpeed
리턴 float