From 08978c32ec943795ee24976a1c3a38c283aeda37 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 2 May 2022 18:32:45 -0400 Subject: [PATCH] Add a cursor sprite --- assets/cursor.png | Bin 0 -> 149 bytes .../redstrate/watersymbol/screens/GameScreen.java | 8 ++++++++ 2 files changed, 8 insertions(+) create mode 100644 assets/cursor.png diff --git a/assets/cursor.png b/assets/cursor.png new file mode 100644 index 0000000000000000000000000000000000000000..c3fb5c20880d4b01c6358f750b6fe519425095e4 GIT binary patch literal 149 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|{5@S9Lo9le zedhiBZ_g|=WA>>NCmPrntUfNHz^HQm-~aiYF=q`9e0lsyd6Q}IqH+-)V}lQ#GlQ5V wChq+J6l_~M`N_w$=P&lO|F(0.500f, new TextureAtlas("player-idle.atlas").getRegions(), Animation.PlayMode.LOOP_PINGPONG); arrowSpritesheet = new ArrowSpritesheet(); + cursorTexture = new Texture("cursor.png"); stage = new Stage(); Gdx.input.setInputProcessor(stage); @@ -150,6 +154,8 @@ public class GameScreen implements Screen { getNextUnit(); if(currentUnit != null) { + cursorX = currentUnit.positionX; + cursorY = currentUnit.positionY; smoothlyTransitionCamera(new Vector3(currentUnit.positionX * 16, currentUnit.positionY * 16, 0)); } } @@ -666,6 +672,8 @@ public class GameScreen implements Screen { } } + game.batch.draw(cursorTexture, cursorX * 16, cursorY * 16); + game.batch.end(); }