Пример #1
0
        public void AbortSmoothRotation()
        {
            GOEEntityRotation rotate = this.GetComponent <GOEEntityRotation>();

            if (rotate != null)
            {
                rotate.Abort();
            }
        }
Пример #2
0
        public void InterruptRotation(Quaternion target)
        {
            GOEEntityRotation rotate = this.GetComponent <GOEEntityRotation>();

            if (rotate != null)
            {
                rotate.InterruptRotation();
            }
            this.Rotation = target;
        }
Пример #3
0
        public void StartSmoothRotation(Quaternion target, float rotationSpeed = -1)
        {
            GOEEntityRotation rotate = this.GetComponent <GOEEntityRotation>();

            if (rotate == null)
            {
                rotate = this.AddComponent <GOEEntityRotation>();
            }
            rotate.IsRotationSpeedUniform = isRotationSpeedUniform;

            if (rotationSpeed < 0)
            {
                rotationSpeed = this.rotationSpeed;
            }
            rotate.StartRotation(target, rotationSpeed);
        }