Skip to content

Commit fc94364

Browse files
review cesarBLG: Changed IsUp/IsDown into IsPressed/IsReleased
1 parent f13aba1 commit fc94364

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Source/RunActivity/Viewer3D/UserInput.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public static bool IsPressed(UserCommand command)
148148
return true;
149149
var setting = InputSettings.Commands[(int)command];
150150
return (setting.IsKeyDown(KeyboardState) && !setting.IsKeyDown(LastKeyboardState)) ||
151-
SwitchPanelModule.IsDown(command);
151+
SwitchPanelModule.IsPressed(command);
152152
}
153153

154154
public static bool IsReleased(UserCommand command)
@@ -158,7 +158,7 @@ public static bool IsReleased(UserCommand command)
158158
return true;
159159
var setting = InputSettings.Commands[(int)command];
160160
return (!setting.IsKeyDown(KeyboardState) && setting.IsKeyDown(LastKeyboardState)) ||
161-
SwitchPanelModule.IsUp(command);
161+
SwitchPanelModule.IsReleased(command);
162162
}
163163

164164
public static bool IsDown(UserCommand command)

Source/RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchPanelModule.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ protected override Task OnMessageReceivedAsync(IWebSocketContext context, byte[]
6565
return Task.CompletedTask;
6666
}
6767

68-
public static bool IsDown(UserCommand userCommand)
68+
public static bool IsPressed(UserCommand userCommand)
6969
{
7070
if ((Connections > 0) && InitDone)
7171
return SwitchesOnPanelStatic.IsPressed(userCommand);
7272
else
7373
return false;
7474
}
7575

76-
public static bool IsUp(UserCommand userCommand)
76+
public static bool IsReleased(UserCommand userCommand)
7777
{
7878
if ((Connections > 0) && InitDone)
7979
return SwitchesOnPanelStatic.IsReleased(userCommand);

0 commit comments

Comments
 (0)