예제 #1
0
        public static Swarmers InitializeEncounter(GameDatabase gamedb, AssetDatabase assetdb)
        {
            Swarmers swarmers = new Swarmers();

            swarmers.PlayerId = gamedb.InsertPlayer("Swarm", "swarm", new int?(), assetdb.RandomEncounterPrimaryColor, new Vector3(0.0f), "", "\\base\\factions\\swarm\\avatars\\Swarm_Avatar.tga", 0.0, 0, false, false, false, 0, AIDifficulty.Normal);
            foreach (PlayerInfo playerInfo in gamedb.GetStandardPlayerInfos().ToList <PlayerInfo>())
            {
                gamedb.ChangeDiplomacyState(playerInfo.ID, swarmers.PlayerId, DiplomacyState.WAR);
            }
            swarmers.InitDesigns(gamedb);
            return(swarmers);
        }
예제 #2
0
        public static Swarmers ResumeEncounter(GameDatabase gamedb)
        {
            Swarmers   swarmers   = new Swarmers();
            PlayerInfo playerInfo = gamedb.GetPlayerInfos().ToList <PlayerInfo>().FirstOrDefault <PlayerInfo>((Func <PlayerInfo, bool>)(x =>
            {
                if (!x.isStandardPlayer)
                {
                    return(x.Name.Contains("Swarm"));
                }
                return(false);
            }));

            swarmers.PlayerId = playerInfo.ID;
            swarmers.InitDesigns(gamedb);
            return(swarmers);
        }