Ejemplo n.º 1
0
 void OnCorrectAnswer(Vector2 targetPosition)
 {
     iTween.MoveTo(textOption.gameObject, iTween.Hash("x", targetPosition.x, "y", targetPosition.y, "z", -0.2f, "islocal", false,
                                                      "time", 0.7f, "easetype", iTween.EaseType.easeInOutQuad, "delay", 0, "oncomplete", (System.Action <object>)(newValue =>
     {
         letterStats = MissingLettersStats.Placed;
         StartCoroutine(OnCorrectAnswerWait());
     })));
 }
Ejemplo n.º 2
0
        void OnIncorrectAnswer(Vector2 targetPosition)
        {
            Vector2 startPos = this.transform.position;

            iTween.MoveTo(textOption.gameObject, iTween.Hash("x", targetPosition.x, "y", targetPosition.y, "z", -0.2f, "islocal", false,
                                                             "time", 0.7f, "easetype", iTween.EaseType.easeInOutQuad, "delay", 0, "oncomplete", (System.Action <object>)(newValue =>
            {
                StartCoroutine(OnIncorrectAnswerWait());
                iTween.MoveTo(textOption.gameObject, iTween.Hash("x", startPos.x, "y", startPos.y, "z", -0.2f, "islocal", false,
                                                                 "time", 0.5f, "easetype", iTween.EaseType.easeInOutQuad, "delay", 1.5f, "oncomplete", (System.Action <object>)(newNewValue =>
                {
                    letterStats = MissingLettersStats.NotPlace;
                    OnSelect();
                })));
            })));
        }
Ejemplo n.º 3
0
        public void OnPress()
        {
            if (fillInTheBlanksController.missingLettersStats != MissingLettersStats.CanPlace || letterStats != MissingLettersStats.NotPlace)
            {
                return;
            }

            FillInTheBlanksManager.Instance.PlaySelect();

            letterStats = MissingLettersStats.Placing;
            fillInTheBlanksController.missingLettersStats = MissingLettersStats.Placing;

            selectedSpelling.missingLetterPosition.localPosition = GetPosition(selectedSpelling.textSpelling);

            OnDeselect();

            StartCoroutine(MoveLetters());
        }