コード例 #1
0
 public Duel(Random random, IEnumerable <Player> players, string retriedDuelId = null)
 {
     RetriedDuelId = retriedDuelId;
     Id            = Guid.NewGuid().ToString();
     Players       = new List <DuelPlayer>();
     AddPlayers(players);
     Level  = new LevelMap();
     Random = random;
     Status = DuelStatus.WaitingForPlayers;
     Level.GenerateRandom(Random);
 }
コード例 #2
0
        public LevelMap Clone()
        {
            var map = new LevelMap {
                Background = new List <BgItem>(), Events = new List <LevelEvent>()
            };

            foreach (var bgItem in Background)
            {
                map.Background.Add(bgItem.Clone());
            }
            foreach (var levelEvent in Events)
            {
                map.Events.Add(levelEvent.Clone());
            }
            return(map);
        }