C# Class SlothController

Inheritance: MonoBehaviour
Afficher le fichier Open project: ferdbold/littleawfuljam2016 Class Usage Examples

Méthodes publiques

Свойство Type Description
leftHandCollider UnityEngine.SphereCollider
wallLayerMask LayerMask

Méthodes publiques

Méthode Description
ActivateControls ( ) : void
AreControlsEnabled ( ) : bool
DeactivateControls ( ) : void
MoveLeft ( float holdTime ) : void

Move Left Input was pressed

MoveRight ( float holdTime ) : void

Move Right Input was pressed

OnCollisionLeftHand ( ) : void

Called when LeftHand Collider hits a wall

OnCollisionRightHand ( ) : void

Called when RightHand Collider hits a wall

ToggleTurnLeft ( bool isTurning ) : void

Input for Turn Left was modified

ToggleTurnRight ( bool isTurning ) : void

Input for Turn Left was modified

Private Methods

Méthode Description
Awake ( ) : void
MoveSloth ( bool isRight, float holdTime ) : IEnumerator

Initiate a sloth movement

PushSloth ( Vector3 force ) : IEnumerator
RotateSloth ( Vector3 rotation, float animTime, AnimationCurve animCurve ) : IEnumerator

Rotate the transform based on given rotation, time and curve

Start ( ) : void
StartCooldownMoveLeft ( ) : IEnumerator

Left Move Cooldown

StartCooldownMoveRight ( ) : IEnumerator

Right Move Cooldown

Update ( ) : void

Method Details

ActivateControls() public méthode

public ActivateControls ( ) : void
Résultat void

AreControlsEnabled() public méthode

public AreControlsEnabled ( ) : bool
Résultat bool

DeactivateControls() public méthode

public DeactivateControls ( ) : void
Résultat void

MoveLeft() public méthode

Move Left Input was pressed
public MoveLeft ( float holdTime ) : void
holdTime float
Résultat void

MoveRight() public méthode

Move Right Input was pressed
public MoveRight ( float holdTime ) : void
holdTime float
Résultat void

OnCollisionLeftHand() public méthode

Called when LeftHand Collider hits a wall
public OnCollisionLeftHand ( ) : void
Résultat void

OnCollisionRightHand() public méthode

Called when RightHand Collider hits a wall
public OnCollisionRightHand ( ) : void
Résultat void

ToggleTurnLeft() public méthode

Input for Turn Left was modified
public ToggleTurnLeft ( bool isTurning ) : void
isTurning bool
Résultat void

ToggleTurnRight() public méthode

Input for Turn Left was modified
public ToggleTurnRight ( bool isTurning ) : void
isTurning bool
Résultat void

Property Details

leftHandCollider public_oe property

public SphereCollider,UnityEngine leftHandCollider
Résultat UnityEngine.SphereCollider

wallLayerMask public_oe property

public LayerMask wallLayerMask
Résultat LayerMask