Example #1
0
    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);
    }
Example #2
0
    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;
 }
Example #4
0
 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);
 }