blob: d9cdd6b2bf04b4ce01dcab0a34a3f1f52c7e4cce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
namespace StardewModdingAPI
{
/// <summary>The input status for a button during an update frame.</summary>
public enum InputStatus
{
/// <summary>The button was neither pressed, held, nor released.</summary>
None,
/// <summary>The button was pressed in this frame.</summary>
Pressed,
/// <summary>The button has been held since the last frame.</summary>
Held,
/// <summary>The button was released in this frame.</summary>
Released
}
/// <summary>Extension methods for <see cref="InputStatus"/>.</summary>
internal static class InputStatusExtensions
{
/// <summary>Whether the button was pressed or held.</summary>
/// <param name="status">The button status.</param>
public static bool IsDown(this InputStatus status)
{
return status == InputStatus.Held || status == InputStatus.Pressed;
}
}
}
|