void Start() { GameInput.AttachInput( actionClick: OnButtonClickAction, skillClick: OnButtonClickSkill, backClick: OnButtonClickBack, leftClick: OnButtonClickLeft, rightClick: OnButtonClickRight, downClick: OnButtonClickDown, upClick: OnButtonClickUp); // Set the initial page TextArea.text = PAGES[0]; // Update the page's image UpdatePageImage(); // Highlight selected tab SelectTab(); // Show the appropriate help text for the platform if (HelperFunctions.IsRunningOnDesktop()) { HelpTextDesktop.SetActive(true); } else if (HelperFunctions.IsRunningOnPS4()) { HelpTextPS4.SetActive(true); } }
// Use this for initialization void Start() { Debug.Log("GameController.cs"); // Load the current level _dataController = SaveDataController.GetInstance(); _currentLevelNum = _dataController.LoadData().CurrentLevel; LoadLevel(_currentLevelNum); // Stop any music being played SoundController.StopMusic(); // Start the game paused before the countdown _isPaused = true; _updateEveryFrame = UpdateEveryFrame; GameInput.AttachInput( actionClick: OnButtonClickAction, skillClick: OnButtonClickSkill, backClick: OnButtonClickBack, leftClick: OnButtonClickLeft, rightClick: OnButtonClickRight, downClick: OnButtonClickDown, upClick: OnButtonClickUp); // Start the countdown sequence StartCountdown(); }
// Use this for initialization void Start() { // Get all existing scores _data = SaveDataController.GetInstance().LoadData(); // Handle score submit if (SaveDataController.GetInstance().IsSubmitting) { // Hide the high scores HighScores.SetActive(false); // Enable name submission _selectedNameSlot = 0; _slotLetters = new int[NameSlots.Length]; UpdateNameSlots(); // Set the score text ScoreValueText.text = "$ " + SaveDataController.GetInstance().ScoreToSubmit.ToString(); } else { // Hide the name submission Submission.SetActive(false); // Display all the scores UpdateScoreboard(); } // Press any key to return to main menu GameInput.AttachInput( actionClick: OnButtonClickAction, backClick: OnButtonClickBack, leftClick: OnButtonClickLeft, rightClick: OnButtonClickRight, downClick: OnButtonClickDown, upClick: OnButtonClickUp); // Show the appropriate help text for the platform if (HelperFunctions.IsRunningOnDesktop()) { ScoreboardDesktop.SetActive(true); SubmissionDesktop.SetActive(true); } else if (HelperFunctions.IsRunningOnPS4()) { ScoreboardPS4.SetActive(true); SubmissionPS4.SetActive(true); } }
// Use this for initialization void Start() { Debug.Log("MainMenu.cs"); GameInput.AttachInput( actionClick: OnButtonClickAction, skillClick: OnButtonClickSkill, backClick: OnButtonClickBack, leftClick: OnButtonClickLeft, rightClick: OnButtonClickRight, downClick: OnButtonClickDown, upClick: OnButtonClickUp); // Initialize menu options AddMenuOption(PLAY_BUTTON, OnPlayButtonSelect); AddMenuOption(INSTRUCTIONS_BUTTON, OnInstructionsButtonSelect); AddMenuOption(SCOREBOARD_BUTTON, OnScoreboardButtonSelect); SelectDefaultButton(); // Play title music SoundController.PlayMusic(MusicType.Title); // Show the appropriate help text for the platform if (HelperFunctions.IsRunningOnDesktop()) { HelpTextDesktop.SetActive(true); // Add the exit button for desktop AddMenuOption(EXIT_BUTTON, OnExitButtonSelect); } else if (HelperFunctions.IsRunningOnPS4()) { HelpTextPS4.SetActive(true); // Remove the exit button for the PS4 ExitButton.SetActive(false); } // Set play button to read "Continue" if the player is not on the first level GameData data = SaveDataController.GetInstance().LoadData(); if (data.CurrentLevel > 1) { PlayText.text = CONTINUE_TEXT + " (Lv. " + data.CurrentLevel + ")"; } }
// Use this for initialization protected void Start() { GetDataFromController(); SetTextBoxData(); StartCoroutine(StartAnimation()); moneyIncrement = dataController.LevelMoney / 2; totalMoneyValue = data.TotalMoney; currentTotalMoney = data.TotalMoney - dataController.LevelMoney; _totalMoney.text = TOTAL_MONEY_MESSAGE + Mathf.RoundToInt(currentTotalMoney).ToString(); GameInput.AttachInput( actionClick: OnButtonClickAction, backClick: OnButtonClickBack, leftClick: OnButtonClickLeft, rightClick: OnButtonClickRight, downClick: OnButtonClickDown, upClick: OnButtonClickUp); }