|
|
|
|
|
|
//Component references
|
|
|
|
private DustParticlesController _dustController; |
|
|
|
|
|
|
|
private float _coolDown = 0.3f; |
|
|
|
private float t = 0f; |
|
|
|
|
|
|
|
public override void Awake(StateMachine stateMachine) |
|
|
|
{ |
|
|
|
_dustController = stateMachine.GetComponent<DustParticlesController>(); |
|
|
|
|
|
|
{ |
|
|
|
_dustController.PlayLandParticles(); |
|
|
|
if (Time.time >= t + _coolDown) |
|
|
|
{ |
|
|
|
_dustController.PlayLandParticles(); |
|
|
|
t = Time.time; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override void OnUpdate() { } |