private static void CommentRepliesHyperlinkButtonTapped(IllustrationViewerPage recipient, CommentRepliesHyperlinkButtonTappedMessage message) { var commentRepliesBlock = new CommentRepliesBlock { ViewModel = new CommentRepliesBlockViewModel(message.Sender !.GetDataContext <CommentBlockViewModel>()) }; commentRepliesBlock.CloseButtonTapped += recipient.CommentRepliesBlock_OnCloseButtonTapped; recipient._commentRepliesPopup = PopupManager.CreatePopup(commentRepliesBlock, widthMargin: 200, maxWidth: 1500, minWidth: 400, maxHeight: 1200, closing: (_, _) => recipient._commentRepliesPopup = null); PopupManager.ShowPopup(recipient._commentRepliesPopup); }
private void Update() { if (!running) { return; } platforms = platformSlider.value > 0 && platformsFixed; crushers = crusherSlider.value > 0 && crushersFixed; doors = doorSlider.value > 0 && doorsFixed; if (breakTimer <= 0) { int breakItem = Random.Range(0, 4); if (breakItem == 0) { BreakCrushers(); } else if (breakItem == 1) { BreakDoors(); } else { BreakPlatforms(); } breakTimer = Random.Range(minBreakInterval, maxBreakInterval); } breakTimer -= globalSpeed * Time.deltaTime; if (virusTimer <= 0) { SoundEffectManager.inst.PlaySound("Alarm", 1f); virusManager.ActivateVirus(); virusTimer = Random.Range(minVirusInterval, maxVirusInterval); cameraShake.trauma = 0.4f; } virusTimer -= globalSpeed * Time.deltaTime; if (minigameTimer <= 0) { NextMinigame(); minigameTimer = 1000f; } minigameTimer -= globalSpeed * Time.deltaTime; if (randomTimer <= 0) { RandomEvent(); randomTimer = Random.Range(minRandomInterval, maxRandomInterval); } randomTimer -= globalSpeed * Time.deltaTime; if (popupTimer <= 0) { popupManager.CreatePopup(); popupTimer = Random.Range(minPopupInterval, maxPopupInterval); } popupTimer -= globalSpeed * Time.deltaTime; globalSpeed += globalSpeedIncreaseRate * Time.deltaTime; timer += Time.deltaTime; timerText.text = string.Format("{0}:{1}", ((int)timer / 60).ToString("D1"), ((int)timer % 60).ToString("D2")); }