Пример #1
0
    void Update()
    {
        _cubeActor.MoveUpdate();

        _capsuleActor.MoveUpdate();

        _tCamera    += 0.1f * Time.deltaTime; _tCamera = _tCamera > 1.0f ? 0 : _tCamera;
        _tr.position = _curve.GetSplinePosition(_tCamera);
        _tr.LookAt(Vector3.zero);
    }
Пример #2
0
 public void MoveUpdate()
 {
     _tCube += 0.1f * Time.deltaTime; _tCube = _tCube > 1.0f ? 0 : _tCube;
     gameObject.transform.position = _curve.GetSplinePosition(_tCube);
 }