private void OnTutorialStart(TutorialData tut) { if (tut.requiredAction == RequiredAction.TAP_ABA_TOWER_BUTTON) { LeanTween.alphaCanvas(controller.gameplayUI.panel, 1.0f, 0.5f); } }
private void OnTutorialEnd(TutorialData data) { if (LevelInfo.current.IsFirstLevel()) { spawnUnitFullWidth.interactable = true; spawnUnitButton.gameObject.SetActive(true); //Debug.Log("Enable unit spawn button"); } }
private void OnTutorialStart(TutorialData data) { if (LevelInfo.current.IsFirstLevel()) { // If its the tutorial right after the unit spawn tut if (Util.tutCanvas.currTutorialIndex >= 6) { spawnUnitFullWidth.interactable = false; spawnUnitButton.gameObject.SetActive(false); //Debug.Log("disable unit spawn button"); } } }
private void OnTutorialEnd(TutorialData data) { var levelInfo = LevelInfo.current; // if (!levelInfo.IsFirstLevel()) // return; if (levelInfo.winCondition == WinCondition.KILL_ENEMIES) { string text = $"Enemies defeated <color=#{htmlColor}>0/{levelInfo.numEnemiesToDestroy}</color>"; SlideInPanel(text, 1.0f); } }
private void OnTutorialStart(TutorialData data) { if (data.highlightedItem == HighlightedItem.DNA_BASE) { LeanTween.delayedCall(gameObject, 1.5f, () => { ActivateDnaBase(); }); } else if (data.highlightedItem == HighlightedItem.MINI_CHLORO) { ActivateMiniChloro(data); } }
private void OnTutorialEnd(TutorialData data) { int index = Array.IndexOf(Util.tutCanvas.tutorials, data); //Debug.Log($"Is last tut: {data.name}. Tut index: {index}. Total tuts: {Util.tutCanvas.tutorials.Length}"); // Debug.Log($"Has tuts: {LevelInfo.current.HasTutorials()}"); // Debug.Log($"Is last tut: {Util.tutCanvas.IsLastTutorial(data)}"); if (LevelInfo.current.HasTutorials() && (Util.tutCanvas.IsLastTutorial(data) || Util.tutCanvas.skipTutorials)) { Debug.Log("init waves"); InitializeWaves(); } }
private void ActivateMiniChloro(TutorialData data = null) { var structuresContainer = GameObject.FindGameObjectWithTag(Constants.structuresContainer); if (structuresContainer == null) { return; } var miniChloros = structuresContainer.GetComponentsInChildren <MiniChloroplastTower>(true); if (data != null) { bool activateChloros = data.highlightType == HighlightType.NONE; bool highlightChloros = data.highlightType == HighlightType.ARROW; if (activateChloros) { foreach (MiniChloroplastTower tower in miniChloros) { tower.gameObject.SetActive(true); } } // else if (highlightChloros) // { // foreach (MiniChloroplastTower tower in miniChloros) // { // LeanTween.delayedCall(gameObject, 1.0f, () => // { // Util.poolManager.SpawnItemHighlight(tower.transform.position, new Vector2(0, 120)); // }); // } // } } else { foreach (MiniChloroplastTower tower in miniChloros) { tower.gameObject.SetActive(true); } } }
private void OnTutorialEnd(TutorialData tutorialData) { PlayMusicCrossFade(data.levelTrack_01, 0.5f); }
public bool IsLastTutorial(TutorialData data) { int index = Array.IndexOf(tutorials, data); return(index >= tutorials.Length - 1); }