C# Class BallController, Imagine_fudge-roll

Inheritance: MonoBehaviour
ファイルを表示 Open project: Microsoft/Imagine_fudge-roll Class Usage Examples

Public Properties

Property Type Description
cameraSensitivity float
cameraTransform Transform
highRollSound AudioClip
lowRollSound AudioClip
moveSpeed float
stickyStages StickyStage[]

Public Methods

Method Description
ChangeMovementSound ( ) : void

Changes the ball rolling sound to the correct one for our current stickiness.

FixedUpdate ( ) : void

Logic that runs at fixed time intervals regardless of frame time.

OnCollisionEnter ( Collision collision ) : void

Logic that runs when the ball collides with another object

SetStickyness ( int index ) : void

Sets the stickyness.

Start ( ) : void

Logic that runs when the object is initialized.

StartMovementSound ( ) : void

Starts audio for ball movement.

StopMovementSound ( ) : void

Stops ball rolling audio.

Update ( ) : void

Logic that runs every frame.

Private Methods

Method Description
CanStick ( GameObject other ) : bool

Determines whether this instance can pick up the specified object.

Method Details

ChangeMovementSound() public method

Changes the ball rolling sound to the correct one for our current stickiness.
public ChangeMovementSound ( ) : void
return void

FixedUpdate() public method

Logic that runs at fixed time intervals regardless of frame time.
public FixedUpdate ( ) : void
return void

OnCollisionEnter() public method

Logic that runs when the ball collides with another object
public OnCollisionEnter ( Collision collision ) : void
collision Collision Collision.
return void

SetStickyness() public method

Sets the stickyness.
public SetStickyness ( int index ) : void
index int Level of stickiness.
return void

Start() public method

Logic that runs when the object is initialized.
public Start ( ) : void
return void

StartMovementSound() public method

Starts audio for ball movement.
public StartMovementSound ( ) : void
return void

StopMovementSound() public method

Stops ball rolling audio.
public StopMovementSound ( ) : void
return void

Update() public method

Logic that runs every frame.
public Update ( ) : void
return void

Property Details

cameraSensitivity public_oe property

public float cameraSensitivity
return float

cameraTransform public_oe property

public Transform cameraTransform
return Transform

highRollSound public_oe property

public AudioClip highRollSound
return AudioClip

lowRollSound public_oe property

public AudioClip lowRollSound
return AudioClip

moveSpeed public_oe property

public float moveSpeed
return float

stickyStages public_oe property

public StickyStage[] stickyStages
return StickyStage[]