void Update() { if (transform.position.y < -100f) { GuyManager.DestroyGuy(GetComponent <Guy>()); } }
void Update() { _percentAlongSpline += _appliedMoveSpeed * Time.deltaTime; transform.position = _bezierSpline.GetPoint(_percentAlongSpline); if (_percentAlongSpline >= 1f) { FinishedLineCallback(); GuyManager.DestroyGuy(this); } }