Exemplo n.º 1
0
        public bool RotateRight()
        {
            if (_isAnimating)
            {
                _queue.Enqueue(ProgramBlockType.RotateRight);
                return(false);
            }

            startRot = transform.rotation;
            endRot   = Quaternion.LookRotation(transform.right);

            Set(Animations.Move_R);
            _type = ProgramBlockType.RotateRight;

            StartCoroutine("UpdateRotation");
            return(true);
        }
Exemplo n.º 2
0
        public bool Forward()
        {
            if (_isAnimating)
            {
                _queue.Enqueue(ProgramBlockType.Forward);
                return(false);
            }

            startPos         = transform.position;
            endPos           = transform.position + transform.forward;
            trajectoryHeight = 0;

            Set(Animations.Move);
            _type = ProgramBlockType.Forward;

            StartCoroutine("UpdatePosition");
            return(true);
        }