diff --git a/Tiles/Game.cs b/Tiles/Game.cs index 02a0fee..3c784ac 100644 --- a/Tiles/Game.cs +++ b/Tiles/Game.cs @@ -74,16 +74,25 @@ public class Game if (Raylib.IsKeyDown(KeyboardKey.S)) _playerPosition += new Vector2(0, 1) * _playerSpeed; if (Raylib.IsKeyDown(KeyboardKey.D)) _playerPosition += new Vector2(1, 0) * _playerSpeed; - // if (Raylib.IsKeyReleased(KeyboardKey.Right)) - // { - // _currentSelectedIndex = (_currentSelectedIndex + 1) % _tiles.Count; - // _currentSelectedTile = _tiles.Keys.ElementAt(_currentSelectedIndex); - // } - // if (Raylib.IsKeyReleased(KeyboardKey.Left)) - // { - // _currentSelectedIndex = (_currentSelectedIndex - 1 + _tileIdToTile.Count) % _tileIdToTile.Count; - // _currentSelectedTile = _tiles.Keys.ElementAt(_currentSelectedIndex); - // } + if (Raylib.IsKeyReleased(KeyboardKey.Right)) + { + _currentSelectedIndex = (_currentSelectedIndex + 1) % _tileNameToId.Count; + if (_currentSelectedIndex == 0) + { + _currentSelectedIndex = 1; + } + _currentSelectedTileId = _currentSelectedIndex; + } + else if (Raylib.IsKeyReleased(KeyboardKey.Left)) + { + _currentSelectedIndex = (_currentSelectedIndex - 1 + _tileNameToId.Count) % _tileNameToId.Count; + if (_currentSelectedIndex == 0) + { + _currentSelectedIndex = _tileNameToId.Count - 1; + } + _currentSelectedTileId = _currentSelectedIndex; + } + if (Raylib.IsMouseButtonDown(MouseButton.Left)) { diff --git a/Tiles/bin/Debug/net8.0/Tiles.dll b/Tiles/bin/Debug/net8.0/Tiles.dll index 6403b3e..0862acc 100644 Binary files a/Tiles/bin/Debug/net8.0/Tiles.dll and b/Tiles/bin/Debug/net8.0/Tiles.dll differ diff --git a/Tiles/bin/Debug/net8.0/Tiles.pdb b/Tiles/bin/Debug/net8.0/Tiles.pdb index 06a4bad..1737435 100644 Binary files a/Tiles/bin/Debug/net8.0/Tiles.pdb and b/Tiles/bin/Debug/net8.0/Tiles.pdb differ diff --git a/Tiles/obj/Debug/net8.0/Tiles.AssemblyInfo.cs b/Tiles/obj/Debug/net8.0/Tiles.AssemblyInfo.cs index 95c4bbd..c58bb36 100644 --- a/Tiles/obj/Debug/net8.0/Tiles.AssemblyInfo.cs +++ b/Tiles/obj/Debug/net8.0/Tiles.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Tiles")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4e792f1937f7dc281b5a56279f8f427a8b6b0e88")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0da03e265018635b2f3e864a0a58892ad192ded4")] [assembly: System.Reflection.AssemblyProductAttribute("Tiles")] [assembly: System.Reflection.AssemblyTitleAttribute("Tiles")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/Tiles/obj/Debug/net8.0/Tiles.AssemblyInfoInputs.cache b/Tiles/obj/Debug/net8.0/Tiles.AssemblyInfoInputs.cache index f34a6f1..bfe16fd 100644 --- a/Tiles/obj/Debug/net8.0/Tiles.AssemblyInfoInputs.cache +++ b/Tiles/obj/Debug/net8.0/Tiles.AssemblyInfoInputs.cache @@ -1 +1 @@ -878acde2fee11315f28b912e289b8837693e33e44d350f59ac560f4d3c05e70f +220403ec0cc61e464f2c4b47238cd8c86b23211d444384c79bb9beec2db08dfa diff --git a/Tiles/obj/Debug/net8.0/Tiles.dll b/Tiles/obj/Debug/net8.0/Tiles.dll index 6403b3e..0862acc 100644 Binary files a/Tiles/obj/Debug/net8.0/Tiles.dll and b/Tiles/obj/Debug/net8.0/Tiles.dll differ diff --git a/Tiles/obj/Debug/net8.0/Tiles.pdb b/Tiles/obj/Debug/net8.0/Tiles.pdb index 06a4bad..1737435 100644 Binary files a/Tiles/obj/Debug/net8.0/Tiles.pdb and b/Tiles/obj/Debug/net8.0/Tiles.pdb differ diff --git a/Tiles/obj/Debug/net8.0/ref/Tiles.dll b/Tiles/obj/Debug/net8.0/ref/Tiles.dll index 48c867e..a5e25b1 100644 Binary files a/Tiles/obj/Debug/net8.0/ref/Tiles.dll and b/Tiles/obj/Debug/net8.0/ref/Tiles.dll differ diff --git a/Tiles/obj/Debug/net8.0/refint/Tiles.dll b/Tiles/obj/Debug/net8.0/refint/Tiles.dll index 48c867e..a5e25b1 100644 Binary files a/Tiles/obj/Debug/net8.0/refint/Tiles.dll and b/Tiles/obj/Debug/net8.0/refint/Tiles.dll differ