示例#1
0
    override public void Move()
    {
        cubePos   = nextCubePos;
        targetPos = cubePos.ToVec3();

        if (willRotate)
        {
            updateRotate = rotateAngle / moveTime;
            //rotating = true;
            willRotate = false;
            StartCoroutine(IRotate());
            if (willRotateCamera)
            {
                cameraFocus.Rotate(rotateAxis, updateRotate);
            }
        }
        else
        {
            updateMove = (targetPos - transform.localPosition) / moveTime;
            //moving = true;
            StartCoroutine(IMove());
        }
    }
 void UpdateFreeCamera()
 {
     focus.Rotate(InputRotation() * rotationalSpeed * Time.deltaTime);
     anchor.Zoom(InputZoom() * zoomSpeed);
 }