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(); } }
public void NotifyCompletion() { completedSigns++; targetSign = null; if (completedSigns >= 3) { StartCoroutine(FinishTutorial()); } }
public void OnWaveStopped() { Debug.Log("INPUT HA ENTRADO EN ONWAVE STOPPED"); if (targetSign != null) { targetSign.GetComponent <TutorialSign> ().CancelSave(); targetSign = null; } }
/** * 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; } }
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(); } }