Beispiel #1
0
 /// <summary>
 /// 章节结束保存下数据缓存
 /// </summary>
 /// <param name="AfterStartSequence">是否是开始剧情播放完记录的</param>
 public void SaveChapter(int slot, int teamIndex, bool AfterStartSequence, int chapterId, Warehouse ware, List <CharacterInfo> infos)
 {
     //设置存储位置,存储队伍的信息
     currentTeamRecord                  = new ChapterRecordCollection();
     currentTeamRecord.Slot             = slot;
     currentTeamRecord.CurrentTeamIndex = teamIndex;
     //设置队伍数据
     ChapterRecordCollection.TeamCollection teamData = new ChapterRecordCollection.TeamCollection();
     teamData.AfterStartSequence = AfterStartSequence;
     teamData.Chapter            = chapterId;
     teamData.Ware        = ware;
     teamData.PlayersInfo = new PlayerInfoCollection();
     foreach (var v in infos)
     {
         teamData.PlayersInfo.AddContent(v);
     }
     currentTeamRecord.team[teamIndex] = teamData;
     currentTeamRecord.Save();
 }
Beispiel #2
0
    public void SaveBattle(int teamIndex, int chapterId, int mapId, Warehouse ware, List <CharacterInfo> infos, EventInfoCollection eventInfo)
    {
        BattleInfoCollection battleInfo = new BattleInfoCollection();

        battleInfo.Slot             = -1;
        battleInfo.CurrentTeamIndex = teamIndex;
        battleInfo.MapID            = mapId;
        ChapterRecordCollection.TeamCollection teamData = new ChapterRecordCollection.TeamCollection();
        teamData.AfterStartSequence = true;
        teamData.Chapter            = chapterId;
        teamData.Ware        = ware;
        teamData.PlayersInfo = new PlayerInfoCollection();
        foreach (var v in infos)
        {
            teamData.PlayersInfo.AddContent(v);
        }
        battleInfo.team[teamIndex] = teamData;
        battleInfo.Event           = eventInfo;
        battleInfo.Save();
    }