本文整理汇总了C#中Fighter.Slide方法的典型用法代码示例。如果您正苦于以下问题:C# Fighter.Slide方法的具体用法?C# Fighter.Slide怎么用?C# Fighter.Slide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fighter
的用法示例。
在下文中一共展示了Fighter.Slide方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BePulled
public static void BePulled(Fighter fighter, SpellLevelRecord level, ExtendedSpellEffect effect, List<Fighter> affecteds, short castcellid)
{
foreach (var target in affecteds)
{
var direction = ShapesProvider.GetDirectionFromTwoCells(target.CellId, fighter.CellId);
List<short> line = ShapesProvider.GetLineFromDirection(target.CellId, (byte)effect.BaseEffect.DiceNum, direction);
List<short> cells = fighter.Fight.BreakAtFirstObstacles(line);
cells.Reverse();
if (cells.Count > 0)
{
fighter.Slide(fighter.ContextualId, cells);
}
}
}
示例2: PushCaster
public static void PushCaster(Fighter fighter, SpellLevelRecord level, ExtendedSpellEffect effect, List<Fighter> affecteds, short castcellid)
{
foreach (var target in affecteds)
{
List<short> line = ShapesProvider.GetLineFromOposedDirection(target.CellId, (byte)(effect.BaseEffect.DiceNum + 1), ShapesProvider.GetDirectionFromTwoCells(fighter.CellId, target.CellId));
List<short> cells = new List<short>();
foreach (var cell in line)
{
if (!fighter.Fight.IsObstacle(cell) || cell == fighter.CellId)
cells.Add(cell);
else
break;
}
if (cells.Count > 0)
{
fighter.Slide(fighter.ContextualId, cells);
}
}
}