예제 #1
0
    void StartDelete()
    {
        FSoundManager.PlaySound("UI/MathOpen");

        isOpeningDelete = true;

        okBox.isTouchable     = false;
        deleteBox.isTouchable = false;
        RemoveSwatches();
        RemoveKeyboard();

        Cell deleteCancelCell = CellManager.GetCellFromGrid(2, 4, 3, 3);
        Cell deleteOkCell     = CellManager.GetCellFromGrid(5, 7, 3, 3);

        deleteCancelBox = new SpriteBox(slot.player, "Icons/Cancel", 100, 100);
        deleteCancelBox.SetToCell(deleteCancelCell);
        deleteCancelBox.anchorCell = deleteCancelCell;
        AddChild(deleteCancelBox);

        deleteOkBox = new SpriteBox(slot.player, "Icons/Checkmark", 100, 100);
        deleteOkBox.SetToCell(deleteOkCell);
        deleteOkBox.anchorCell = deleteOkCell;
        AddChild(deleteOkBox);

        deleteOkBox.isTouchable     = false;
        deleteCancelBox.isTouchable = false;

        nameBox.fixedScale = nameBox.nameLabel.scale;
        nameBox.contentContainer.AddChild(deleteQMark = new FSprite("Icons/QuestionMark"));
        deleteQMark.color    = Color.black;
        nameBox.questionMark = deleteQMark;

        deleteModeTweenable.To(1.0f, 0.7f, new TweenConfig().onComplete(HandleDeleteModeOpen));
        HandleDeleteModeChange();
    }
예제 #2
0
 void UpdateResetMode()
 {
     if (_isResetMode)
     {
         if (_isMathMode)
         {
             CloseMathMode();
         }
         _resetTweenable.To(1.0f, 0.3f, new TweenConfig().expoIn());
     }
     else
     {
         _resetTweenable.To(0, 0.3f, new TweenConfig().expoOut());
     }
 }
예제 #3
0
    public static RXTweenable DelayAction(float delay, Action action)
    {
        RXTweenable rt = new RXTweenable(0.0f);

        rt.To(1.0f, delay, new TweenConfig().onComplete((t) => { action(); }));
        return(rt);
    }
예제 #4
0
파일: Box.cs 프로젝트: MattRix/ScorekeeperX
    private void UpdateEnabled()
    {
        float duration = 0.15f;

        if (_isFirstTimeEnabledSet)
        {
            duration = 0.01f;            //super fast
            _isFirstTimeEnabledSet = false;
        }

        if (_isEnabled)
        {
            _alphaTweenable.To(1.0f, duration);
        }
        else
        {
            _alphaTweenable.To(0.5f, duration);
        }
    }
예제 #5
0
파일: Box.cs 프로젝트: MattRix/ScorekeeperX
    private void HandlePlayerColorChange()
    {
        Color newColor = _player.color.color;

        RXTweenable delayTweenable = new RXTweenable(0.0f);

        delayTweenable.To(1.0f, colorTweenDelay + 0.001f, new TweenConfig().onComplete(
                              () =>
        {
            Color oldColor = boxSprite.color;

            //note: intentionally not using +=
            _colorTweenable.SignalChange = () =>
            {
                boxSprite.color = oldColor + (newColor - oldColor) * _colorTweenable.amount;
            };

            _colorTweenable.amount = 0.0f;

            _colorTweenable.To(1.0f, 0.3f);
        }
                              ));
    }
예제 #6
0
파일: Box.cs 프로젝트: MattRix/ScorekeeperX
    private void HandlePlayerColorChange()
    {
        Color newColor = _player.color.color;

        RXTweenable delayTweenable = new RXTweenable(0.0f);

        delayTweenable.To(1.0f,colorTweenDelay+0.001f,new TweenConfig().onComplete(
        ()=>
        {
            Color oldColor = boxSprite.color;

            //note: intentionally not using +=
            _colorTweenable.SignalChange = () =>
            {
                boxSprite.color = oldColor + (newColor - oldColor) * _colorTweenable.amount;
            };

            _colorTweenable.amount = 0.0f;

            _colorTweenable.To(1.0f,0.3f);
        }
        ));
    }
예제 #7
0
 void UpdateMuted()
 {
     muteTweenable.To(_isMuted ? 1.0f : 0.0f, 0.4f, new TweenConfig().expoInOut());
 }