本文整理汇总了C#中Effect.NameIs方法的典型用法代码示例。如果您正苦于以下问题:C# Effect.NameIs方法的具体用法?C# Effect.NameIs怎么用?C# Effect.NameIs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Effect
的用法示例。
在下文中一共展示了Effect.NameIs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Add
public void Add(string name, float time, object parameter)
{
var query = data.Where(e => e.data.name == name);
if (query.Count() > 0)
{
Effect e = query.Single();
if (e.timeLeft < time) e.timeLeft = time;
}
else
{
Effect e = new Effect(name, time, parameter);
data.Add(e);
if (e.NameIs("True Strike", "Blind", "Fake Death", "Sleeping", "Blindsight", "Mind Tricked", "Mind Controlled"))
B.log.AddLine(t.CommonName + " ", t.LogColor);
if (e.NameIs("Roots"))
{
B.log.AddLine("Multiple roots crawl from the ground and entangle " + t.CommonName + "! ", Color.Pink);
B.log.Add(t.CommonName, t.LogColor);
B.log.Add(" can't move!", Color.Pink);
}
else if (e.NameIs("True Strike")) B.log.Add("feels confident.", Color.Pink);
else if (e.NameIs("Blind")) B.log.Add("can't see anything!", Color.Pink);
else if (e.NameIs("Fake Death")) B.log.Add("looks completely dead.", Color.Pink);
else if (e.NameIs("Sleeping")) B.log.Add("falls asleep.", Color.Pink);
else if (e.NameIs("Blindsight")) B.log.Add("can't see " + (e.parameter as LocalObject).CommonName + " now.", Color.Pink);
else if (e.NameIs("Mind Tricked")) B.log.Add("is now fighting for the wrong party!", Color.Pink);
else if (e.NameIs("Mind Controlled"))
B.log.Add("is now controlled by " + (e.parameter as LocalObject).CommonName + "!", Color.Pink);
}
}