libGDX-bemenet és nézetek
A megfelelő kamerához igazítja az érintést és kattintást eltérő ablakarányoknál. Szükség szerint külön méretezést és bemeneti szabályt ad a játékvilágnak és kezelőfelületnek.
libgdx-input-viewports
Nézd meg, miben segítMikor hasznos?
Akkor használd, ha érintés vagy húzás méretezés, kameramozgás vagy felületréteg után rossz helyre érkezik.
Miben segít neked?
- Külön nézetszabályt választ játékmenethez és felülethez.
- Átméretezés után a megfelelő kamerával alakítja át a bemenetet.
- Egyértelmű eseménykezeléssel sorba rendezi a bemeneti feldolgozókat.
Például ezt kérheted
A toronyvédelmi játékban világkamera és rögzített vásárlósáv van. Próbálj magas telefont, széles asztali ablakot és oldalsávos képet. A bemenetet a megfelelő viewporton alakítsd át: a sáv egyszer vásároljon, a csatatérre koppintás pedig a kívánt mezőt jelölje.
Részletes dokumentáció
Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.
Összecsukás
libGDX — input viewports
Use when implementing libGDX touch, controller input, cameras, resize or UI coordinates.
Version and project gate
Inspect Gradle wrapper and modules, libGDX/backend versions, Java toolchain, ApplicationListener/Game/Screen structure, AssetManager ownership, viewport policy, native libraries and supported desktop/mobile/web targets. Never turn a task into an engine upgrade without the user’s intent. Read the version-matching official reference when an API decision depends on it.
Work
Declare world units and choose the appropriate viewport policy for gameplay and UI separately. Apply viewport updates at resize and convert input through the correct viewport/camera. Order input processors deliberately and define who consumes each event.
Deliver
A coordinate/input contract and usable controls at intended aspect ratios. Keep the change in the existing project structure; separate actual observations from the proposed acceptance scenario below.
Failure to prevent
Mixing screen and world coordinates or using the gameplay viewport for UI can create offset hit areas.
Acceptance scenario
Resize, letterbox, tap corners, drag across UI and verify the same gameplay target under camera movement. Follow the project’s execution and verification permissions. If execution or a target device is unavailable, provide the reproduction steps and name the remaining uncertainty; do not mark it passed.
Scope and sources
This skill belongs to Keiko. Agent selection is restricted by Orqestria’s assigned-agent policy, including forced skill selection; instruction text alone is not an access control. These are original task workflows researched from official documentation, not a copied or endorsed vendor skill.
Task-specific official references
Csomagban lévő fájlok 1
SKILL.md
