コード例 #1
0
        public RiotSpawnSaveData GetSaveData()
        {
            RiotSpawnSaveData data = new RiotSpawnSaveData();

            data.allAtRally = allPresentAtRally;
            foreach (Villager vil in rioters)
            {
                data.rioterGuids.Add(vil.guid);
            }
            foreach (Villager vil in riotersAtRally)
            {
                data.riotersAtRallyGuids.Add(vil.guid);
            }
            data.rallyPointPos = this.rallyPos;
            return(data);
        }
コード例 #2
0
        public RiotSpawn(RiotSpawnSaveData data)
        {
            this.rioters.Clear();
            foreach (Guid guid in data.rioterGuids)
            {
                this.rioters.Add(Player.inst.GetWorker(guid));
            }

            this.riotersAtRally.Clear();
            foreach (Guid guid in data.riotersAtRallyGuids)
            {
                this.riotersAtRally.Add(Player.inst.GetWorker(guid));
            }

            allPresentAtRally = data.allAtRally;

            SetRallyPoint(World.inst.GetCellData(data.rallyPointPos));
        }