本文整理汇总了C#中SNOPower.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# SNOPower.ToString方法的具体用法?C# SNOPower.ToString怎么用?C# SNOPower.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SNOPower
的用法示例。
在下文中一共展示了SNOPower.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Cast
/// <summary>
/// Casts the specified power.
/// </summary>
/// <param name="power">The sno power.</param>
/// <param name="positionRetriver">The position retriver.</param>
/// <param name="levelAreaRetriever">The level area retriever.</param>
/// <param name="extraCondition">The extra condition if any.</param>
/// <param name="onUnit">The target acd GUID retriever.</param>
/// <returns>
/// <c>RunStatus.Success</c> if successful, otherwise <c>RunStatus.Failure</c>.
/// </returns>
/// <remarks>Created 2012-04-09</remarks>
public static Composite Cast(SNOPower power, ValueRetriever<Vector3> positionRetriver, ValueRetriever<int> levelAreaRetriever, ValueRetriever<int> onUnit, ValueRetriever<bool> extraCondition)
{
return new Decorator(ret =>
{
bool canCast = PowerManager.CanCast(power);
bool minReqs = extraCondition != null ? extraCondition(ret) : true;
return minReqs && canCast;
},
new Action(ctx =>
{
Vector3 position = positionRetriver != null ? positionRetriver(ctx) : Vector3.Zero;
int worldId = levelAreaRetriever != null ? levelAreaRetriever(ctx) : 0;
int acdGuid = onUnit != null ? onUnit(ctx) : -1;
ZetaDia.Me.UsePower(power, position, worldId, acdGuid);
Logger.WriteVerbose("Using power: {0}", power.ToString());
})
);
}
示例2: SetSNOPowerUseDelay
public static void SetSNOPowerUseDelay(SNOPower power, double delay)
{
string key = "SpellDelay." + power.ToString();
TVar v = V.Data[key];
bool hasDefaultValue = v.Value == v.DefaultValue;
if (hasDefaultValue)
{
// Create a new TVar (changes the default value)
V.Set(new TVar(v.Name, delay, v.Description));
}
}
示例3: GetBuffUIElements
/// <summary>
/// Finds the buff UIElement for a SnoPower
/// </summary>
public List<UIElement> GetBuffUIElements(SNOPower snoPower)
{
var container = UIElement.FromName("Root.NormalLayer.buffs_backgroundScreen");
var elements = UIElement.GetChildren(container);
return elements.Where(element => element.Name.Contains(snoPower.ToString())).ToList();
}
示例4: SetSNOPowerUseDelay
public static void SetSNOPowerUseDelay(SNOPower power, double delay)
{
string key = "SpellDelay." + power.ToString();
if (!V.Data.ContainsKey(key))
{
Logger.LogDebug("Failed to Set TVar {0} - key doesnt exist");
return;
}
TVar v = V.Data[key];
bool hasDefaultValue = v.Value == v.DefaultValue;
if (hasDefaultValue)
{
// Create a new TVar (changes the default value)
V.Set(new TVar(v.Name, delay, v.Description));
}
}