private GameState() { currencyState = new CurrencyState(); merchState = new MerchState(); concertState = new ConcertState(); equipmentState = new EquipmentState(); }
protected override void LoadData(MemoryStream ms) { IFormatter formatter = new BinaryFormatter(); GameState gd = (GameState)formatter.Deserialize(ms); this.currencyState = gd.currencyState == null ? new CurrencyState() : gd.currencyState; this.merchState = gd.merchState == null ? new MerchState() : gd.merchState; this.concertState = gd.concertState == null ? new ConcertState() : gd.concertState; this.equipmentState = gd.equipmentState == null ? new EquipmentState() : gd.equipmentState; this.currencyState.SynchronizeRealCurrencyAndScreenCurrency(); }
public void OnCollectPressed(MerchState state) { merchController.OnCollect(state); }