Exemple #1
0
    public void OnWaveDetected()
    {
        if (!started)
        {
            return;
        }
        switch (InputManager.Instance.GetWaveType())
        {
        case WaveType.Type1:
            targetSign = cowSign.GetComponent <TutorialSign>();
            break;

        case WaveType.Type2:
            targetSign = sheepSign.GetComponent <TutorialSign>();
            break;

        case WaveType.Type3:
            targetSign = chickenSign.GetComponent <TutorialSign>();
            break;

        default:
            break;
        }
        if (targetSign != null && !targetSign.completed)
        {
            targetSign.StartSaving();
        }
    }
Exemple #2
0
 public void NotifyCompletion()
 {
     completedSigns++;
     targetSign = null;
     if (completedSigns >= 3)
     {
         StartCoroutine(FinishTutorial());
     }
 }
Exemple #3
0
 public void OnWaveStopped()
 {
     Debug.Log("INPUT HA ENTRADO EN ONWAVE STOPPED");
     if (targetSign != null)
     {
         targetSign.GetComponent <TutorialSign> ().CancelSave();
         targetSign = null;
     }
 }
Exemple #4
0
    /**
     * This Function is called by TutorialSign to initalise the page sprites
     * and set whether the thumb animation should play
     */
    public void Init(Sprite[] images, TutorialSign tutorialSign, int[] pageWThumbs)
    {
        pages = images;
        sign  = tutorialSign;

        foreach (int page in pageWThumbs)
        {
            if (!enableThumb.ContainsKey(page))
            {
                enableThumb.Add(page, false);
            }

            enableThumb[page] = true;
        }
    }
Exemple #5
0
    private void HandleInput()
    {
        if (Input.GetButtonDown("Type1"))
        {
            targetSign = cowSign.GetComponent <TutorialSign>();
        }
        if (Input.GetButtonDown("Type2"))
        {
            targetSign = sheepSign.GetComponent <TutorialSign>();
        }
        if (Input.GetButtonDown("Type3"))
        {
            targetSign = chickenSign.GetComponent <TutorialSign>();
        }

        if (targetSign != null && !targetSign.completed)
        {
            targetSign.StartSaving();
        }
    }