浏览代码

Merge remote-tracking branch 'tech-mkt/state-machine-improvements' into main

/main
Ciro Continisio 4 年前
当前提交
9d3fb89a
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 9
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/PlayLandParticlesActionSO.cs

9
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/PlayLandParticlesActionSO.cs


//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() { }
正在加载...
取消
保存