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(); }
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()); } }
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); }
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); } }
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); } )); }
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); } )); }
void UpdateMuted() { muteTweenable.To(_isMuted ? 1.0f : 0.0f, 0.4f, new TweenConfig().expoInOut()); }