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

        if (_percentAlongSpline >= 1f)
        {
            FinishedLineCallback();
            GuyManager.DestroyGuy(this);
        }
    }