void Update_Click() { if (!Input.GetMouseButtonUp(0)) { return; } switch (drawMode) { case DrawMode.Click: TutorialUI.Click(MouseWorldPosition()); break; case DrawMode.ClickRepeat: TutorialUI.ClickRepeat(MouseWorldPosition()); break; case DrawMode.RandomMark: TutorialUI.MarkSize markSize = NormalToggle.isOn ? TutorialUI.MarkSize.Normal : BigToggle.isOn ? TutorialUI.MarkSize.Big : TutorialUI.MarkSize.Huge; if (UnityEngine.Random.value < 0.5f) { TutorialUI.MarkYes(MouseWorldPosition(), markSize); } else { TutorialUI.MarkNo(MouseWorldPosition(), markSize); } break; } }
private IEnumerator TutorialHintClickCO(Transform targetTr) { yield return(new WaitForSeconds(3f)); TutorialUI.SetCamera(Camera.main); while (true) { TutorialUI.Click(targetTr.position); yield return(new WaitForSeconds(1.5f)); } }
public void Update(float delta) { rightButtonTimer -= delta; if (correctButton != null && TutorialMode && rightButtonTimer < 0 && box.IsReady()) { rightButtonTimer = 3; var uicamera = game.uiCamera; TutorialUI.SetCamera(uicamera); TutorialUI.Click(correctButton.transform.position); } }
private IEnumerator TutorialHintClickCO(Transform targetTr, Camera camera) { TutorialUI.SetCamera(camera); while (true) { var viewportPos = camera.WorldToViewportPoint(targetTr.position); if (viewportPos.x > 0 && viewportPos.x < 1) { TutorialUI.Click(targetTr.position); } yield return(new WaitForSeconds(0.85f)); } }
private IEnumerator TutorialClicks() { idleTime = 0; clickEnabled = false; yield return(TimeEngine.Wait(0.4f)); TutorialUI.Click(TutorialHelper.GetWorldPosition()); yield return(TimeEngine.Wait(0.1f)); AssessmentConfiguration.Instance.Context.GetAudioManager().PlaySound(Sfx.UIPopup); yield return(TimeEngine.Wait(0.2f)); clickEnabled = true; }
public void ShowTutorial() { if (state != State.NonInteractive) { if (droppedZone == null || droppedZone != correctDropZone) { TutorialUI.DrawLine(transform.position, correctDropZone.transform.position, TutorialUI.DrawLineMode.FingerAndArrow); } else if ((transform.rotation.z) > 0.1f) { Vector3 rotateButtonPosition = droppedZone.rotateButtonController.transform.position; TutorialUI.Click(new Vector3(rotateButtonPosition.x, rotateButtonPosition.y, rotateButtonPosition.z - 1f)); } } }
void Update() { // Keyboard overrides if (Input.GetKeyDown(KeyCode.Space)) { TutorialUI.Click(MouseWorldPosition()); } // Regular mouse interactions if (isDraggingMode) { Update_Dragging(); } else { Update_Click(); } }
void ShowTutorialPressCorrect() { tutorialCorrectActive = true; tutorialSequenceIndex = letterOnSequence; if (isSequence) { tutorialCorrectTimer = 1f; Vector3 clickPosition = game.eggButtonBox.GetButtons(false)[tutorialSequenceIndex].transform.position; TutorialUI.Click(clickPosition); } else { tutorialCorrectTimer = 2f; Vector3 clickPosition = game.eggButtonBox.GetButtons(false)[tutorialSequenceIndex].transform.position; TutorialUI.ClickRepeat(clickPosition, tutorialCorrectTimer); } }
public void Update(float delta) { rightButtonTimer -= delta; if (correctButton != null && TutorialMode && rightButtonTimer < 0 && box.IsReady() && !Finished) { rightButtonTimer = 3; var uicamera = game.uiCamera; TutorialUI.SetCamera(uicamera); TutorialUI.Click(correctButton.transform.position); } if (!TutorialMode && showOldTimer) { game.radialWidget.percentage = gameTime.Time / gameTime.Duration; } if (!TutorialMode && ReadingGameConfiguration.Instance.ShowTimer && !Finished) { game.Context.GetOverlayWidget().SetClockTime(gameTime.Time); } gameTime.Update(delta); }
public void Update(float delta) { if (toNextState) { nextStateTimer -= delta; if (nextStateTimer <= 0f) { toNextState = false; if (!showTutorial) { if (game.stagePositiveResult) { game.CurrentScore++; ILivingLetterData runLetterData; if (EggConfiguration.Instance.Variation == EggVariation.BuildWord) { runLetterData = new LL_ImageData(game.CurrentQuestion.Question.Id); } else if (EggConfiguration.Instance.Variation == EggVariation.Image) { runLetterData = new LL_ImageData(game.CurrentQuestion.Answers[0].Id); } else { runLetterData = game.CurrentQuestion.Answers[0]; } game.runLettersBox.AddRunLetter(runLetterData); } game.currentStage++; game.antura.NextStage(); } game.SetCurrentState(game.ResultState); } } inputButtonTimer -= delta; if (repeatInputHasProgressed) { PlayPositiveAudioFeedback(); game.eggController.EmoticonPositive(); game.eggController.StartShake(); game.eggController.ParticleCorrectEnabled(); repeatInputHasProgressed = false; if (inputButtonTimer >= 0) { inputButtonCount++; } else { inputButtonCount = 0; } if (inputButtonCount >= inputButtonMax) { inputButtonCount = 0; PositiveFeedback(); } tutorialDelayTimer = 0.5f; inputButtonTimer = inputButtonTime; } if (showTutorial && !tutorialStop) { if (tutorialCorrectActive) { tutorialCorrectTimer -= delta; if (tutorialCorrectTimer <= 0f) { if (isSequence) { tutorialSequenceIndex++; if (tutorialSequenceIndex < correctAnswers) { tutorialCorrectTimer = 1f; Vector3 clickPosition = game.eggButtonBox.GetButtons(false)[tutorialSequenceIndex].transform.position; TutorialUI.Click(clickPosition); } else { tutorialCorrectActive = false; tutorialDelayTimer = tutorialDelayTime; } } else { tutorialCorrectActive = false; tutorialDelayTimer = tutorialDelayTime; } } } else { tutorialDelayTimer -= delta; if (tutorialDelayTimer <= 0f) { ShowTutorialPressCorrect(); } } } }
public void Update(float delta) { if (toNextState) { nextStateTimer -= delta; if (nextStateTimer <= 0f) { toNextState = false; if (!showTutorial) { if (game.stagePositiveResult) { game.correctStages++; ILivingLetterData runLetterData; runLetterData = game.questionManager.GetlLetterDataSequence()[0]; game.runLettersBox.AddRunLetter(runLetterData); } game.Context.GetOverlayWidget().SetStarsScore(game.CurrentStars); game.currentStage++; game.antura.NextStage(); } game.SetCurrentState(game.ResultState); } } inputButtonTimer -= delta; if (progressInput) { PlayPositiveAudioFeedback(); game.eggController.EmoticonPositive(); game.eggController.StartShake(); game.eggController.ParticleCorrectEnabled(); progressInput = false; if (inputButtonTimer >= 0) { inputButtonCount++; } else { inputButtonCount = 0; } if (inputButtonCount >= inputButtonMax) { inputButtonCount = 0; PositiveFeedback(); } tutorialDelayTimer = 0.5f; inputButtonTimer = inputButtonTime; } if (showTutorial && !tutorialStop) { if (tutorialCorrectActive) { tutorialCorrectTimer -= delta; if (tutorialCorrectTimer <= 0f) { if (isSequence) { tutorialSequenceIndex++; if (tutorialSequenceIndex < correctAnswers) { tutorialCorrectTimer = 1f; Vector3 clickPosition = game.eggButtonBox.GetButtons(false)[tutorialSequenceIndex].transform.position; TutorialUI.Click(clickPosition); } else { tutorialCorrectActive = false; tutorialDelayTimer = tutorialDelayTime; } } else { tutorialCorrectActive = false; tutorialDelayTimer = tutorialDelayTime; } } } else { tutorialDelayTimer -= delta; if (tutorialDelayTimer <= 0f) { TutorialPressCorrect(); } } } }