Exemplo n.º 1
0
    public Story Variant() //变换关卡
    {
        SortedDictionary <int, BuildInfo> newPlayerBuildInfos = CloneVariantUtils.SortedDictionary(PlayerBuildInfos);

        foreach (KeyValuePair <int, BuildInfo> kv in newPlayerBuildInfos)
        {
            kv.Value.BuildID = kv.Key;
        }

        SortedDictionary <int, Chapter> newChapters = CloneVariantUtils.SortedDictionary(Chapters, CloneVariantUtils.OperationType.Variant);

        foreach (KeyValuePair <int, Chapter> kv in newChapters)
        {
            kv.Value.ChapterID = kv.Key;
        }

        SortedDictionary <int, bool> cardUnlockInfos = CloneVariantUtils.SortedDictionary(CardUnlockInfos);

        Story newStory = new Story(
            StoryName,
            newChapters,
            newPlayerBuildInfos,
            cardUnlockInfos,
            StoryGamePlaySettings.Clone(),
            0
            );

        return(newStory);
    }
Exemplo n.º 2
0
 public BuildInfo Clone()
 {
     return(new BuildInfo(GenerateBuildID(), BuildName, M_BuildCards.Clone(), DrawCardNum, Life, Energy, BeginMetal, GamePlaySettings?.Clone()));
 }