本文整理汇总了C#中GameStateManagement.InputState.IsScrollLeft方法的典型用法代码示例。如果您正苦于以下问题:C# InputState.IsScrollLeft方法的具体用法?C# InputState.IsScrollLeft怎么用?C# InputState.IsScrollLeft使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameStateManagement.InputState
的用法示例。
在下文中一共展示了InputState.IsScrollLeft方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleGameplayInputButtons
private bool HandleGameplayInputButtons(InputState input, Player cP)
{
PlayerIndex output;
if (input.IsSelect(cP.PI, out output))
{
if (cP.selected == false && cP.hover.getOwner() == cP && cP.hover.canAddMove())
{
cP.selected = true;
cP.origin = cP.hover;
}
else if (cP.selected == true)
{
cP.selected = false;
if (cP.target == Player.Tgt.Self && cP.hover != cP.origin && cP.origin.canAddMove())
{
//cP.origin.transfer(cP.dest);
cP.dest = cP.hover;
movements.Add(new Movement(cP, cP.origin, cP.dest, Movement.Type.Transfer));
}
if (cP.target == Player.Tgt.Enemy && cP.origin.canAddMove())
{
//cP.origin.attack(cP.dest);
cP.dest = cP.hover;
movements.Add(new Movement(cP, cP.origin, cP.dest, Movement.Type.Attack));
}
}
}
else if (input.IsMenuCancel(cP.PI, out output))
{
if (cP.selected == true)
{
cP.selected = false;
}
else
{
cP.hover.cancelOutgoing = true;
pruneMovements();
}
}
else if (input.IsScrollLeft(cP.PI))
{
cP.decPower();
}
else if (input.IsScrollRight(cP.PI))
{
cP.incPower();
}
else if (input.IsUsePower(cP.PI))
{
if (cP.usePower())
{
if (cP.curPower == Player.Power.Transfer)
transfer(cP);
else if (cP.curPower == Player.Power.Reinforce)
reinforce(cP);
else if (cP.curPower == Player.Power.Invincible)
invincible(cP);
else if (cP.curPower == Player.Power.Defect)
defect(cP, cP.hover);
}
}
else
{
return false;
}
return true;
}