private void AssignButtons() { _uiButtons.BuyPlotButton.onClick.AddListener(() => { _game.BuyPlot(_plotId); }); _uiButtons.ExtendPlotButton.onClick.AddListener(() => { bool success = _game.ExtendPlot(_plotId); if (success) { Micros.GetAudioMicro().Play(ClipName.BuyClip); } }); _uiButtons.ExtendWarehouseButton.onClick.AddListener(() => { bool success = _game.ExtendWarehouse(_plotId); if (success) { Micros.GetAudioMicro().Play(ClipName.BuyClip); } }); _uiButtons.SellButton.onClick.AddListener(() => { _game.Sell(_plotId); Micros.GetAudioMicro().Play(ClipName.SellClip); }); }
public Garden() { _saveMicro = Micros.GetSaveMicro(); _saveMicro.AddCoins(InitialData.InitialCoins); _plots = InitialData.GetPlotsData(); _saveMicro.SetPlots(_plots); }
private void Start() { Micros.Init(); _saveMicro = Micros.GetSaveMicro(); if (_saveMicro.LoadedSaveGame) { //There is a saved game, let's get it _garden = new Garden(_saveMicro.GetPlots()); } else { //Nope, let's create some data //Garden will take care of this _garden = new Garden(); } InitializePlotViews(); MainUi.UpdateView(); }
public void UpdateView() { double numCoins = Micros.GetSaveMicro().GetCoins(); CoinText.text = "Coins: " + S.CoinStr(numCoins); }
async void Micros_Refreshing(object sender, EventArgs e) { await RefreshMicros(); Micros.EndRefresh(); }
private void OnApplicationQuit() { Micros.GetSaveMicro().Save(); }
public Garden(List <Plot> plots) { _saveMicro = Micros.GetSaveMicro(); _plots = plots; }
public Nutrients(Macros macros, Micros micros) { Macros = macros; Micros = micros; }