public void SaveGame() { if (HexagonalGrid.Instance == null) { return; } needLoad = true; HexagonalCell[] cells = HexagonalGrid.Instance.GetAllCells(); int lenght = cells.Length; SaveInfo.Cards = new Cards.CardData[lenght]; for (int i = 0; i < lenght; i++) { SaveInfo.Cards[i] = cells[i].GetCard().Info; } HudUI score = FindObjectOfType <HudUI>(); SaveInfo.Score = score.GetScore(); SaveInfo.Turn = score.GetTurn(); SaveInfo.untilClosed = ManagerClosedCard.Instance.currentProgress; string obj = JsonUtility.ToJson(SaveInfo); PlayerPrefs.SetString("load", obj); }
// Use this for initialization void Start() { if (Instance == null) { Instance = this; } score = FindObjectOfType <HudUI>(); StartCoroutine("FlashCombinationAlternately"); }
void Awake() { songController = (SongController)FindObjectOfType (typeof(SongController)); concertController = (ConcertController)FindObjectOfType (typeof(ConcertController)); tourController = (TourController)FindObjectOfType(typeof(TourController)); merchController = (MerchController)FindObjectOfType(typeof(MerchController)); equipmentController = (EquipmentController)FindObjectOfType(typeof(EquipmentController)); hudUI = (HudUI)FindObjectOfType(typeof(HudUI)); currencyState = GameState.instance.Currency; }
// Use this for initialization void Start() { if (Instance == null) { Instance = this; } hudUI = FindObjectOfType <HudUI>(); if (LoadManager.Instance.needLoad) { currentProgress = LoadManager.Instance.SaveInfo.untilClosed; } hudUI.SetTextClosedCard(currentProgress); }
// Use this for initialization void Start() { SoundManager.Instance.PlayMixStart(); turnBack = FindObjectOfType <TurnBack>(); hud = FindObjectOfType <HudUI>(); myTransform = transform; startPos = transform.position; myCard = GetComponent <Card>(); if (LoadManager.Instance.needLoad) { Invoke("LoadNewCard", .01f); } else { Invoke("CreateNewCard", .01f); } }
void Awake() { hud = (HudUI)FindObjectOfType(typeof(HudUI)); restart = (RestartUI)FindObjectOfType(typeof(RestartUI)); }
void SetupHud() { switch (GameMode) { case FlightMode.TimeTrial: _hudUI = (GameObject)Instantiate(Globals.UI_Hud_TimeTrial); break; case FlightMode.Race: break; case FlightMode.Infinite: break; case FlightMode.Test: break; } _hud = _hudUI.GetComponent<HudUI>(); if (Globals.FlightController.GetAxisInput().GetUIPrefab() != null) { Debug.Log("Instantiating Flight UI"); _flightUI = (GameObject)Instantiate(Globals.FlightController.GetAxisInput().GetUIPrefab()); Globals.FlightController.GetAxisInput().SetUI(_flightUI); } }
void DestroyLevel() { // Kill ui if (_hudUI != null) { DestroyObject(_hudUI); _hudUI = null; _hud = null; } if(_flightUI != null) { DestroyObject(_flightUI); _flightUI = null; } _finishLine = null; _obstacles.Clear(); }
void Awake() { restart = FindObjectOfType<RestartUI>(); hud = FindObjectOfType<HudUI>(); }
void Awake() { hudUI = (HudUI)FindObjectOfType(typeof(HudUI)); tapController = (TapController)FindObjectOfType(typeof(TapController)); tourController = (TourController)FindObjectOfType(typeof(TourController)); }
void Awake() { hud = (HudUI)FindObjectOfType (typeof(HudUI)); songController = (SongController)FindObjectOfType(typeof(SongController)); tourController = (TourController)FindObjectOfType(typeof(TourController)); }
protected void Awake() { _instance = this; }