more readability fixed via Visual Studio suggestions
GitOrigin-RevId: 330f13485cee32f3a069442bad69c57911a0a34c
This commit is contained in:
parent
4b14aef1b5
commit
84fa044675
@ -20,7 +20,7 @@ namespace SemiColinGames {
|
||||
int dy = -Math.Abs(y2 - y1);
|
||||
int stepY = y1 < y2 ? 1 : -1;
|
||||
int error = dx + dy;
|
||||
int errorXY = 0; // Error value e_xy from the PDF.
|
||||
int errorXY; // Error value e_xy from the PDF.
|
||||
// The size of the output is the size of the longer dimension, plus one.
|
||||
int resultSize = Math.Max(dx, -dy) + 1;
|
||||
var result = new Point[resultSize];
|
||||
|
@ -104,11 +104,12 @@ namespace SemiColinGames {
|
||||
pose = Pose.Standing;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Returns the desired (dx, dy) for the player to move this frame.
|
||||
Vector2 HandleInput(float modelTime, History<Input> input) {
|
||||
Vector2 result = new Vector2();
|
||||
result.X = (int) (input[0].Motion.X * moveSpeed * modelTime);
|
||||
Vector2 result = new Vector2() {
|
||||
X = (int) (input[0].Motion.X * moveSpeed * modelTime)
|
||||
};
|
||||
|
||||
if (input[0].Jump && !input[1].Jump && jumps > 0) {
|
||||
jumpTime = 0.3;
|
||||
|
@ -27,8 +27,9 @@ namespace SemiColinGames {
|
||||
readonly Camera camera = new Camera();
|
||||
|
||||
public SneakGame() {
|
||||
graphics = new GraphicsDeviceManager(this);
|
||||
graphics.SynchronizeWithVerticalRetrace = false;
|
||||
graphics = new GraphicsDeviceManager(this) {
|
||||
SynchronizeWithVerticalRetrace = false
|
||||
};
|
||||
IsFixedTimeStep = true;
|
||||
TargetElapsedTime = TimeSpan.FromSeconds(1.0 / 60);
|
||||
IsMouseVisible = true;
|
||||
@ -107,7 +108,7 @@ namespace SemiColinGames {
|
||||
string fpsText = $"{GraphicsDevice.Viewport.Width}x{GraphicsDevice.Viewport.Height}, " +
|
||||
$"{fpsCounter.Fps} FPS";
|
||||
if (paused) {
|
||||
fpsText = fpsText + " (paused)";
|
||||
fpsText += " (paused)";
|
||||
}
|
||||
|
||||
Debug.SetFpsText(fpsText);
|
||||
|
Loading…
Reference in New Issue
Block a user