コード例 #1
0
ファイル: GameState.cs プロジェクト: minimalgeek/TapBand
 private GameState()
 {
     currencyState = new CurrencyState();
     merchState = new MerchState();
     concertState = new ConcertState();
     equipmentState = new EquipmentState();
 }
コード例 #2
0
ファイル: GameState.cs プロジェクト: minimalgeek/TapBand
    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();
    }
コード例 #3
0
    void Start()
    {
        concertState = GameState.instance.Concert;

        //first time
        MuteAndPlayAllMusicBars();

        //in the first play it will be 0, but that isn't a boss battle
        if (concertState.LastComplatedSongID != 0)
        {
            //it's the previous song id, need to inc
            actualIndex = CastSongIndex(concertState.LastComplatedSongID +1);
            FadeInMusicBarsUntilIndex(actualIndex);
        }
        else
        {
            FadeInMusicBarsUntilIndex(concertState.LastComplatedSongID);
        }
    }