C# 클래스 ProjectStorms.ShipPartDestroy

Manages the destruction of player ship parts, and parent mass change.
상속: UnityEngine.MonoBehaviour
파일 보기 프로젝트 열기: patferguson/Storms-Project 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
balDestForce float
balDestRumbleDurr float
balDestRumbleStr float
balloonPopNoise UnityEngine.AudioSource
bumpRumbleDurr float
bumpRumbleStr float
bumpVelThreshold float
colDirThreshold float
destructableParts ShipPart[]

공개 메소드들

메소드 설명
Awake ( ) : void
BreakPart ( ShipPart a_part ) : void

Breaks the part, takes mass and hampers control to the ship.

EvaluatePartCollision ( Collider a_otherCol, float a_colVelSqr ) : void

Evaluates the collision with the input collider.

IsPartDestroyed ( ShipPart a_part ) : bool

Returns whether the part has been destroyed.

IsPartTypeDestroyed ( EShipPartType a_type ) : bool

Returns whether a part of the input type is still active.

OnCollisionEnter ( Collision a_colInfo ) : void

Called when a collision begins to objects.

OnTriggerEnter ( Collider a_otherCol ) : void

Called when a trigger enter begins to objects.

RepairAllParts ( ) : void

Repairs all of the destructible parts on the ship.

RepairPart ( ShipPart a_part ) : void

Re-enables the part, returns mass and thus restores control to the ship.

Start ( ) : void

Use this for initialisation.

Update ( ) : void

Update is called once per frame.

비공개 메소드들

메소드 설명
ApplyPartCollision ( ShipPart a_part, float a_colVelSqr ) : void

Actually applies the collision to the part, shares this method with the trigger system.

ClearPartDestroyFlags ( ShipPart a_part ) : void

Clears the conditions necessary for ship destruction.

EvaluatePlayerCollision ( Collider a_otherCol, Vector3 a_velDiff, float a_colVelSqr ) : void

Evaluates the collision with the input collider.

TestShipDestroyed ( ShipPart a_part ) : void

Tests the conditions necessary for ship destruction.

메소드 상세

Awake() 공개 메소드

public Awake ( ) : void
리턴 void

BreakPart() 공개 메소드

Breaks the part, takes mass and hampers control to the ship.
public BreakPart ( ShipPart a_part ) : void
a_part ShipPart The part to test
리턴 void

EvaluatePartCollision() 공개 메소드

Evaluates the collision with the input collider.
public EvaluatePartCollision ( Collider a_otherCol, float a_colVelSqr ) : void
a_otherCol UnityEngine.Collider
a_colVelSqr float Squared relative collision velocity magnitude.
리턴 void

IsPartDestroyed() 공개 메소드

Returns whether the part has been destroyed.
public IsPartDestroyed ( ShipPart a_part ) : bool
a_part ShipPart The part to test
리턴 bool

IsPartTypeDestroyed() 공개 메소드

Returns whether a part of the input type is still active.
public IsPartTypeDestroyed ( EShipPartType a_type ) : bool
a_type EShipPartType Ship part type.
리턴 bool

OnCollisionEnter() 공개 메소드

Called when a collision begins to objects.
public OnCollisionEnter ( Collision a_colInfo ) : void
a_colInfo UnityEngine.Collision Collision information.
리턴 void

OnTriggerEnter() 공개 메소드

Called when a trigger enter begins to objects.
public OnTriggerEnter ( Collider a_otherCol ) : void
a_otherCol UnityEngine.Collider Other collider.
리턴 void

RepairAllParts() 공개 메소드

Repairs all of the destructible parts on the ship.
public RepairAllParts ( ) : void
리턴 void

RepairPart() 공개 메소드

Re-enables the part, returns mass and thus restores control to the ship.
public RepairPart ( ShipPart a_part ) : void
a_part ShipPart The part to test
리턴 void

Start() 공개 메소드

Use this for initialisation.
public Start ( ) : void
리턴 void

Update() 공개 메소드

Update is called once per frame.
public Update ( ) : void
리턴 void

프로퍼티 상세

balDestForce 공개적으로 프로퍼티

Force to explode the balloons with.
public float balDestForce
리턴 float

balDestRumbleDurr 공개적으로 프로퍼티

How long to rumble and screenshake the balloon destruction for.
public float balDestRumbleDurr
리턴 float

balDestRumbleStr 공개적으로 프로퍼티

Strength to rumble and screenshake the balloon destruction on.
public float balDestRumbleStr
리턴 float

balloonPopNoise 공개적으로 프로퍼티

Trigger the component on balloon destruction
public AudioSource,UnityEngine balloonPopNoise
리턴 UnityEngine.AudioSource

bumpRumbleDurr 공개적으로 프로퍼티

Duration of the bump rumble and screenshake.
public float bumpRumbleDurr
리턴 float

bumpRumbleStr 공개적으로 프로퍼티

Strength of the bump rumble and screenshake.
public float bumpRumbleStr
리턴 float

bumpVelThreshold 공개적으로 프로퍼티

Threshold for a collision to consider a bump rumble.
public float bumpVelThreshold
리턴 float

colDirThreshold 공개적으로 프로퍼티

Cone angle for detecting directional collisions.
public float colDirThreshold
리턴 float

destructableParts 공개적으로 프로퍼티

The parts of this ship that have children colliders and can be destroyed.
public ShipPart[] destructableParts
리턴 ShipPart[]