C# Класс BallController, Imagine_fudge-roll

Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
cameraSensitivity float
cameraTransform Transform
highRollSound AudioClip
lowRollSound AudioClip
moveSpeed float
stickyStages StickyStage[]

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
CanStick ( GameObject other ) : bool

Determines whether this instance can pick up the specified object.

Описание методов

ChangeMovementSound() публичный Метод

Changes the ball rolling sound to the correct one for our current stickiness.
public ChangeMovementSound ( ) : void
Результат void

FixedUpdate() публичный Метод

Logic that runs at fixed time intervals regardless of frame time.
public FixedUpdate ( ) : void
Результат void

OnCollisionEnter() публичный Метод

Logic that runs when the ball collides with another object
public OnCollisionEnter ( Collision collision ) : void
collision Collision Collision.
Результат void

SetStickyness() публичный Метод

Sets the stickyness.
public SetStickyness ( int index ) : void
index int Level of stickiness.
Результат void

Start() публичный Метод

Logic that runs when the object is initialized.
public Start ( ) : void
Результат void

StartMovementSound() публичный Метод

Starts audio for ball movement.
public StartMovementSound ( ) : void
Результат void

StopMovementSound() публичный Метод

Stops ball rolling audio.
public StopMovementSound ( ) : void
Результат void

Update() публичный Метод

Logic that runs every frame.
public Update ( ) : void
Результат void

Описание свойств

cameraSensitivity публичное свойство

public float cameraSensitivity
Результат float

cameraTransform публичное свойство

public Transform cameraTransform
Результат Transform

highRollSound публичное свойство

public AudioClip highRollSound
Результат AudioClip

lowRollSound публичное свойство

public AudioClip lowRollSound
Результат AudioClip

moveSpeed публичное свойство

public float moveSpeed
Результат float

stickyStages публичное свойство

public StickyStage[] stickyStages
Результат StickyStage[]