mirror of
https://github.com/TheRavenwoodArts/LunaLightXMG.git
synced 2026-07-31 00:05:02 -07:00
Brought over our player input code from GML into a PlayerInput.cs class.
This commit is contained in:
@@ -23,7 +23,8 @@ namespace LunaLightXMG
|
||||
|
||||
// Test player input and movement with abstracted player class
|
||||
private Player player;
|
||||
|
||||
// Player input
|
||||
private PlayerInput playerInput;
|
||||
// Native retro scale
|
||||
private int retroWidth = 320;
|
||||
private int retroHeight = 180;
|
||||
@@ -40,6 +41,7 @@ namespace LunaLightXMG
|
||||
|
||||
// Test player input and movement with abstracted player class
|
||||
player = new Player();
|
||||
playerInput = new PlayerInput();
|
||||
}
|
||||
|
||||
private void OnClientSizeChanged(object sender, EventArgs eventArgs)
|
||||
@@ -59,6 +61,8 @@ namespace LunaLightXMG
|
||||
graphics.PreferredBackBufferHeight = 1080;
|
||||
graphics.ApplyChanges();
|
||||
|
||||
playerInput.HasControl = true; // Do we need this here?
|
||||
|
||||
base.Initialize();
|
||||
CalculateRenderDestination();
|
||||
}
|
||||
@@ -96,7 +100,8 @@ namespace LunaLightXMG
|
||||
Exit();
|
||||
|
||||
// Test player input and movement with abstracted player class
|
||||
player.Update(gameTime);
|
||||
playerInput.Update();
|
||||
player.Update(gameTime, playerInput);
|
||||
|
||||
base.Update(gameTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user