/// <summary> /// Starts the results state. /// </summary> private void StartResultsState() { if (!Main.Instance.IsSceneInitialized) { return; } m_state = State.RESULTS; Main.Instance.GetFasterUI.Hide(); Main.Instance.GetScoreUI.Hide(); Main.Instance.GetTimerUI.Hide(); Main.Instance.GetPauseUI.Hide(); ResultsSceneMaster resultsScene = (ResultsSceneMaster)Locator.GetSceneMaster(); ResultsUI resultsUI = resultsScene.GetResultsUI; // Check if high score if (m_gameData.HighScore < m_currentScore) { m_gameData.HighScore = m_currentScore; resultsUI.SetWellDoneResults(m_currentScore, m_gameData.HighScore); SaveGameData(); } else { resultsUI.SetTryHarderResults(m_currentScore, m_gameData.HighScore, 0); } // Play the MiniGame BGM Locator.GetSoundManager().PlayMainMenuBGM(); }
public ResultsUI GetResultsUI() { if (this.resultsUI == null) { this.resultsUI = GetComponentInChildren <ResultsUI> (); } return(this.resultsUI); }
// Use this for initialization void Start() { // this.Segment (testTargetDenominator); // this.TargetSetter (testTargetNumerator, testTargetDenominator); // this.PointerPointTo (testCurrentPointerNumerator, testCurrentPointerDenominator); this.resultsUI = GetComponentInChildren <ResultsUI> (); enemyHealth = GetComponentInParent <EnemyHealth> (); currentPointerNumberLine = currentPointerNumberLineObject.GetComponent <CurrentPointerNumberLine> (); // highlightRenderer = pointer.GetComponentInChildren<LineRenderer> (); highlightRenderer.enabled = false; // pauseController = GameObject.FindGameObjectWithTag ("GameController").GetComponent<PauseController> (); cameraZoom = Camera.main.GetComponentInChildren <CameraZoom> (); currentPointerNumberLine.HideSmallerFraction(); // lineRenderer = GetComponent<LineRenderer> (); }
public void ExpandList(int NumToAdd) { for (int x = 1; x < NumToAdd; x++) { CurrentCount++; Image clone = Instantiate(result); clone.transform.SetParent(ResultsUI.GetComponentInChildren <ScrollRect>().content.transform); clone.transform.position = new Vector3(result.transform.position.x, (result.transform.position.y - (120) * CurrentCount), 0); clone.GetComponentInChildren <Text>().text = ProgramList[CurrentCount].Title; clone.GetComponentInChildren <NumHolder>().index = ProgramList[CurrentCount].Index; clones.Add(clone); if (CurrentCount > 4) { Content.sizeDelta = new Vector2(0, Content.rect.height + 120); } } Counter++; }
void Awake() { instance = this; //Sets the RHP values for the first time playerRHP.text = GameData.instance.myCurrentRHP.ToString(); opponentRHP.text = "???"; //If there is no GameInfo already create a new one if (GameInfo.current == null) { Debug.Log("Creating new GameInfo=========================================================================>>>>>>>>> "); GameInfo.current = new GameInfo(); GameData.instance.SetNames(); Debug.Log(GameData.instance.playerOneName); Debug.Log("GameInfo created =========================================================================>>>>>>>>>"); } //Otherwise create a new round after finalising the last one else if (GameInfo.current != null && !MiniGameTracker.instance.fought) { //FUNCTION TO FINALISE ROUNDINFO DATA //SEND OFF ROUNDINFO RoundInfo.current = new RoundInfo(); } }
/// <summary> /// If possible, bind the controls to the data of the currently active context</summary> /// <param name="sender">Sender of event</param> /// <param name="e">Event args</param> private void contextRegistry_ActiveContextChanged(object sender, EventArgs e) { SearchUI.Bind(m_contextRegistry.GetActiveContext <IQueryableContext>()); ResultsUI.Bind(m_contextRegistry.GetActiveContext <IQueryableResultContext>()); ReplaceUI.Bind(m_contextRegistry.GetActiveContext <IQueryableReplaceContext>()); }
public void SetResultsUI(ResultsUI results) { this.resultsUI = results; }