public void AbortSmoothRotation() { GOEEntityRotation rotate = this.GetComponent <GOEEntityRotation>(); if (rotate != null) { rotate.Abort(); } }
public void InterruptRotation(Quaternion target) { GOEEntityRotation rotate = this.GetComponent <GOEEntityRotation>(); if (rotate != null) { rotate.InterruptRotation(); } this.Rotation = target; }
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); }