From 3617b1b3232bc59f438db0b0cbb775bf954d2ad7 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 25 Oct 2024 18:55:30 +0500 Subject: upd: block petting if shop list is open (mobile) --- core/src/kz/ilotterytea/maxon/screens/game/GameScreen.java | 4 +++- core/src/kz/ilotterytea/maxon/screens/game/shop/ShopUI.java | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/src/kz/ilotterytea/maxon/screens/game/GameScreen.java b/core/src/kz/ilotterytea/maxon/screens/game/GameScreen.java index 58edbdf..c7c7246 100644 --- a/core/src/kz/ilotterytea/maxon/screens/game/GameScreen.java +++ b/core/src/kz/ilotterytea/maxon/screens/game/GameScreen.java @@ -193,7 +193,9 @@ public class GameScreen implements Screen, InputProcessor { this.giftbox.update(delta, this.camera); - this.decalPlayer.render(this.camera); + if (!shopUI.isShopListOpened()) { + this.decalPlayer.render(this.camera); + } for (Decal decal : this.decals) { decal.lookAt(this.camera.position, this.camera.up); diff --git a/core/src/kz/ilotterytea/maxon/screens/game/shop/ShopUI.java b/core/src/kz/ilotterytea/maxon/screens/game/shop/ShopUI.java index 6f0ed5e..9cec62d 100644 --- a/core/src/kz/ilotterytea/maxon/screens/game/shop/ShopUI.java +++ b/core/src/kz/ilotterytea/maxon/screens/game/shop/ShopUI.java @@ -371,4 +371,8 @@ public class ShopUI { this.mainTable.clear(); this.mainTable.add(this.table).growY().width(Math.percentFromValue(30f, Gdx.graphics.getWidth())); } + + public boolean isShopListOpened() { + return isShopListOpened; + } } -- cgit v1.2.3