private void OnReturnButtonClick() { UIStateController.SetUIState("Close", () => { if (EventOnReturnButtonClick != null) { EventOnReturnButtonClick(); } }); }
// Use this for initialization void Start () { // Start singleton pattern Instance = this; // Activate first menu. currentMenu = waiting; currentState = MenuState.WAITING; currentMenu.SetActive(true); characterName.text = ""; combat = battleController.GetComponent<TurnBasedCombat>(); }
private void Awake() { Instance = this; gameOver = false; gameParse = false; controlDirty = false; starNum = 0; gamingPanel = GameObject.Find("GamingPanel"); gameOverPanel = GameObject.Find("GameOverPanel"); parsePanel = GameObject.Find("ParsePanel"); GamePass = GameObject.Find("GamePass"); GamingState(); }
protected sealed override IEnumerator HideSelfProcedure() { Rect panelRect = UIStateController.GetUICanvasRect(); iTween.ValueTo(gameObject, iTween.Hash( "from", new Vector2(0, 0), "to", new Vector2(panelRect.width, 0), "time", transitionTime, "easetype", transitionEaseType, "onupdate", "wheniTweenUpdateUpdateSelfPosition", "onupdatetarget", gameObject)); yield return(new WaitForSeconds(transitionTime)); }
protected sealed override IEnumerator ShowSelfProcedure() { DataProcessTool.Instance.GetLocation <BusStop>(ExploreKuStateSaver.selectedId, RefreshInformation); Rect panelRect = UIStateController.GetUICanvasRect(); iTween.ValueTo(gameObject, iTween.Hash( "from", new Vector2(panelRect.width, 0), "to", new Vector2(0, 0), "time", transitionTime, "easetype", transitionEaseType, "onupdate", "wheniTweenUpdateUpdateSelfPosition", "onupdatetarget", gameObject)); yield return(new WaitForSeconds(transitionTime)); }
protected sealed override IEnumerator ShowSelfProcedure() { DataProcessTool.Instance.GetLocationsByKeyword(ExploreKuStateSaver.currentLocation, 1, ExploreKuStateSaver.listViewDisplayType, SortType.distance, 20, "", RefreshListContent); titleText.text = ExploreKuStateSaver.listViewDisplayType.ToString(); Rect panelRect = UIStateController.GetUICanvasRect(); iTween.ValueTo(gameObject, iTween.Hash( "from", new Vector2(panelRect.width, 0), "to", new Vector2(0, 0), "time", transitionTime, "easetype", transitionEaseType, "onupdate", "wheniTweenUpdateUpdateSelfPosition", "onupdatetarget", gameObject)); yield return(new WaitForSeconds(transitionTime)); }
public void SetUIState(int p1Index, int p2Index) { if (m_index == p1Index && m_index == p2Index) { UIStateController.SetUIState("Both"); } else { if (m_index == p1Index) { UIStateController.SetUIState("P1"); } else if (m_index == p2Index) { UIStateController.SetUIState("P2"); } else { UIStateController.SetUIState("None"); } } }
protected sealed override IEnumerator ShowSelfProcedure() { focusedBusStop = ExploreKuStateSaver.selectedBusStop; focusedScheduleName = ExploreKuStateSaver.selectedScheduleName; focusedRouteName = ExploreKuStateSaver.selectedRouteName; titleText.text = string.Format("Next Arrivals"); nextBusesText.text = BuildNextBusString(); buttonText.text = string.Format(buttonDescriptionTemplate, focusedRouteName); Rect panelRect = UIStateController.GetUICanvasRect(); iTween.ValueTo(gameObject, iTween.Hash( "from", new Vector2(panelRect.width, 0), "to", new Vector2(0, 0), "time", transitionTime, "easetype", transitionEaseType, "onupdate", "wheniTweenUpdateUpdateSelfPosition", "onupdatetarget", gameObject)); yield return(new WaitForSeconds(transitionTime)); }
public void ShowOpenTween() { UIStateController.SetUIState("Open"); }