private void SetRotation(ClockRotations rotation) { var degrees = restore ? 0 : -90; if (rotation == ClockRotations.Clockwise) { RotateSingleButton(buttonC, degrees); RotateSingleButton(buttonE, degrees); RotateSingleButton(buttonQ, degrees); RotateSingleButton(buttonY, degrees); return; } RotateSingleButton(buttonC, -degrees); RotateSingleButton(buttonE, -degrees); RotateSingleButton(buttonQ, -degrees); RotateSingleButton(buttonY, -degrees); }
private void OnButtonsSlidOut(Action action, ClockRotations rotation) { poorMansBarrier ++; if (poorMansBarrier < 4) { return; } SetRotation(rotation); if (action != null) { action(); } }
public UIRotationEffect(ClockRotations clockRotation) : this() { clockRotations[0] = clockRotation; clockRotations[1] = clockRotation == ClockRotations.Clockwise ? ClockRotations.CounterClockwise : ClockRotations.Clockwise; }
public void PerformUIRotation(ClockRotations clockRotation, bool restore) { isSliding = true; poorMansBarrier = 0; this.restore = restore; if (clockRotation == ClockRotations.Clockwise) { SlideButtonsOut(() => OnButtonsSlidOut(MoveClockwise, clockRotation)); } else{ SlideButtonsOut(() => OnButtonsSlidOut(MoveCounterClockwise, clockRotation)); } }
public void InvokeUIRotation(ClockRotations clockRotation, bool restore) { guiManager.PerformUIRotation(clockRotation, restore); }