示例#1
0
 public void Add(StarbaseCmdDesign design) {
     Player player = design.Player;
     string designName = design.DesignName;
     var designsByName = _starbaseCmdDesignsLookup[player];
     D.Assert(!designsByName.ContainsKey(designName));
     designsByName.Add(designName, design);
     //D.Log("{0} added {1} {2} for {3}.", GetType().Name, design.GetType().Name, designName, player);
 }
 private string MakeAndRecordStarbaseCmdDesign(Player owner, string unitName, int cmsPerCmd, Formation formation) {
     string designName = GetUniqueCmdDesignName();
     var passiveCmStats = _availablePassiveCountermeasureStats.Shuffle().Take(cmsPerCmd);
     UnitCmdStat cmdStat = MakeStarbaseCmdStat(unitName, formation);
     StarbaseCmdDesign design = new StarbaseCmdDesign(owner, designName, passiveCmStats, cmdStat);
     _gameMgr.PlayersDesigns.Add(design);
     return designName;
 }