Exemplo n.º 1
0
 public void Add(FleetCmdDesign design) {
     Player player = design.Player;
     string designName = design.DesignName;
     var designsByName = _fleetCmdDesignsLookup[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 MakeAndRecordFleetCmdDesign(Player owner, string unitName, int cmsPerCmd, Formation formation) {
     string designName = GetUniqueCmdDesignName();
     var passiveCmStats = _availablePassiveCountermeasureStats.Shuffle().Take(cmsPerCmd);
     UnitCmdStat cmdStat = MakeFleetCmdStat(unitName, formation);
     FleetCmdDesign design = new FleetCmdDesign(owner, designName, passiveCmStats, cmdStat);
     _gameMgr.PlayersDesigns.Add(design);
     return designName;
 }