private void Update() { if (synchronization) { angle = synchronization.angle; direction = synchronization.direction; } else { angle = transform.rotation.eulerAngles.y; direction = DirectionInstance.GetDirection(angle); } if (needle) { if (motion == Motion.Instant) { needle.localRotation = Quaternion.AngleAxis(angle, axis); } else if (motion == Motion.Linear) { } else { } } }
private void Update() { angle = transform.rotation.eulerAngles.y; direction = GetDirection(angle); }