本文整理汇总了C#中Input.ButtonJustPressed方法的典型用法代码示例。如果您正苦于以下问题:C# Input.ButtonJustPressed方法的具体用法?C# Input.ButtonJustPressed怎么用?C# Input.ButtonJustPressed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Input
的用法示例。
在下文中一共展示了Input.ButtonJustPressed方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnProcessInput
// OnProcessInput
protected override void OnProcessInput(Input input)
{
if (input.ButtonJustPressed((int)E_UiButton.Start) || input.ButtonJustPressed((int)E_UiButton.A))
{
_G.UI.MM_FromStartScreen = true;
_UI.PrimaryPad = input.Controller.PadIndex;
_UI.Screen.SetNextScreen(new Screen_MainMenu());
}
}
示例2: OnProcessInput
// OnProcessInput
protected override void OnProcessInput(Input input)
{
if (input.ButtonJustPressed((int)E_UiButton.A)) {
if (Menu.GetByValue() == 0) {
NugettaHandler connection = MyNugettaHandler.getInstance();
connection.FindGames((GetGamesResponse response) => {
List<NGame> list = response.getGames();
_UI.Screen.AddScreen(new JoinGame(list));
});
//_UI.Screen.AddScreen(new Screen_Popup(E_PopupType.NewGame));
}
else
if (Menu.GetByValue() == 1) {
_UI.Screen.SetNextScreen(null);
}
else
if (Menu.GetByValue() == 2) {
_UI.Screen.SetNextScreen(new Screen_Options());
}
else
if (Menu.GetByValue() == 3) {
_UI.Screen.AddScreen(new Screen_Popup(E_PopupType.Quit));
}
}
else
if (input.ButtonJustPressed((int)E_UiButton.B)) {
SetScreenTimers(0.0f, 0.5f);
_G.UI.SS_FromMainMenu = true;
_UI.Screen.SetNextScreen(new Screen_Start());
}
}
示例3: OnProcessInput
// OnProcessInput
protected override void OnProcessInput(Input input)
{
if (LeftBar.ChildrenWidget.Count > 0)
{
if (input.ButtonJustPressed((int)E_UiButton.Down))
{
LeftBar.IncreaseCurrent();
}
else if (input.ButtonJustPressed((int)E_UiButton.Up))
{
LeftBar.DecreaseCurrent();
}
}
if (RightBar.ChildrenWidget.Count > 0)
{
if (input.ButtonJustPressed((int)E_UiButton.Back))
{
RightBar.DecreaseCurrent();
}
else if (input.ButtonJustPressed((int)E_UiButton.Enter))
{
RightBar.IncreaseCurrent();
}
}
}
示例4: OnProcessInput
// OnProcessInput
protected override void OnProcessInput(Input input)
{
if (input.ButtonJustPressed((int)E_UiButton.A)) {
int index = Menu.GetByValue();
Controller c = MyController.getInstance();
c.JoinGame(games[index].getId());
_UI.Screen.SetNextScreen(null);
}
else
if (input.ButtonJustPressed((int)E_UiButton.B)) {
SetScreenTimers(0.0f, 0.5f);
_G.UI.SS_FromMainMenu = true;
_UI.Screen.SetNextScreen(new Screen_Start());
}
}
示例5: OnProcessInput
// OnProcessInput
protected override void OnProcessInput( Input input )
{
if ( input.ButtonJustPressed( (int)E_UiButton.A ) )
{
_UI.Screen.AddMessage( (int)E_UiMessageType.PopupConfirm, (int)Type );
_UI.Screen.SetNextScreen( null );
}
else
if ( input.ButtonJustPressed( (int)E_UiButton.B ) )
{
_UI.Screen.AddMessage( (int)E_UiMessageType.PopupCancel, (int)Type );
_UI.Screen.SetNextScreen( null );
}
}
示例6: DebugUpdate
// DebugUpdate
public void DebugUpdate( float frameTime, Input input )
{
if ( !d_Camera2dDebug )
return;
if ( input.ButtonJustPressed( (int)E_UiButton.LeftStick ) )
Reset();
else
{
float amount = d_Camera2dOffsetSpeed * frameTime;
Offset.X -= amount * input.AxisValue( (int)E_UiAxis.LeftStickX );
Offset.Y += amount * input.AxisValue( (int)E_UiAxis.LeftStickY );
amount = d_Camera2dScaleSpeed * frameTime;
Scale.X -= amount * input.ButtonValue( (int)E_UiButton.LeftTrigger );
Scale.X += amount * input.ButtonValue( (int)E_UiButton.RightTrigger );
if ( Scale.X < 0.0f )
Scale.X = 0.0f;
Scale.Y = Scale.X;
}
UpdateTransformMatrix();
}
示例7: OnProcessInput
// OnProcessInput
protected override void OnProcessInput( Input input )
{
if ( input.ButtonJustPressed( (int)E_UiButton.B ) )
_UI.Screen.SetNextScreen( new Screen_MainMenu() );
}
示例8: OnProcessInput
// OnProcessInput
protected override void OnProcessInput( Input input )
{
if ( Mode == 1 )
{
float delay = _UI.AutoRepeatDelay;
float repeat = _UI.AutoRepeatRepeat;
int oldSelection = CurrentSelectionLevel;
if ( input.ButtonJustPressed( (int)E_UiButton.A ) )
{
_UI.Screen.SetNextScreen( new Screen_Loading() );
}
else
if ( input.ButtonAutoRepeat( (int)E_UiButton.Up, delay, repeat ) )
{
if ( CurrentSelectionLevel > 3 )
CurrentSelectionLevel -= 4;
}
else
if ( input.ButtonAutoRepeat( (int)E_UiButton.Down, delay, repeat ) )
{
if ( CurrentSelectionLevel < 12 )
CurrentSelectionLevel += 4;
}
else
if ( input.ButtonAutoRepeat( (int)E_UiButton.Left, delay, repeat ) )
{
if ( ( CurrentSelectionLevel % 4 ) != 0 )
--CurrentSelectionLevel;
}
else
if ( input.ButtonAutoRepeat( (int)E_UiButton.Right, delay, repeat ) )
{
if ( ( CurrentSelectionLevel % 4 ) != 3 )
++CurrentSelectionLevel;
}
if ( oldSelection != CurrentSelectionLevel )
{
LevelNodes[ CurrentSelectionWorld ][ oldSelection ].TimelineActive( "select_level", false, true );
LevelNodes[ CurrentSelectionWorld ][ CurrentSelectionLevel ].TimelineActive( "select_level", true, true );
}
}
if ( input.ButtonJustPressed( (int)E_UiButton.A ) )
{
if ( Mode == 0 )
{
Mode = 1;
Menu.Selected( false );
MenuNodes[ CurrentSelectionWorld ].TimelineActive( "select_world", true, true );
LevelNodes[ CurrentSelectionWorld ][ CurrentSelectionLevel ].TimelineActive( "select_level", true, true );
}
}
else
if ( input.ButtonJustPressed( (int)E_UiButton.B ) )
{
if ( Mode == 1 )
{
Mode = 0;
Menu.Selected( true );
MenuNodes[ CurrentSelectionWorld ].TimelineActive( "select_world", false, true );
LevelNodes[ CurrentSelectionWorld ][ CurrentSelectionLevel ].TimelineActive( "select_level", false, true );
}
else
{
Backgrounds[ CurrentBackground ].Selected( false, false, true );
_G.UI.MM_FromLevelSelect = true;
_UI.Screen.SetNextScreen( new Screen_MainMenu() );
}
}
}
示例9: OnProcessInput
// OnProcessInput
protected override void OnProcessInput( Input input )
{
if ( input.ButtonJustPressed( (int)E_UiButton.A ) )
{
if ( Menu.GetByValue() == 0 )
{
_UI.Screen.AddScreen( new Screen_Popup( E_PopupType.NewGame ) );
}
else
if ( Menu.GetByValue() == 1 )
{
Logo.TimelineActive( "end_fade", true, false );
_UI.Screen.SetNextScreen( new Screen_LevelSelect() );
}
else
if ( Menu.GetByValue() == 2 )
{
_UI.Screen.SetNextScreen( new Screen_Options() );
}
else
if ( Menu.GetByValue() == 3 )
{
_UI.Screen.AddScreen( new Screen_Popup( E_PopupType.Quit ) );
}
}
else
if ( input.ButtonJustPressed( (int)E_UiButton.B ) )
{
SetScreenTimers( 0.0f, 0.5f );
Logo.TimelineActive( "end_move", true, false );
_G.UI.SS_FromMainMenu = true;
_UI.Screen.SetNextScreen( new Screen_Start() );
}
}