コード例 #1
0
ファイル: Locust.cs プロジェクト: zerk-js/SOTSII-SOS
        public static Locust ResumeEncounter(GameDatabase gamedb)
        {
            Locust     locust     = new Locust();
            PlayerInfo playerInfo = gamedb.GetPlayerInfos().ToList <PlayerInfo>().FirstOrDefault <PlayerInfo>((Func <PlayerInfo, bool>)(x =>
            {
                if (!x.isStandardPlayer)
                {
                    return(x.Name.Contains("Locust Swarm"));
                }
                return(false);
            }));

            locust.PlayerId = playerInfo.ID;
            List <DesignInfo> list = gamedb.GetDesignInfosForPlayer(locust.PlayerId).ToList <DesignInfo>();

            locust._worldShipDesignId  = list.First <DesignInfo>((Func <DesignInfo, bool>)(x => x.DesignSections[0].FilePath.EndsWith("lv_locust_worldship.section"))).ID;
            locust._heraldMoonDesignId = list.First <DesignInfo>((Func <DesignInfo, bool>)(x => x.DesignSections[0].FilePath.EndsWith("dn_locust_heraldmoon.section"))).ID;
            locust._needleShipDesignId = list.First <DesignInfo>((Func <DesignInfo, bool>)(x => x.DesignSections[0].FilePath.EndsWith("locust_needleship.section"))).ID;
            return(locust);
        }
コード例 #2
0
ファイル: Locust.cs プロジェクト: zerk-js/SOTSII-SOS
        public static Locust InitializeEncounter(GameDatabase gamedb, AssetDatabase assetdb)
        {
            Locust locust = new Locust();

            locust.PlayerId = gamedb.InsertPlayer("Locust Swarm", "locusts", new int?(), assetdb.RandomEncounterPrimaryColor, new Vector3(0.0f), "", "\\base\\factions\\locusts\\avatars\\Locusts_Avatar.tga", 0.0, 0, false, false, false, 0, AIDifficulty.Normal);
            DesignInfo design1 = new DesignInfo(locust.PlayerId, "World Ship", new string[1]
            {
                string.Format("factions\\{0}\\sections\\{1}", (object)"locusts", (object)"lv_locust_worldship.section")
            });
            DesignInfo design2 = new DesignInfo(locust.PlayerId, "Herald Moon", new string[1]
            {
                string.Format("factions\\{0}\\sections\\{1}", (object)"locusts", (object)"dn_locust_heraldmoon.section")
            });
            DesignInfo design3 = new DesignInfo(locust.PlayerId, "Needle Ship", new string[1]
            {
                string.Format("factions\\{0}\\sections\\{1}", (object)"locusts", (object)"locust_needleship.section")
            });

            locust._worldShipDesignId  = gamedb.InsertDesignByDesignInfo(design1);
            locust._heraldMoonDesignId = gamedb.InsertDesignByDesignInfo(design2);
            locust._needleShipDesignId = gamedb.InsertDesignByDesignInfo(design3);
            return(locust);
        }
コード例 #3
0
ファイル: Locust.cs プロジェクト: zerk-js/SOTSII-SOS
 public static Matrix GetBaseEnemyFleetTrans(App app, int systemID)
 {
     return(Locust.GetSpawnTransform(app, systemID));
 }