Summary
NOTE: The death 2 animation is a loop. Depending on how fast you want your bat to fall, you should repeat that until the correct distance from the ground
at which time you transition to Death 3. 10 frames into death 3, the bat will "hit" the ground and bounce. All of the vertical falling must be controlled
by code. In some cases, the bat will be too close to the ground to make use of the death 2 animation.
- Namespace
- global
- Base Types
-
- MonoBehaviour
graph BT
Type-->Base0["MonoBehaviour"]
Type["SFB_BatsDemoControl"]
class Type type-node
Syntax
public class SFB_BatsDemoControl : MonoBehaviour
Fields
Name | Constant Value | Summary |
---|---|---|
bats | ||
deathAnimationTime | ||
deathEndPosition | ||
deathStartPosition | ||
maxTurnRotation | ||
maxTurnTilt |
Methods
Name | Value | Summary |
---|---|---|
startDeath |
void |
This starts the death, saving the start and end position.
|
UpdateLocomotion |
void |
Triggered by the "Locomotion" Slider
|
UpdateTurning |
void |
Triggered by the "Turning" slider, which will pass a value between -1 and 1.
|