本文整理汇总了C#中Springie.Client.TasClient.UpdateBattleDetails方法的典型用法代码示例。如果您正苦于以下问题:C# TasClient.UpdateBattleDetails方法的具体用法?C# TasClient.UpdateBattleDetails怎么用?C# TasClient.UpdateBattleDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Springie.Client.TasClient
的用法示例。
在下文中一共展示了TasClient.UpdateBattleDetails方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Apply
public void Apply(TasClient tas, Ladder ladder)
{
var b = tas.GetBattle();
if (b == null) return;
var d = b.Details;
int mint, maxt;
if (ladder != null) d = ladder.CheckBattleDetails(d, out mint, out maxt);
tas.UpdateBattleDetails(d);
if (enableAllUnits) tas.EnableAllUnits();
if (disabledUnits.Length > 0) tas.DisableUnits(UnitInfo.ToStringList(disabledUnits));
foreach (var s in perform) tas.Say(TasClient.SayPlace.Battle, "", s, false);
}
示例2: Apply
public void Apply(TasClient tas, Ladder ladder)
{
Battle b = tas.GetBattle();
if (b == null) return;
BattleDetails d = b.Details;
if (startingMetal.HasValue) d.StartingMetal = startingMetal.Value;
if (startingEnergy.HasValue) d.StartingEnergy = startingEnergy.Value;
if (maxUnits.HasValue) d.MaxUnits = maxUnits.Value;
if (startPos.HasValue) d.StartPos = startPos.Value;
if (endCondition.HasValue) d.EndCondition = endCondition.Value;
if (limitDgun.HasValue) d.LimitDgun = limitDgun.Value;
if (diminishingMM.HasValue) d.DiminishingMM = diminishingMM.Value;
if (ghostedBuildings.HasValue) d.GhostedBuildings = ghostedBuildings.Value;
d.Validate();
int mint, maxt;
if (ladder != null) d = ladder.CheckBattleDetails(d, out mint, out maxt);
tas.UpdateBattleDetails(d);
if (enableAllUnits) tas.EnableAllUnits();
if (disabledUnits.Length > 0) tas.DisableUnits(UnitInfo.ToStringList(disabledUnits));
foreach (string s in perform) tas.Say(TasClient.SayPlace.Battle, "", s, false);
}
示例3: Apply
public void Apply(TasClient tas)
{
Battle b = tas.GetBattle();
if (b == null) return;
BattleDetails d = b.Details;
if (startingMetal.HasValue) d.StartingMetal = startingMetal.Value;
if (startingEnergy.HasValue) d.StartingEnergy = startingEnergy.Value;
if (maxUnits.HasValue) d.MaxUnits = maxUnits.Value;
if (startPos.HasValue) d.StartPos = startPos.Value;
if (endCondition.HasValue) d.EndCondition = endCondition.Value;
if (limitDgun.HasValue) d.LimitDgun = limitDgun.Value;
if (diminishingMM.HasValue) d.DiminishingMM = diminishingMM.Value;
if (ghostedBuildings.HasValue) d.GhostedBuildings = ghostedBuildings.Value;
d.Validate();
tas.UpdateBattleDetails(d);
if (enableAllUnits) tas.EnableAllUnits();
if (disabledUnits.Length > 0) {
tas.DisableUnits(UnitInfo.ToStringList(disabledUnits));
}
}