Exemple #1
0
    public void UpdateSpeedAndDelta()
    {
        int direction = 1;

        if (transform.rotation.y < -0.5f || transform.rotation.y > 0.5f)
        {
            direction = -1;
        }

        Speed      = Speed.Change(x: Speed.x * direction);
        StartDelta = StartDelta.Change(x: StartDelta.x * direction);
    }