// Use this for initialization void Awake() { balls = new List <GameObject>(); ballTypes = new GameObject[] { ball, ballBounce, ballCurve, ballWater, ballElectricity, ballVampiric }; ballsToSpawn = new List <int>[] { new List <int> { }, new List <int> { }, new List <int> { } }; ballSpawns = new float[][] { new float[] { 0, -1.78f, 1.78f }, new float[] { -1.5f, 0, -3f, 1.5f, -4.5f } }; nextBallSpawn = 0; titleScreenLive = false; warmupLive = false; gameLive = false; lightManager = lights.GetComponent <LightManager>(); scoreboardManager = scoreBoard.GetComponent <ScoreboardManager>(); spotLightManager = spotLight.GetComponent <SpotlightManager>(); titleScreenManager = titleScreen.GetComponent <TitleScreenManager>(); playerManager1 = player1.GetComponent <PlayerManager>(); playerManager2 = player2.GetComponent <PlayerManager>(); GenerateBallsToSpawn(0, 0); playerManager1.SetBoundaries(team1Boundaries); playerManager2.SetBoundaries(team2Boundaries); }
private void Awake() { if (instance == null) { instance = this; } }
// Token: 0x06003422 RID: 13346 RVA: 0x000D6A3C File Offset: 0x000D4C3C public IEnumerator RestartingCleanupNextFrame() { this.RemoveGameplayObjects(); this.ResetInputLocks(); if (UI.Fader.IsFadingInOrStay() || UI.Fader.IsTimelineFading()) { UI.Fader.FadeOut(2f); } XboxLiveController.Instance.Reset(); XboxOneController.ResetCurrentGamepad(); XboxOneFlow.Engage = false; XboxOneSession.EndSession(); yield return(new WaitForFixedUpdate()); this.m_isRestartingGame = false; this.ActiveObjectives.Clear(); Game.Checkpoint.SaveGameData = new SaveGameData(); Events.Scheduler.OnGameSerializeLoad.Call(); Events.Scheduler.OnGameReset.Call(); if (UI.Fader.IsFadingInOrStay() || UI.Fader.IsTimelineFading()) { UI.Fader.FadeOut(2f); } TitleScreenManager.OnReturnToTitleScreen(); this.CreateCheckpoint(); yield break; }
/// <summary> /// Se suscribe a los eventos de TitleScreenManager /// </summary> private static void SubscribeTitleScreenScene() { TSM = TitleScreenManager.Instance; if (enabledDebugUI) { InstantiateDebugGO(); } if (!titlescreenSubscribed) { Debug.Log("Suscribiendose a eventos de TitleScreen..."); TSM.OnUIPageEnabled += NotifyPageEnabled; TSM.OnUIPageDisabled += NotifyPageDisabled; TSM.OnButtonPlayClicked += NotifyButtonPlayClicked; TSM.OnButtonStatsClicked += NotifyButtonStatsClicked; TSM.OnButtonConfigClicked += NotifyButtonConfigClicked; TSM.OnButtonInfoClicked += NotifyButtonInfoClicked; TSM.OnButtonBackClicked += NotifyButtonBackClicked; TSM.OnButtonLanguageClicked += NotifyButtonLanguageClicked; TSM.OnButtonOkClicked += NotifyButtonOkClicked; TSM.OnTitleAnimationFinished += NotifyTitleAnimationFinished; Debug.Log("Eventos de TitleScreen suscritos."); titlescreenSubscribed = true; } }
void OnEnable() { //Here we grab the SourceAsset rootVisualElement //This is a MAJOR KEY, really couldn't find this key step in information online //If you want to reference your active UI in a script make a public UIDocument variable and //then call rootVisualElement on it, from there you can query the Visual Element tree by names //or element types m_titleScreenManagerVE = m_TitleUIDocument.rootVisualElement; //Here we grab the TitleScreenManager by querying by name m_titleScreenManagerClass = m_titleScreenManagerVE.Q <TitleScreenManager>("TitleScreenManager"); //From within TitleScreenManager we query local-games-list by name m_ListView = m_titleScreenManagerVE.Q <ListView>("local-games-list"); }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { DestroyImmediate(this.gameObject); } titleScreen.SetActive(false); }
private void Awake() { switch (GameManager.Instance.GameState) { case GameState.TITLE_SCREEN: TSM = TitleScreenManager.Instance; break; case GameState.LEVEL: LM = LevelManager.Instance; break; } }
void Awake() { // Ensure there can only be one TitleScreenManager if (manager == null) { manager = this; DontDestroyOnLoad(gameObject); } else if (manager != this) { Destroy(gameObject); } // Prevent autoselect game window to see the game in scene view. QOL remove before deploy //#if UNITY_EDITOR // UnityEditor.SceneView.FocusWindowIfItsOpen(typeof(UnityEditor.SceneView)); //#endif }
private IEnumerator SpawnPieces() { yield return(startWait); StartCoroutine(TitleScreenManager.FadeAudioSourceVolume(mainGameAudio, 0.8f, 2f)); while (true) { Ossan ossan = allOssan[Random.Range(0, allOssan.Length)]; SpawnPiece(ossan); ossanSinceLastWood++; if (ossanSinceLastWood >= 4) { SpawnPiece(theWoods[Random.Range(0, theWoods.Length)]); ossanSinceLastWood = 0; } yield return(new WaitForSeconds(Random.Range(3f, 5f))); } }
private IEnumerator _EndGame() { spawner.StopSpawning(); DragablePiece[] remainingDraggablePieces = FindObjectsOfType(typeof(DragablePiece)) as DragablePiece[]; for (int i = 0; i < remainingDraggablePieces.Length; i++) { Destroy(remainingDraggablePieces[i].gameObject); } endScreen.RecordScore(HudManager.instance.Score); StartCoroutine(TitleScreenManager.FadeAudioSourceVolume(mainGameAudio, 0f, 2f)); yield return(new WaitForSeconds(1f)); StartCoroutine(TitleScreenManager.FadeAudioSourceVolume(titleScreenAudio, 0.8f, 2f)); HudManager.instance.Score = 0; currentSleepTime = START_SLEEP_TIME; endScreen.container.gameObject.SetActive(true); yield return(null); }
public void Initialize(TitleScreenManager titleScreenManager) { _anim = titleScreenManager.GetComponent <TitleAnimationController>(); var menu = titleScreenManager.GetValue <Menu>("_mainMenu"); Initialize(menu); ResumeExpeditionButton = GetTitleButton("Button-ResumeGame"); NewExpeditionButton = GetTitleButton("Button-NewGame"); OptionsButton = GetTitleButton("Button-Options"); ViewCreditsButton = GetTitleButton("Button-Credits"); SwitchProfileButton = GetTitleButton("Button-Profile"); QuitButton = GetTitleButton("Button-Exit"); var tabbedMenu = titleScreenManager.GetValue <TabbedMenu>("_optionsMenu"); OptionsMenu.Initialize(tabbedMenu); InvokeOnInit(); }
public static void LoadContent(ContentManager Content) { FontProvider.AddFont("Pericles8", Content.Load <SpriteFont>(@"fonts/pericles8")); FontProvider.AddFont("Pericles9", Content.Load <SpriteFont>(@"fonts/pericles9")); FontProvider.AddFont("Pericles14", Content.Load <SpriteFont>(@"fonts/pericles14")); FontProvider.AddFont("Pericles21", Content.Load <SpriteFont>(@"fonts/pericles21")); FontProvider.AddFont("Mono14", Content.Load <SpriteFont>(@"fonts/mono14")); FontProvider.AddFont("Mono21", Content.Load <SpriteFont>(@"fonts/mono21")); TitleScreenManager.LoadContent(Content.Load <Texture2D>(@"textures/misc/TitleScreen")); VariableProvider.WhiteTexture = Content.Load <Texture2D>(@"textures/misc/white"); AnimationDictionaryProvider.LoadAnimationStrips(Content); MugShotProvider.DummyMugShotAngry = Content.Load <Texture2D>(@"textures/misc/mugshots/dummyangry"); MugShotProvider.DummyMugShotNormal = Content.Load <Texture2D>(@"textures/misc/mugshots/dummynormal"); DialogManager.Initialize(); }
/// <summary> /// Ejecutado al instanciar el MonoBehaviour. /// Recoge referencias del manager y el animator e inicializa el state. /// </summary> private void Awake() { TSM = TitleScreenManager.Instance; anim = GetComponent <Animator>(); state = ConfigPageState.MAIN; }
/// <summary> /// Recoge las referencias de los manager e inicializa el valor del toggle. /// </summary> protected override void InitToggleValue() { GM = GameManager.Instance; TSM = TitleScreenManager.Instance; InitLanguageToggle(); }
/// <summary> /// Ejecutado al instanciar el MonoBehaviour. /// Recoge referencias del Manager y el animator. /// </summary> private void Awake() { TSM = TitleScreenManager.Instance; anim = GetComponent <Animator>(); }