本文整理汇总了C#中GameObjects.Faction.HasTechnique方法的典型用法代码示例。如果您正苦于以下问题:C# Faction.HasTechnique方法的具体用法?C# Faction.HasTechnique怎么用?C# Faction.HasTechnique使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameObjects.Faction
的用法示例。
在下文中一共展示了Faction.HasTechnique方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckConditionKind
public override bool CheckConditionKind(Faction faction)
{
return !faction.HasTechnique(val);
}
示例2: SetFaction
internal void SetFaction(Faction faction, bool control)
{
this.ShowingFaction = faction;
this.Control = control;
foreach (LabelText text in this.LabelTexts)
{
text.Text.Text = StaticMethods.GetPropertyValue(this, text.PropertyName).ToString();
}
this.AllTechniques.Clear();
Dictionary<Microsoft.Xna.Framework.Point, Technique> showTechniques = new Dictionary<Microsoft.Xna.Framework.Point, Technique>();
foreach (Technique technique in faction.Scenario.GameCommonData.AllTechniques.Techniques.Values)
{
Microsoft.Xna.Framework.Point p = new Microsoft.Xna.Framework.Point(technique.DisplayRow, technique.DisplayCol);
try
{
Technique existTech = showTechniques[p];
if (technique.PreID < 0)
{
showTechniques[p] = technique;
}
else if (technique.PreID == existTech.ID && faction.HasTechnique(existTech.ID))
{
showTechniques[p] = technique;
}
}
catch (KeyNotFoundException ex)
{
showTechniques[p] = technique;
}
}
foreach (Technique technique in showTechniques.Values)
{
TechniqueItem item = new TechniqueItem {
LinkedTechnique = technique,
Text = new FreeText(this.graphicsDevice, this.ButtonTextFont, this.ButtonTextColor)
};
item.Text.Position = new Microsoft.Xna.Framework.Rectangle(this.ButtonSize.X * item.Col, this.ButtonSize.Y * item.Row, this.ButtonSize.X, this.ButtonSize.Y);
item.Text.Align = this.ButtonTextAlign;
item.Text.Text = technique.Name;
this.AllTechniques.Add(item);
}
}