protected override void Awake() { base.Awake(); missionSelector = GetComponent <MissionSelector>(); UpdateInfo(); }
void Start() { Data.Instance.missions.hasReachedBoss = false; if (Data.Instance.playMode == Data.PlayModes.SURVIVAL || Data.Instance.playMode == Data.PlayModes.PARTYMODE || Data.Instance.playMode == Data.PlayModes.CONTINUEMODE) { Data.Instance.missions.MissionActiveID = 0; storyMode.SetActive(false); partyMode.SetActive(true); timePassed = 0; Invoke("TimeOver", 90); Invoke("SetCanInteract", 1); } else { Data.Instance.events.OnJoystickUp += OnJoystickUp; Data.Instance.events.OnJoystickDown += OnJoystickDown; partyMode.SetActive(false); storyMode.SetActive(true); Invoke("SetCanInteract", 0.2f); } Data.Instance.isReplay = false; missionSelector = GetComponent <MissionSelector> (); Data.Instance.multiplayerData.ResetAll(); Data.Instance.events.OnResetMultiplayerData(); title.text = TextsManager.Instance.GetText("CHANGE GAME"); // title.text = "SELECT GAME"; videgameID = Data.Instance.videogamesData.actualID; missionSelector.LoadVideoGameData(videgameID); //videogameUI = GetComponent<VideogamesUIManager> (); //videogameUI.Init (); SetSelected(); VoicesManager.Instance.PlaySpecificClipFromList(VoicesManager.Instance.UIItems, 0); Data.Instance.events.OnJoystickLeft += OnJoystickLeft; Data.Instance.events.OnJoystickRight += OnJoystickRight; Data.Instance.events.ResetHandwritingText += ResetHandwritingText; Data.Instance.events.OnJoystickClick += OnJoystickClick; if (Data.Instance.playMode == Data.PlayModes.STORYMODE || Data.Instance.playMode == Data.PlayModes.SURVIVAL) { camAnimnation.Play("levelSelectorCameraIdleStoryMode"); } }
void Start() { Data.Instance.missions.hasReachedBoss = false; if (Data.Instance.playMode == Data.PlayModes.SURVIVAL || Data.Instance.playMode == Data.PlayModes.PARTYMODE || Data.Instance.playMode == Data.PlayModes.CONTINUEMODE) { Data.Instance.missions.MissionActiveID = 0; storyMode.SetActive(false); partyMode.SetActive(true); timePassed = 0; Invoke("TimeOver", 90); Invoke("SetCanInteract", 1); } else { Data.Instance.events.OnJoystickUp += OnJoystickUp; Data.Instance.events.OnJoystickDown += OnJoystickDown; partyMode.SetActive(false); storyMode.SetActive(true); Invoke("SetCanInteract", 0.2f); } Data.Instance.isReplay = false; missionSelector = GetComponent <MissionSelector> (); Data.Instance.multiplayerData.ResetAll(); Data.Instance.events.OnResetScores(); title.text = "CAMBIAR JUEGO"; // title.text = "SELECT GAME"; videgameID = Data.Instance.videogamesData.actualID; missionSelector.LoadVideoGameData(videgameID); //videogameUI = GetComponent<VideogamesUIManager> (); //videogameUI.Init (); SetSelected(); Data.Instance.voicesManager.PlaySpecificClipFromList(Data.Instance.voicesManager.UIItems, 0); Data.Instance.events.OnJoystickLeft += OnJoystickLeft; Data.Instance.events.OnJoystickRight += OnJoystickRight; Data.Instance.events.OnJoystickClick += OnJoystickClick; }