├── .clang-format ├── .clang-tidy ├── .gitattributes ├── .github └── workflows │ ├── build.yml │ └── remove-old-artifacts.yml ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── Makefile ├── README.md ├── Screenshots ├── Achievements.png ├── Credits.png ├── Level.png ├── Loading.png ├── MainMenu.png ├── NewGame.png ├── Settings.png └── VoxelMap.png ├── app ├── CMakeLists.txt ├── build.gradle.kts ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── cpp │ ├── AndroidEvents │ │ ├── AndroidDefines.h │ │ ├── NSObject.h │ │ ├── NSObject.mm │ │ ├── ServiceCmd.cpp │ │ ├── ServiceCmd.h │ │ ├── ServiceEvents.h │ │ ├── Wrapper.h │ │ └── Wrapper.m │ ├── Audio │ │ ├── AudioEvents.h │ │ ├── AudioManager.cpp │ │ ├── AudioManager.h │ │ └── AudioManagerDefs.h │ ├── BaseApplication.cpp │ ├── BaseApplication.h │ ├── BaseLevel.cpp │ ├── BaseLevel.h │ ├── BehaviourTree │ │ ├── BehaviourTree.cpp │ │ ├── BehaviourTree.h │ │ └── BehaviourTreeDefs.h │ ├── Config │ │ ├── ConfigFile.cpp │ │ ├── ConfigFile.h │ │ ├── ConfigManager.cpp │ │ └── ConfigManager.h │ ├── Console │ │ ├── ConsoleHandler.cpp │ │ ├── ConsoleHandler.h │ │ └── ConsoleHandlerEvents.h │ ├── CustomEvents.h │ ├── Generator │ │ ├── Generator.cpp │ │ ├── Generator.h │ │ ├── PerlinNoise.h │ │ ├── SimplexNoise.cpp │ │ └── SimplexNoise.h │ ├── Globals │ │ ├── CollisionLayers.h │ │ ├── GUIDefines.h │ │ ├── Settings.h │ │ └── ViewLayers.h │ ├── Input │ │ ├── ControlDefines.h │ │ ├── ControllerEvents.h │ │ ├── ControllerInput.cpp │ │ ├── ControllerInput.h │ │ └── Controllers │ │ │ ├── BaseInput.h │ │ │ ├── JoystickInput.cpp │ │ │ ├── JoystickInput.h │ │ │ ├── KeyboardInput.cpp │ │ │ ├── KeyboardInput.h │ │ │ ├── MouseInput.cpp │ │ │ ├── MouseInput.h │ │ │ ├── ScreenJoystickInput.cpp │ │ │ └── ScreenJoystickInput.h │ ├── LevelManager.cpp │ ├── LevelManager.h │ ├── LevelManagerEvents.h │ ├── Levels │ │ ├── Credits.cpp │ │ ├── Credits.h │ │ ├── ExitGame.cpp │ │ ├── ExitGame.h │ │ ├── Level.cpp │ │ ├── Level.h │ │ ├── Loading.cpp │ │ ├── Loading.h │ │ ├── MainMenu.cpp │ │ ├── MainMenu.h │ │ ├── Splash.cpp │ │ ├── Splash.h │ │ └── Voxel │ │ │ ├── Chunk.cpp │ │ │ ├── Chunk.h │ │ │ ├── ChunkGenerator.cpp │ │ │ ├── ChunkGenerator.h │ │ │ ├── ChunkMesh.cpp │ │ │ ├── ChunkMesh.h │ │ │ ├── LightManager.cpp │ │ │ ├── LightManager.h │ │ │ ├── TreeGenerator.cpp │ │ │ ├── TreeGenerator.h │ │ │ ├── VoxelDefs.h │ │ │ ├── VoxelEvents.h │ │ │ ├── VoxelWorld.cpp │ │ │ └── VoxelWorld.h │ ├── Messages │ │ ├── Achievements.cpp │ │ ├── Achievements.h │ │ ├── MessageEvents.h │ │ ├── Notifications.cpp │ │ ├── Notifications.h │ │ ├── SingleAchievement.cpp │ │ └── SingleAchievement.h │ ├── Mods │ │ ├── ModLoader.cpp │ │ └── ModLoader.h │ ├── Nakama │ │ ├── NakamaEvents.h │ │ ├── NakamaManager.cpp │ │ ├── NakamaManager.h │ │ ├── NetworkProtocol.h │ │ ├── PacketHandler.cpp │ │ └── PacketHandler.h │ ├── Network │ │ └── NetworkEvents.h │ ├── PackageManager │ │ ├── PackageManager.cpp │ │ ├── PackageManager.h │ │ └── PackageManagerEvents.h │ ├── Player │ │ ├── Player.cpp │ │ ├── Player.h │ │ ├── PlayerEvents.h │ │ ├── PlayerState.cpp │ │ └── PlayerState.h │ ├── SceneManager.cpp │ ├── SceneManager.h │ ├── SceneManagerEvents.h │ ├── State │ │ ├── State.cpp │ │ ├── State.h │ │ └── StateEvents.h │ └── UI │ │ ├── Achievements │ │ ├── AchievementsWindow.cpp │ │ └── AchievementsWindow.h │ │ ├── BaseWindow.cpp │ │ ├── BaseWindow.h │ │ ├── NewGameSettings │ │ ├── NewGameSettingsWindow.cpp │ │ └── NewGameSettingsWindow.h │ │ ├── Pause │ │ ├── PauseWindow.cpp │ │ └── PauseWindow.h │ │ ├── PopupMessage │ │ ├── PopupMessageWindow.cpp │ │ └── PopupMessageWindow.h │ │ ├── QuitConfirmation │ │ ├── QuitConfirmationWindow.cpp │ │ └── QuitConfirmationWindow.h │ │ ├── Scoreboard │ │ ├── ScoreboardWindow.cpp │ │ └── ScoreboardWindow.h │ │ ├── Settings │ │ ├── SettingsWindow.cpp │ │ ├── SettingsWindow.h │ │ ├── UIOption.cpp │ │ └── UIOption.h │ │ ├── WindowEvents.h │ │ ├── WindowManager.cpp │ │ └── WindowManager.h │ ├── java │ └── com │ │ └── arnislielturks │ │ └── project_template │ │ └── MainActivity.java │ └── res │ ├── mipmap-hdpi │ └── app_icon.png │ ├── mipmap-mdpi │ └── app_icon.png │ ├── mipmap-xhdpi │ └── app_icon.png │ ├── mipmap-xxhdpi │ └── app_icon.png │ ├── mipmap-xxxhdpi │ └── app_icon.png │ └── values │ ├── colors.xml │ ├── strings.xml │ └── styles.xml ├── bin ├── CoreData │ ├── Materials │ │ └── DefaultGrey.xml │ ├── RenderPaths │ │ ├── Deferred.xml │ │ ├── DeferredHWDepth.xml │ │ ├── Forward.xml │ │ ├── ForwardDepth.xml │ │ ├── ForwardHWDepth.xml │ │ ├── PBRDeferred.xml │ │ ├── PBRDeferredHWDepth.xml │ │ ├── Prepass.xml │ │ ├── PrepassHDR.xml │ │ └── PrepassHWDepth.xml │ ├── Shaders │ │ ├── GLSL │ │ │ ├── AutoExposure.glsl │ │ │ ├── BRDF.glsl │ │ │ ├── Basic.glsl │ │ │ ├── Bloom.glsl │ │ │ ├── BloomHDR.glsl │ │ │ ├── Blur.glsl │ │ │ ├── ColorCorrection.glsl │ │ │ ├── Constants.glsl │ │ │ ├── CopyFramebuffer.glsl │ │ │ ├── DeferredLight.glsl │ │ │ ├── Depth.glsl │ │ │ ├── Dissolve.glsl │ │ │ ├── FXAA2.glsl │ │ │ ├── FXAA3.glsl │ │ │ ├── Fog.glsl │ │ │ ├── GammaCorrection.glsl │ │ │ ├── GreyScale.glsl │ │ │ ├── IBL.glsl │ │ │ ├── Lighting.glsl │ │ │ ├── LitParticle.glsl │ │ │ ├── LitSolid.glsl │ │ │ ├── Outline.glsl │ │ │ ├── PBR.glsl │ │ │ ├── PBRDeferred.glsl │ │ │ ├── PBRLitSolid.glsl │ │ │ ├── PostProcess.glsl │ │ │ ├── PrepassLight.glsl │ │ │ ├── RayMarch.glsl │ │ │ ├── SSAO.glsl │ │ │ ├── Samplers.glsl │ │ │ ├── ScreenPos.glsl │ │ │ ├── Shadow.glsl │ │ │ ├── ShadowBlur.glsl │ │ │ ├── Skybox.glsl │ │ │ ├── Skydome.glsl │ │ │ ├── Stencil.glsl │ │ │ ├── TerrainBlend.glsl │ │ │ ├── Text.glsl │ │ │ ├── Tonemap.glsl │ │ │ ├── Toon.glsl │ │ │ ├── Transform.glsl │ │ │ ├── Uniforms.glsl │ │ │ ├── Unlit.glsl │ │ │ ├── UnlitParticle.glsl │ │ │ ├── UnlitVoxel.glsl │ │ │ ├── Urho2D.glsl │ │ │ ├── Vegetation.glsl │ │ │ ├── VegetationDepth.glsl │ │ │ ├── VegetationShadow.glsl │ │ │ └── Water.glsl │ │ └── HLSL │ │ │ ├── AutoExposure.hlsl │ │ │ ├── BRDF.hlsl │ │ │ ├── Basic.hlsl │ │ │ ├── Bloom.hlsl │ │ │ ├── BloomHDR.hlsl │ │ │ ├── Blur.hlsl │ │ │ ├── ClearFramebuffer.hlsl │ │ │ ├── ColorCorrection.hlsl │ │ │ ├── Constants.hlsl │ │ │ ├── CopyFramebuffer.hlsl │ │ │ ├── DeferredLight.hlsl │ │ │ ├── Depth.hlsl │ │ │ ├── FXAA2.hlsl │ │ │ ├── FXAA3.hlsl │ │ │ ├── Fog.hlsl │ │ │ ├── GammaCorrection.hlsl │ │ │ ├── GreyScale.hlsl │ │ │ ├── IBL.hlsl │ │ │ ├── Lighting.hlsl │ │ │ ├── LitParticle.hlsl │ │ │ ├── LitSolid.hlsl │ │ │ ├── Outline.hlsl │ │ │ ├── PBR.hlsl │ │ │ ├── PBRDeferred.hlsl │ │ │ ├── PBRLitSolid.hlsl │ │ │ ├── PostProcess.hlsl │ │ │ ├── PrepassLight.hlsl │ │ │ ├── Samplers.hlsl │ │ │ ├── ScreenPos.hlsl │ │ │ ├── Shadow.hlsl │ │ │ ├── ShadowBlur.hlsl │ │ │ ├── Skybox.hlsl │ │ │ ├── Skydome.hlsl │ │ │ ├── Stencil.hlsl │ │ │ ├── TerrainBlend.hlsl │ │ │ ├── Text.hlsl │ │ │ ├── Tonemap.hlsl │ │ │ ├── Transform.hlsl │ │ │ ├── Uniforms.hlsl │ │ │ ├── Unlit.hlsl │ │ │ ├── UnlitParticle.hlsl │ │ │ ├── Urho2D.hlsl │ │ │ ├── Vegetation.hlsl │ │ │ ├── VegetationDepth.hlsl │ │ │ ├── VegetationShadow.hlsl │ │ │ └── Water.hlsl │ ├── Techniques │ │ ├── BasicVColUnlitAlpha.xml │ │ ├── Diff.xml │ │ ├── DiffAO.xml │ │ ├── DiffAOAlpha.xml │ │ ├── DiffAdd.xml │ │ ├── DiffAddAlpha.xml │ │ ├── DiffAlpha.xml │ │ ├── DiffAlphaTranslucent.xml │ │ ├── DiffEmissive.xml │ │ ├── DiffEmissiveAlpha.xml │ │ ├── DiffEnvCube.xml │ │ ├── DiffEnvCubeAO.xml │ │ ├── DiffEnvCubeAOAlpha.xml │ │ ├── DiffEnvCubeAlpha.xml │ │ ├── DiffLightMap.xml │ │ ├── DiffLightMapAlpha.xml │ │ ├── DiffLitParticleAlpha.xml │ │ ├── DiffLitParticleAlphaSoft.xml │ │ ├── DiffLitParticleAlphaSoftExpand.xml │ │ ├── DiffMultiply.xml │ │ ├── DiffNormal.xml │ │ ├── DiffNormalAO.xml │ │ ├── DiffNormalAOAlpha.xml │ │ ├── DiffNormalAlpha.xml │ │ ├── DiffNormalAlphaTranslucent.xml │ │ ├── DiffNormalEmissive.xml │ │ ├── DiffNormalEmissiveAlpha.xml │ │ ├── DiffNormalEnvCube.xml │ │ ├── DiffNormalEnvCubeAlpha.xml │ │ ├── DiffNormalSpec.xml │ │ ├── DiffNormalSpecAO.xml │ │ ├── DiffNormalSpecAOAlpha.xml │ │ ├── DiffNormalSpecAlpha.xml │ │ ├── DiffNormalSpecEmissive.xml │ │ ├── DiffNormalSpecEmissiveAlpha.xml │ │ ├── DiffOutline.xml │ │ ├── DiffOverlay.xml │ │ ├── DiffSkybox.xml │ │ ├── DiffSkyboxHDRScale.xml │ │ ├── DiffSkydome.xml │ │ ├── DiffSkyplane.xml │ │ ├── DiffSpec.xml │ │ ├── DiffSpecAlpha.xml │ │ ├── DiffUnlit.xml │ │ ├── DiffUnlitAlpha.xml │ │ ├── DiffUnlitParticleAdd.xml │ │ ├── DiffUnlitParticleAddSoft.xml │ │ ├── DiffUnlitParticleAddSoftExpand.xml │ │ ├── DiffUnlitParticleAlpha.xml │ │ ├── DiffUnlitParticleAlphaSoft.xml │ │ ├── DiffUnlitParticleAlphaSoftExpand.xml │ │ ├── DiffVCol.xml │ │ ├── DiffVColAdd.xml │ │ ├── DiffVColAddAlpha.xml │ │ ├── DiffVColMultiply.xml │ │ ├── DiffVColUnlitAlpha.xml │ │ ├── DiffVoxel.xml │ │ ├── DiffVoxelAlpha.xml │ │ ├── NoTexture.xml │ │ ├── NoTextureAO.xml │ │ ├── NoTextureAOAlpha.xml │ │ ├── NoTextureAdd.xml │ │ ├── NoTextureAddAlpha.xml │ │ ├── NoTextureAlpha.xml │ │ ├── NoTextureEnvCube.xml │ │ ├── NoTextureEnvCubeAO.xml │ │ ├── NoTextureEnvCubeAOAlpha.xml │ │ ├── NoTextureEnvCubeAlpha.xml │ │ ├── NoTextureMultiply.xml │ │ ├── NoTextureNormal.xml │ │ ├── NoTextureNormalAlpha.xml │ │ ├── NoTextureOutline.xml │ │ ├── NoTextureOverlay.xml │ │ ├── NoTextureUnlit.xml │ │ ├── NoTextureUnlitAlpha.xml │ │ ├── NoTextureUnlitVCol.xml │ │ ├── NoTextureVCol.xml │ │ ├── NoTextureVColAdd.xml │ │ ├── NoTextureVColAddAlpha.xml │ │ ├── NoTextureVColMultiply.xml │ │ ├── PBR │ │ │ ├── DiffNormalSpecEmissive.xml │ │ │ ├── DiffNormalSpecEmissiveAlpha.xml │ │ │ ├── PBRDiff.xml │ │ │ ├── PBRDiffAlpha.xml │ │ │ ├── PBRDiffNormal.xml │ │ │ ├── PBRDiffNormalAlpha.xml │ │ │ ├── PBRDiffNormalEmissive.xml │ │ │ ├── PBRDiffNormalEmissiveAlpha.xml │ │ │ ├── PBRMetallicRoughDiffNormalSpec.xml │ │ │ ├── PBRMetallicRoughDiffNormalSpecEmissive.xml │ │ │ ├── PBRMetallicRoughDiffNormalSpecEmissiveAlpha.xml │ │ │ ├── PBRMetallicRoughDiffSpec.xml │ │ │ ├── PBRMetallicRoughDiffSpecAlpha.xml │ │ │ ├── PBRNoTexture.xml │ │ │ └── PBRNoTextureAlpha.xml │ │ ├── TerrainBlend.xml │ │ ├── VegetationDiff.xml │ │ ├── VegetationDiffUnlit.xml │ │ └── Water.xml │ └── Textures │ │ ├── LUTIdentity.png │ │ ├── LUTIdentity.xml │ │ ├── Ramp.png │ │ ├── Ramp.xml │ │ ├── RampExtreme.png │ │ ├── RampExtreme.xml │ │ ├── RampWide.png │ │ ├── RampWide.xml │ │ ├── Spot.png │ │ ├── Spot.xml │ │ ├── SpotWide.png │ │ └── SpotWide.xml ├── Data │ ├── Config │ │ ├── Achievements.json │ │ ├── Behaviour.json │ │ └── config.cfg │ ├── Fonts │ │ ├── Muli-Regular.ttf │ │ └── OFL.txt │ ├── Materials │ │ ├── Ball.xml │ │ ├── Box.xml │ │ ├── Checkpoint.xml │ │ ├── Ground.xml │ │ ├── NoMaterial.xml │ │ ├── Particle.xml │ │ ├── Player.xml │ │ ├── Stone.xml │ │ ├── StoneOutline.xml │ │ ├── StoneTiled.xml │ │ ├── Terrain.xml │ │ ├── UrhoDecalAlphaMaskTwoSided.xml │ │ ├── Voxel.xml │ │ ├── VoxelWater.xml │ │ └── Wood.xml │ ├── Models │ │ ├── Box.mdl │ │ ├── Custom.mdl │ │ ├── Cylinder.mdl │ │ ├── Plane.mdl │ │ ├── Sphere.mdl │ │ └── Urchin.mdl │ ├── Mods │ │ ├── AdditionalMenuButton.as │ │ ├── Character.as │ │ ├── Character │ │ │ ├── Bot.mdl │ │ │ ├── Bot.txt │ │ │ ├── Bot_Fall.ani │ │ │ ├── Bot_Run.ani │ │ │ ├── Bot_RunBack.ani │ │ │ ├── Bot_RunLeft.ani │ │ │ ├── Bot_RunRight.ani │ │ │ ├── Bot_SlowWalking.ani │ │ │ ├── Bot_Walk.ani │ │ │ ├── Bot_WalkBack.ani │ │ │ ├── Bot_WalkLeft.ani │ │ │ ├── Bot_WalkRight.ani │ │ │ └── Materials │ │ │ │ ├── Beta_Joints_MAT.xml │ │ │ │ └── asdf1Beta_HighLimbsGeoSG2.xml │ │ ├── Crosshair.as │ │ ├── Debugger.as │ │ ├── Debugger.lua │ │ ├── Downloader.as │ │ ├── GameMode.as │ │ ├── GameMode │ │ │ ├── Checkpoint.as │ │ │ ├── Checkpoint.xml │ │ │ ├── DestroyCube.xml │ │ │ ├── Destroyer.as │ │ │ └── GameObject.as │ │ ├── GlobalConfigChanger.as │ │ ├── Helpers │ │ │ ├── Config.json │ │ │ └── Helper.as │ │ ├── LevelManagerNotification.as │ │ ├── LoadStepImitator.as │ │ ├── LoadingScreen.as │ │ ├── LogoRotate.as │ │ ├── MOTD.lua │ │ ├── MainMenuSceneAddon.as │ │ ├── ObstacleCourse.as │ │ ├── ObstacleCourse │ │ │ ├── Drop.as │ │ │ ├── Finish.as │ │ │ ├── ObstacleCourse.xml │ │ │ └── Reach.as │ │ ├── PacketCounter.as │ │ ├── Skybox.as │ │ ├── Skybox │ │ │ ├── Materials │ │ │ │ └── Skybox.xml │ │ │ └── Textures │ │ │ │ ├── BrightDay1_NegX.dds │ │ │ │ ├── BrightDay1_NegY.dds │ │ │ │ ├── BrightDay1_NegZ.dds │ │ │ │ ├── BrightDay1_PosX.dds │ │ │ │ ├── BrightDay1_PosY.dds │ │ │ │ ├── BrightDay1_PosZ.dds │ │ │ │ └── Skybox.xml │ │ └── Vehicles.as │ ├── Particle │ │ └── Burst.xml │ ├── PostProcess │ │ ├── AutoExposure.xml │ │ ├── Bloom.xml │ │ ├── BloomHDR.xml │ │ ├── Blur.xml │ │ ├── ColorCorrection.xml │ │ ├── FXAA2.xml │ │ ├── FXAA3.xml │ │ ├── GammaCorrection.xml │ │ ├── GreyScale.xml │ │ ├── RayMarch.xml │ │ ├── SSAO.xml │ │ ├── Tonemap.xml │ │ └── Toon.xml │ ├── Saves │ │ └── .gitignore │ ├── Scenes │ │ ├── Flat.xml │ │ ├── Menu.xml │ │ ├── Terrain.xml │ │ └── Voxel.xml │ ├── Sounds │ │ ├── NutThrow.wav │ │ ├── PlayerFistHit.wav │ │ ├── achievement.wav │ │ ├── ambient.wav │ │ ├── checkpoint.wav │ │ ├── click.wav │ │ ├── kick.wav │ │ ├── menu.wav │ │ ├── music.wav │ │ └── place_block.wav │ ├── Textures │ │ ├── Achievements │ │ │ ├── button-finger.png │ │ │ ├── exit-door.png │ │ │ ├── falling.png │ │ │ ├── lunar-module.png │ │ │ ├── photo-camera.png │ │ │ ├── retro-controller.png │ │ │ ├── tabletop-players.png │ │ │ ├── tied-scroll.png │ │ │ └── trophy-cup.png │ │ ├── AppIcon.png │ │ ├── Avatar.png │ │ ├── Blank.png │ │ ├── Box.png │ │ ├── BoxAmbient.png │ │ ├── BoxNormal.png │ │ ├── BoxSpec.png │ │ ├── Button.png │ │ ├── Flare.dds │ │ ├── Gray.png │ │ ├── Joysticks.png │ │ ├── Loading.png │ │ ├── Noise.png │ │ ├── Noise.xml │ │ ├── Random.png │ │ ├── Random.xml │ │ ├── Sight.png │ │ ├── Sight.xml │ │ ├── Skybox.xml │ │ ├── StoneDiffuse.dds │ │ ├── StoneNormal.dds │ │ ├── TerrainDetail1.dds │ │ ├── TerrainDetail2.dds │ │ ├── TerrainDetail3.dds │ │ ├── TerrainWeights.dds │ │ ├── Transparent.png │ │ ├── UI.png │ │ ├── UI.xml │ │ ├── UrhoDecalAlpha.dds │ │ ├── UrhoIcon.icns │ │ ├── UrhoIcon.png │ │ ├── combined.png │ │ ├── combined.xml │ │ ├── cube.png │ │ ├── dirt.png │ │ ├── flat-platform.png │ │ ├── floor_tiles_diff.png │ │ ├── floor_tiles_normal.png │ │ ├── floor_tiles_spec.png │ │ ├── sand.png │ │ ├── slalom.png │ │ └── stone.png │ ├── Translations │ │ ├── EN.json │ │ └── LV.json │ └── UI │ │ ├── DefaultStyle.xml │ │ └── ScreenJoystick.xml └── ProjectTemplate.desktop ├── build.gradle.kts ├── cmake ├── Modules │ ├── AdjustPkgConfigForMSVC.cmake │ ├── CheckCompilerToolchain.cmake │ ├── CheckHost.cmake │ ├── CheckUrhoLibrary.cpp │ ├── FindDRM.cmake │ ├── FindDirectFB.cmake │ ├── FindDirectX.cmake │ ├── FindEsound.cmake │ ├── FindFusionSound.cmake │ ├── FindGBM.cmake │ ├── FindJack.cmake │ ├── FindNAS.cmake │ ├── FindODBC.cmake │ ├── FindOSS.cmake │ ├── FindPulseAudio.cmake │ ├── FindReadline.cmake │ ├── FindSNDIO.cmake │ ├── FindSecretRabbitCode.cmake │ ├── FindUrho3D.cmake │ ├── FindVideoCore.cmake │ ├── FindWayland.cmake │ ├── FindaRts.cmake │ ├── GetUrhoRevision.cmake │ ├── MacOSXBundleInfo.plist.template │ ├── UrhoCommon.cmake │ ├── iOSBundleInfo.plist.template │ └── tvOSBundleInfo.plist.template └── Toolchains │ ├── Arm.cmake │ ├── Emscripten.cmake │ ├── MinGW.cmake │ └── RaspberryPi.cmake ├── cmake_install.cmake ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── rakefile ├── script ├── .bash_helpers.sh ├── .build-options ├── .env-file ├── cmake_arm.sh ├── cmake_clean.bat ├── cmake_clean.sh ├── cmake_codeblocks.bat ├── cmake_codeblocks.sh ├── cmake_codelite.bat ├── cmake_codelite.sh ├── cmake_emscripten.bat ├── cmake_emscripten.sh ├── cmake_generic.bat ├── cmake_generic.sh ├── cmake_ios.sh ├── cmake_mingw.bat ├── cmake_mingw.sh ├── cmake_ninja.bat ├── cmake_ninja.sh ├── cmake_rpi.sh ├── cmake_tvos.sh ├── cmake_vs.bat ├── cmake_vs2015.bat ├── cmake_vs2017.bat ├── cmake_vs2019.bat ├── cmake_xcode.sh └── dockerized.sh └── settings.gradle.kts /.gitattributes: -------------------------------------------------------------------------------- 1 | *.h linguist-language=C++ 2 | -------------------------------------------------------------------------------- /.github/workflows/remove-old-artifacts.yml: -------------------------------------------------------------------------------- 1 | name: Remove old artifacts 2 | 3 | on: 4 | schedule: 5 | # Every day at 1am 6 | - cron: '0 1 * * *' 7 | 8 | jobs: 9 | remove-old-artifacts: 10 | runs-on: ubuntu-latest 11 | timeout-minutes: 10 12 | 13 | steps: 14 | - name: Remove old artifacts 15 | uses: c-hive/gha-remove-artifacts@v1 16 | with: 17 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 18 | age: '1 month' 19 | skip-tags: true -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Code::Blocks project settings 2 | /*.cbp 3 | 4 | # Codelite project settings 5 | /*.project 6 | /*.workspace 7 | 8 | # Gradle project settings 9 | /local.properties 10 | .gradle/ 11 | build/ 12 | .cxx/ 13 | 14 | # JetBrains IDE project settings 15 | /.idea/ 16 | /cmake-build-*/ 17 | *.iml 18 | 19 | # KDevelop project settings 20 | /*.kdev? 21 | 22 | # Qt Creator project settings 23 | /CMakeLists.txt.user 24 | 25 | # Visual Studio project settings 26 | /CMakeSettings.json 27 | /.vs/ 28 | /out/ 29 | 30 | # Misc. 31 | *~ 32 | *.swp 33 | .DS_Store 34 | *.log 35 | *.bak 36 | Thumbs.db 37 | .directory 38 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10.2) 2 | project(ProjectTemplate) 3 | 4 | set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) 5 | include(UrhoCommon) 6 | 7 | add_subdirectory(app) 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Arnis Lielturks 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### NOTE! 2 | ### The project has been moved to [urnenfeld/Urho3D-Project-Template](https://github.com/urnenfeld/Urho3D-Project-Template) 3 | -------------------------------------------------------------------------------- /Screenshots/Achievements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnisLielturks/Urho3D-Project-Template/998d12e2470ec8a43ec552a1c2182eecfed63ca1/Screenshots/Achievements.png -------------------------------------------------------------------------------- /Screenshots/Credits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnisLielturks/Urho3D-Project-Template/998d12e2470ec8a43ec552a1c2182eecfed63ca1/Screenshots/Credits.png -------------------------------------------------------------------------------- /Screenshots/Level.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnisLielturks/Urho3D-Project-Template/998d12e2470ec8a43ec552a1c2182eecfed63ca1/Screenshots/Level.png -------------------------------------------------------------------------------- /Screenshots/Loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnisLielturks/Urho3D-Project-Template/998d12e2470ec8a43ec552a1c2182eecfed63ca1/Screenshots/Loading.png -------------------------------------------------------------------------------- /Screenshots/MainMenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnisLielturks/Urho3D-Project-Template/998d12e2470ec8a43ec552a1c2182eecfed63ca1/Screenshots/MainMenu.png -------------------------------------------------------------------------------- /Screenshots/NewGame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnisLielturks/Urho3D-Project-Template/998d12e2470ec8a43ec552a1c2182eecfed63ca1/Screenshots/NewGame.png -------------------------------------------------------------------------------- /Screenshots/Settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnisLielturks/Urho3D-Project-Template/998d12e2470ec8a43ec552a1c2182eecfed63ca1/Screenshots/Settings.png -------------------------------------------------------------------------------- /Screenshots/VoxelMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnisLielturks/Urho3D-Project-Template/998d12e2470ec8a43ec552a1c2182eecfed63ca1/Screenshots/VoxelMap.png -------------------------------------------------------------------------------- /app/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET_NAME ProjectTemplate) 2 | define_source_files(GLOB_CPP_PATTERNS src/main/cpp/*.cpp GLOB_H_PATTERNS src/main/cpp/*.h RECURSE GROUP) 3 | setup_main_executable() 4 | setup_test() 5 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/cpp/AndroidEvents/AndroidDefines.h: -------------------------------------------------------------------------------- 1 | static const int ANDROID_AD_INITIALIZED = 10; 2 | 3 | static const int ANDROID_AD_LOAD_INTERSTITIAL = 20; 4 | static const int ANDROID_AD_SHOW_INTERSTITIAL = 21; 5 | static const int ANDROID_AD_INTERSTITIAL_LOADED = 22; 6 | static const int ANDROID_AD_SHOW_INTERSTITIAL_OPENED = 23; 7 | static const int ANDROID_AD_INTERSTITIAL_NOT_LOADED = 24; 8 | static const int ANDROID_AD_INTERSTITIAL_CLOSED = 25; 9 | 10 | static const int ANDROID_AD_LOAD_REWARDED = 30; 11 | static const int ANDROID_AD_REWARDED_SHOW = 31; 12 | static const int ANDROID_AD_REWARDED_LOADED = 32; 13 | static const int ANDROID_AD_REWARDED_FAILED_TO_LOAD = 33; 14 | static const int ANDROID_AD_REWARDED_OPENED = 34; 15 | static const int ANDROID_AD_REWARDED_CLOSED = 35; 16 | static const int ANDROID_AD_REWARDED_EARNED = 36; 17 | static const int ANDROID_AD_REWARDED_FAILED_TO_SHOW = 37; -------------------------------------------------------------------------------- /app/src/main/cpp/AndroidEvents/NSObject.h: -------------------------------------------------------------------------------- 1 | //#pragma once 2 | // 3 | //#import 4 | // 5 | ////#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE 6 | //// 7 | ////#import 8 | //// 9 | ////#elif TARGET_OS_MAC 10 | //// 11 | ////#import 12 | //// 13 | ////#endif 14 | // 15 | //class TestClass { 16 | ////public: 17 | // void Test(); 18 | //}; 19 | -------------------------------------------------------------------------------- /app/src/main/cpp/AndroidEvents/NSObject.mm: -------------------------------------------------------------------------------- 1 | //#import 2 | // 3 | //#include "NSObject.h" 4 | //#include "ServiceCmd.h" 5 | //#include "Wrapper.h" 6 | // 7 | //static Wrapper* wrapper = nullptr; 8 | // 9 | //void TestClass::Test() { 10 | // NSLog(@"This is TestClass method from objective-c++"); 11 | // ServiceCmd::instance->Test(); 12 | // if (!wrapper) { 13 | // wrapper=[[Wrapper alloc]init]; //Allocating the new object for the objective C class we created 14 | // } 15 | // [wrapper testMethod]; //Calling the function we defined 16 | //} 17 | -------------------------------------------------------------------------------- /app/src/main/cpp/AndroidEvents/ServiceCmd.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | //#include "NSObject.h" 6 | 7 | #if defined(__ANDROID__) 8 | #include 9 | extern "C" { 10 | JNIEXPORT void JNICALL 11 | Java_org_libsdl_app_SDLActivity_SendServiceCommand(JNIEnv *env, jobject, jint cmd, jint status, jstring message); 12 | } 13 | #endif 14 | 15 | namespace Urho3D 16 | { 17 | class Controls; 18 | } 19 | 20 | class ServiceCmd : public Urho3D::Object 21 | { 22 | URHO3D_OBJECT(ServiceCmd, Object); 23 | public: 24 | ServiceCmd(Urho3D::Context* context); 25 | ~ServiceCmd(); 26 | 27 | void SendCmdMessage(int cmd, int param); 28 | 29 | void ReceiveCmdMessage(int cmd, int status, const char* message); 30 | 31 | static ServiceCmd* instance; 32 | 33 | void Test(); 34 | 35 | void Init(); 36 | 37 | protected: 38 | void ProcessMessageQueue(); 39 | void HandleUpdate(Urho3D::StringHash eventType, Urho3D::VariantMap& eventData); 40 | 41 | private: 42 | struct MessageData 43 | { 44 | int command; 45 | int status; 46 | Urho3D::String message; 47 | }; 48 | 49 | Urho3D::Vector messageList_; 50 | Urho3D::Mutex mutexMessageLock_; 51 | 52 | bool HasQueueMessage(MessageData& messageData); 53 | void PopFrontQueue(); 54 | void SendResponseMsg(const MessageData &msg); 55 | }; 56 | -------------------------------------------------------------------------------- /app/src/main/cpp/AndroidEvents/ServiceEvents.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace ServiceEvents { 5 | URHO3D_EVENT(E_SERVICE_MESSAGE, ServiceMessage) 6 | { 7 | URHO3D_PARAM(P_COMMAND, Command); // int 8 | URHO3D_PARAM(P_STATUS, Status); // int 9 | URHO3D_PARAM(P_MESSAGE, Message); // String 10 | } 11 | } -------------------------------------------------------------------------------- /app/src/main/cpp/AndroidEvents/Wrapper.h: -------------------------------------------------------------------------------- 1 | //#pragma once 2 | // 3 | //#import 4 | // 5 | //#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE 6 | // 7 | //#import 8 | // 9 | //#elif TARGET_OS_MAC 10 | // 11 | //#import 12 | // 13 | //#endif 14 | // 15 | //@interface Wrapper: NSObject { 16 | //} 17 | // 18 | //- (id)init; 19 | //- (void) testMethod; 20 | //@end 21 | -------------------------------------------------------------------------------- /app/src/main/cpp/AndroidEvents/Wrapper.m: -------------------------------------------------------------------------------- 1 | //#import 2 | //#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE 3 | // 4 | //#import 5 | // 6 | //#elif TARGET_OS_MAC 7 | // 8 | //#import 9 | // 10 | //#endif 11 | // 12 | //#include "Wrapper.h" 13 | // 14 | //@implementation Wrapper 15 | //- (id) init { 16 | // self = [super init]; 17 | // if ( self ) 18 | // { 19 | // } 20 | // return self; 21 | //} 22 | // 23 | //- (void)testMethod 24 | //{ 25 | // NSLog(@"This is Wrapper method from objective-c++"); 26 | //} 27 | //@end 28 | -------------------------------------------------------------------------------- /app/src/main/cpp/Audio/AudioEvents.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace AudioEvents { 5 | // play sound 6 | URHO3D_EVENT(E_PLAY_SOUND, PlaySound) 7 | { 8 | URHO3D_PARAM(P_INDEX, Index); // string or int - sound id 9 | URHO3D_PARAM(P_TYPE, Type); // string - sound type - Master / Effect / Ambient / Voice / Music 10 | URHO3D_PARAM(P_SOUND_FILE, SoundFile); // string - full path to sound file, not needed when Index is used 11 | } 12 | 13 | // stop sound 14 | URHO3D_EVENT(E_STOP_SOUND, StopSound) 15 | { 16 | URHO3D_PARAM(P_INDEX, Index); // int - sound id 17 | URHO3D_PARAM(P_TYPE, Type); // string - sound type - Master / Effect / Ambient / Voice / Music 18 | } 19 | 20 | // stop all sounds in progress 21 | URHO3D_EVENT(E_STOP_ALL_SOUNDS, StopAllSounds) 22 | { 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/cpp/Audio/AudioManagerDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace AudioDefs { 4 | enum SOUND_EFFECTS { 5 | HIT, 6 | THROW, 7 | BUTTON_CLICK, 8 | ACHIEVEMENT, 9 | PLACE_BLOCK 10 | }; 11 | 12 | enum MUSIC { 13 | GAME, 14 | MENU 15 | }; 16 | 17 | enum AMBIENT_SOUNDS { 18 | LEVEL 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/cpp/BehaviourTree/BehaviourTree.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "BehaviourTreeDefs.h" 9 | 10 | using namespace Urho3D; 11 | 12 | struct BTService { 13 | String name; 14 | }; 15 | 16 | struct BTDecorator { 17 | String name; 18 | }; 19 | 20 | struct BTNode { 21 | BTNodeType nodeType; 22 | String name; 23 | Vector services; 24 | Vector childNodes; 25 | Vector decorators; 26 | }; 27 | 28 | class BehaviourTree : public LogicComponent 29 | { 30 | URHO3D_OBJECT(BehaviourTree, LogicComponent); 31 | 32 | public: 33 | explicit BehaviourTree(Context* context); 34 | 35 | virtual ~BehaviourTree(); 36 | 37 | static void RegisterFactory(Context* context); 38 | 39 | void Init(const String& config); 40 | 41 | const Controls& GetControls(); 42 | 43 | void FixedUpdate(float timeStep) override; 44 | 45 | private: 46 | void SubscribeToEvents(); 47 | 48 | void LoadConfig(const String& config); 49 | 50 | Controls controls_; 51 | 52 | BTNode rootNode_; 53 | }; 54 | -------------------------------------------------------------------------------- /app/src/main/cpp/BehaviourTree/BehaviourTreeDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum BTState { 4 | SUCCESS, 5 | FAILED 6 | }; 7 | 8 | enum BTNodeType { 9 | SELECTOR, 10 | SEQUENCE 11 | }; 12 | -------------------------------------------------------------------------------- /app/src/main/cpp/Console/ConsoleHandlerEvents.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace ConsoleHandlerEvents { 5 | // Add new console command 6 | URHO3D_EVENT(E_CONSOLE_COMMAND_ADD, ConsoleCommandAdd) 7 | { 8 | URHO3D_PARAM(P_NAME, ConsoleCommandName); // string - command name 9 | URHO3D_PARAM(P_EVENT, ConsoleCommandEvent); // string - event to call when command entered 10 | URHO3D_PARAM(P_DESCRIPTION, ConsoleCommandDescription); // string - short description of the command 11 | URHO3D_PARAM(P_OVERWRITE, Overwrite); // bool - should we overwrite existing handler 12 | } 13 | 14 | // When global variable is changed 15 | URHO3D_EVENT(E_CONSOLE_GLOBAL_VARIABLE_CHANGED, ConsoleGlobalVariableChanged) 16 | { 17 | URHO3D_PARAM(P_NAME, Name); // string - global variable name 18 | URHO3D_PARAM(P_VALUE, Value); // string - new value 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/cpp/CustomEvents.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace CustomEvents 5 | { 6 | // Add new global variable which should be saved in the config files 7 | URHO3D_EVENT(E_ADD_CONFIG, AddConfig) 8 | { 9 | URHO3D_PARAM(P_NAME, Name); // string - global variable name 10 | } 11 | 12 | // Load configuration file 13 | URHO3D_EVENT(E_LOAD_CONFIG, LoadConfig) 14 | { 15 | URHO3D_PARAM(P_FILEPATH, Filepath); // string - filepath + filename, relative to executable 16 | URHO3D_PARAM(P_PREFIX, Prefix); // string - prefix, which will be added to loaded configuration variables, can be empty 17 | } 18 | 19 | // Video settings changed event 20 | URHO3D_EVENT(E_VIDEO_SETTINGS_CHANGED, VideoSettingsChanged) 21 | { 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/cpp/Generator/Generator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace Urho3D; 9 | 10 | class Generator : public Object 11 | { 12 | URHO3D_OBJECT(Generator, Object); 13 | 14 | public: 15 | Generator(Context* context); 16 | 17 | virtual ~Generator(); 18 | 19 | Image* GenerateImage(double frequency, int octaves, int seed); 20 | 21 | Image* GetImage() const { return generatedImage_; }; 22 | 23 | void GenerateTextures(); 24 | 25 | void Save(); 26 | 27 | private: 28 | /** 29 | * Subscribe to notification events 30 | */ 31 | void SubscribeToEvents(); 32 | 33 | SharedPtr generatedImage_; 34 | }; 35 | -------------------------------------------------------------------------------- /app/src/main/cpp/Globals/CollisionLayers.h: -------------------------------------------------------------------------------- 1 | static const unsigned COLLISION_MASK_PLAYER = 1 << 0; //1 2 | static const unsigned COLLISION_MASK_CHECKPOINT = 1 << 1; //2 3 | static const unsigned COLLISION_MASK_OBSTACLES = 1 << 2; //4 4 | static const unsigned COLLISION_MASK_GROUND = 1 << 3; //8 5 | static const unsigned COLLISION_MASK_CHUNK = 1 << 4; //16 6 | static const unsigned COLLISION_MASK_CHUNK_LOADER = 1 << 5; //32 7 | -------------------------------------------------------------------------------- /app/src/main/cpp/Globals/GUIDefines.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace Urho3D; 4 | 5 | static const String APPLICATION_FONT = "Fonts/Muli-Regular.ttf"; 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/Globals/Settings.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace Urho3D; 4 | 5 | static const String DOCUMENTS_DIR = "ProjectTemplate"; -------------------------------------------------------------------------------- /app/src/main/cpp/Globals/ViewLayers.h: -------------------------------------------------------------------------------- 1 | static const unsigned VIEW_MASK_CHUNK = 1 << 0; //1 2 | static const unsigned VIEW_MASK_GUI = 1 << 1; //2 3 | static const unsigned VIEW_MASK_PLAYER = 1 << 2; //4 4 | -------------------------------------------------------------------------------- /app/src/main/cpp/Input/ControlDefines.h: -------------------------------------------------------------------------------- 1 | static const unsigned CTRL_FORWARD = 1 << 0; //1 2 | static const unsigned CTRL_BACK = 1 << 2; //2 3 | static const unsigned CTRL_LEFT = 1 << 3; //4 4 | static const unsigned CTRL_RIGHT = 1 << 4; //8 5 | static const unsigned CTRL_JUMP = 1 << 5; //16 6 | static const unsigned CTRL_ACTION = 1 << 6; //32 7 | static const unsigned CTRL_SECONDARY = 1 << 7; //64 8 | static const unsigned CTRL_SPRINT = 1 << 8; //128 9 | static const unsigned CTRL_UP = 1 << 9; //256 10 | static const unsigned CTRL_SCREENSHOT = 1 << 10; //512 11 | static const unsigned CTRL_DETECT = 1 << 11; //1024 12 | static const unsigned CTRL_CHANGE_ITEM = 1 << 12; //2048 -------------------------------------------------------------------------------- /app/src/main/cpp/Input/Controllers/KeyboardInput.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "BaseInput.h" 4 | #include "../../Config/ConfigFile.h" 5 | 6 | class KeyboardInput : public BaseInput 7 | { 8 | URHO3D_OBJECT(KeyboardInput, BaseInput); 9 | 10 | public: 11 | KeyboardInput(Context* context); 12 | 13 | virtual ~KeyboardInput(); 14 | virtual String GetActionKeyName(int action) override; 15 | 16 | protected: 17 | virtual void Init(); 18 | 19 | private: 20 | void SubscribeToEvents(); 21 | 22 | void HandleKeyDown(StringHash eventType, VariantMap& eventData); 23 | void HandleKeyUp(StringHash eventType, VariantMap& eventData); 24 | }; 25 | -------------------------------------------------------------------------------- /app/src/main/cpp/Input/Controllers/MouseInput.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "BaseInput.h" 4 | #include "../../Config/ConfigFile.h" 5 | 6 | class MouseInput : public BaseInput 7 | { 8 | URHO3D_OBJECT(MouseInput, BaseInput); 9 | 10 | public: 11 | MouseInput(Context* context); 12 | 13 | virtual ~MouseInput(); 14 | virtual String GetActionKeyName(int action) override; 15 | 16 | /** 17 | * Load mouse config from config.cfg file [mouse] block 18 | */ 19 | virtual void LoadConfig() override; 20 | 21 | protected: 22 | virtual void Init(); 23 | 24 | private: 25 | void SubscribeToEvents(); 26 | 27 | void HandleKeyDown(StringHash eventType, VariantMap& eventData); 28 | void HandleKeyUp(StringHash eventType, VariantMap& eventData); 29 | void HandleMouseMove(StringHash eventType, VariantMap& eventData); 30 | void HandleUpdate(StringHash eventType, VariantMap& eventData); 31 | void HandleTouchUI(StringHash eventType, VariantMap& eventData); 32 | }; 33 | -------------------------------------------------------------------------------- /app/src/main/cpp/LevelManagerEvents.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace LevelManagerEvents { 5 | // Start new level 6 | URHO3D_EVENT(E_SET_LEVEL, SetLevel) 7 | { 8 | URHO3D_PARAM(P_NAME, Name); // string - level object name 9 | URHO3D_PARAM(P_MESSAGE, Message); // string - pop-up message content, can be empty 10 | } 11 | 12 | // Level changing started 13 | URHO3D_EVENT(E_LEVEL_CHANGING_STARTED, LevelChangingStarted) 14 | { 15 | URHO3D_PARAM(P_FROM, From); // string 16 | URHO3D_PARAM(P_TO, To); // string 17 | } 18 | 19 | // When the new level is actually created, before the fade effect goes away 20 | URHO3D_EVENT(E_LEVEL_CHANGING_IN_PROGRESS, LevelChangingInProgress) 21 | { 22 | URHO3D_PARAM(P_FROM, From); // string 23 | URHO3D_PARAM(P_TO, To); // string 24 | } 25 | 26 | // Level changing finished 27 | URHO3D_EVENT(E_LEVEL_CHANGING_FINISHED, LevelChangingFinished) 28 | { 29 | URHO3D_PARAM(P_FROM, From); // string - previous level 30 | URHO3D_PARAM(P_TO, To); // string - new level 31 | } 32 | 33 | // Called before the level is destroyed 34 | URHO3D_EVENT(E_LEVEL_BEFORE_DESTROY, LevelBeforeDestroy) 35 | { 36 | } 37 | } -------------------------------------------------------------------------------- /app/src/main/cpp/Levels/ExitGame.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../BaseLevel.h" 4 | 5 | namespace Levels { 6 | class ExitGame : public BaseLevel 7 | { 8 | URHO3D_OBJECT(ExitGame, BaseLevel); 9 | 10 | public: 11 | ExitGame(Context* context); 12 | virtual ~ExitGame(); 13 | static void RegisterObject(Context* context); 14 | void HandleUpdate(StringHash eventType, VariantMap& eventData); 15 | 16 | protected: 17 | void Init () override; 18 | 19 | private: 20 | void SubscribeToEvents(); 21 | 22 | void CreateUI(); 23 | 24 | Timer timer_; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/cpp/Levels/MainMenu.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "../BaseLevel.h" 5 | #include 6 | 7 | using namespace Urho3D; 8 | 9 | namespace Levels { 10 | 11 | class MainMenu : public BaseLevel 12 | { 13 | URHO3D_OBJECT(MainMenu, BaseLevel); 14 | 15 | public: 16 | MainMenu(Context* context); 17 | ~MainMenu(); 18 | static void RegisterObject(Context* context); 19 | 20 | protected: 21 | void Init () override; 22 | 23 | private: 24 | void CreateScene(); 25 | 26 | void CreateUI(); 27 | 28 | void SubscribeToEvents(); 29 | 30 | void AddButton(const String& buttonName, const String& label, const String& name, const String& eventToCall); 31 | 32 | void HandleUpdate(StringHash eventType, VariantMap& eventData); 33 | 34 | void InitCamera(); 35 | 36 | SharedPtr cameraRotateNode_; 37 | SharedPtr buttonsContainer_; 38 | List> dynamicButtons_; 39 | 40 | Button* CreateButton(const String& text); 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/cpp/Levels/Splash.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../BaseLevel.h" 4 | 5 | namespace Levels { 6 | 7 | class Splash : public BaseLevel 8 | { 9 | URHO3D_OBJECT(Splash, BaseLevel); 10 | 11 | public: 12 | Splash(Context* context); 13 | virtual ~Splash(); 14 | static void RegisterObject(Context* context); 15 | void HandleUpdate(StringHash eventType, VariantMap& eventData); 16 | 17 | protected: 18 | void Init () override; 19 | 20 | private: 21 | void CreateScene(); 22 | 23 | /** 24 | * Create the actual splash screen content 25 | */ 26 | void CreateUI(); 27 | 28 | void SubscribeToEvents(); 29 | 30 | /** 31 | * Show next screen 32 | */ 33 | void HandleEndSplash(); 34 | 35 | /** 36 | * Timer to check splash screen lifetime 37 | */ 38 | Timer timer_; 39 | 40 | /** 41 | * Current logo index 42 | */ 43 | int logoIndex_; 44 | 45 | /** 46 | * List of all the logos that splash screen should show 47 | */ 48 | Vector logos_; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/cpp/Levels/Voxel/ChunkGenerator.h: -------------------------------------------------------------------------------- 1 | #ifdef VOXEL_SUPPORT 2 | #pragma once 3 | #include 4 | #include "../../Generator/PerlinNoise.h" 5 | #include "VoxelDefs.h" 6 | #include "../../Generator/SimplexNoise.h" 7 | 8 | using namespace Urho3D; 9 | 10 | class ChunkGenerator : public Object { 11 | URHO3D_OBJECT(ChunkGenerator, Object); 12 | ChunkGenerator(Context* context); 13 | virtual ~ChunkGenerator(); 14 | 15 | public: 16 | static void RegisterObject(Context* context); 17 | int GetTerrainHeight(const Vector3& blockPosition); 18 | BlockType GetBlockType(const Vector3& blockPosition, int surfaceHeight); 19 | BlockType GetCaveBlockType(const Vector3& blockPosition, BlockType currentBlock); 20 | bool HaveTree(const Vector3& blockPosition); 21 | Biome GetBiomeType(const Vector3& blockPosition); 22 | void SetSeed(int seed); 23 | private: 24 | PerlinNoise perlin_; 25 | SimplexNoise simplexNoise_; 26 | }; 27 | #endif 28 | -------------------------------------------------------------------------------- /app/src/main/cpp/Levels/Voxel/TreeGenerator.h: -------------------------------------------------------------------------------- 1 | #ifdef VOXEL_SUPPORT 2 | #pragma once 3 | #include 4 | #include 5 | #include "VoxelDefs.h" 6 | #include "VoxelEvents.h" 7 | #include "Chunk.h" 8 | 9 | using namespace Urho3D; 10 | 11 | struct TreeNode { 12 | TreeNode(short x, short y, short z, int height, int width, Chunk* ch) : x_(x), y_(y), z_(z), height_(height), width_(width), chunk_(ch) {} 13 | short x_; 14 | short y_; 15 | short z_; 16 | Chunk* chunk_; 17 | int height_; 18 | int width_; 19 | }; 20 | 21 | class TreeGenerator : public Object { 22 | URHO3D_OBJECT(TreeGenerator, Object); 23 | TreeGenerator(Context* context); 24 | virtual ~TreeGenerator(); 25 | 26 | public: 27 | static void RegisterObject(Context* context); 28 | void AddTreeNode(int x, int y, int z, int height, int width, Chunk* chunk); 29 | void Process(); 30 | 31 | private: 32 | void HandleUpdate(StringHash eventType, VariantMap& eventData); 33 | void HandleChunkGenerated(StringHash eventType, VariantMap& eventData); 34 | 35 | std::queue treeBfsQueue_; 36 | std::queue failedTreeBfsQueue_; 37 | Mutex mutex_; 38 | }; 39 | #endif 40 | -------------------------------------------------------------------------------- /app/src/main/cpp/Levels/Voxel/VoxelDefs.h: -------------------------------------------------------------------------------- 1 | #ifdef VOXEL_SUPPORT 2 | #pragma once 3 | #include 4 | 5 | using namespace Urho3D; 6 | 7 | enum BlockSide { 8 | TOP, 9 | BOTTOM, 10 | LEFT, 11 | RIGHT, 12 | FRONT, 13 | BACK 14 | }; 15 | 16 | enum BlockType { 17 | BT_AIR, 18 | BT_STONE, 19 | BT_DIRT, 20 | BT_SAND, 21 | BT_COAL, 22 | BT_TORCH, 23 | BT_WOOD, 24 | BT_TREE_LEAVES, 25 | BT_WATER, 26 | BT_NONE 27 | }; 28 | 29 | enum Biome { 30 | B_GRASS, 31 | B_FOREST, 32 | B_SEA, 33 | B_MOUNTAINS, 34 | B_DESERT, 35 | B_NONE, 36 | }; 37 | 38 | struct VoxelBlock { 39 | BlockType type; 40 | }; 41 | 42 | const int NETWORK_REQUEST_CHUNK = 153; 43 | const int NETWORK_SEND_CHUNK = 154; 44 | const int NETWORK_REQUEST_CHUNK_HIT = 155; 45 | const int NETWORK_REQUEST_CHUNK_ADD = 156; 46 | const int NETWORK_SEND_CHUNK_UPDATE = 157; 47 | #endif 48 | -------------------------------------------------------------------------------- /app/src/main/cpp/Messages/MessageEvents.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace MessageEvents { 5 | URHO3D_EVENT(E_NEW_ACHIEVEMENT, NewAchievement) 6 | { 7 | URHO3D_PARAM(P_MESSAGE, Message); // string - achievement title 8 | URHO3D_PARAM(P_IMAGE, Image); // string - Texture to use for achievement 9 | } 10 | 11 | // Achievement has been unlocked 12 | URHO3D_EVENT(E_ACHIEVEMENT_UNLOCKED, AchievementUnlocked) 13 | { 14 | URHO3D_PARAM(P_MESSAGE, Message); // string - achievement title 15 | } 16 | 17 | // Register new achievement 18 | URHO3D_EVENT(E_ADD_ACHIEVEMENT, AddAchievement) 19 | { 20 | URHO3D_PARAM(P_EVENT, Event); // string - achievement event 21 | URHO3D_PARAM(P_MESSAGE, Message); // string - achievement event 22 | URHO3D_PARAM(P_IMAGE, Image); // string - achievement event 23 | URHO3D_PARAM(P_THRESHOLD, Threshold); // string - achievement event 24 | URHO3D_PARAM(P_PARAMETER_NAME, ParameterName); // string - achievement event 25 | URHO3D_PARAM(P_PARAMETER_VALUE, ParameterValue); // string - achievement event 26 | } 27 | } -------------------------------------------------------------------------------- /app/src/main/cpp/Nakama/NakamaEvents.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace NakamaEvents { 5 | URHO3D_EVENT(E_LOGGED_IN, LoggedIn) { 6 | URHO3D_PARAM(P_TOKEN, Token); 7 | URHO3D_PARAM(P_USER_ID, UserID); 8 | URHO3D_PARAM(P_USERNAME, Username); 9 | URHO3D_PARAM(P_NEW_USER, NewUser); 10 | } 11 | 12 | URHO3D_EVENT(E_LOGIN_FAILED, LoginFailed) { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/cpp/Nakama/NetworkProtocol.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace NakamaProtocol { 5 | static const int MSG_POSITION = 1; 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/cpp/Nakama/PacketHandler.cpp: -------------------------------------------------------------------------------- 1 | #ifdef NAKAMA_SUPPORT 2 | #include 3 | #include 4 | #include "PacketHandler.h" 5 | #include "NetworkProtocol.h" 6 | 7 | using namespace Urho3D; 8 | 9 | void PacketHandler::Handle(const NMatchData& data) 10 | { 11 | MemoryBuffer buffer(data.data.c_str(), data.data.size()); 12 | switch (data.opCode) { 13 | case NakamaProtocol::MSG_POSITION: { 14 | Vector3 position = buffer.ReadVector3(); 15 | URHO3D_LOGINFO("Received MSG_POSITION " + position.ToString()); 16 | break; 17 | } 18 | default: { 19 | URHO3D_LOGWARNINGF("Unknown message received from server: %d", data.opCode); 20 | } 21 | } 22 | URHO3D_LOGINFOF("Received match data %d", data.opCode); 23 | } 24 | #endif 25 | -------------------------------------------------------------------------------- /app/src/main/cpp/Nakama/PacketHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifdef NAKAMA_SUPPORT 3 | #include 4 | 5 | using namespace Nakama; 6 | 7 | class PacketHandler { 8 | public: 9 | void Handle(const NMatchData& data); 10 | }; 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /app/src/main/cpp/Network/NetworkEvents.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace NetworkEvents 5 | { 6 | URHO3D_EVENT(E_REMOTE_CLIENT_ID, RemoteClientId) 7 | { 8 | URHO3D_PARAM(P_NODE_ID, NodeID); 9 | URHO3D_PARAM(P_PLAYER_ID, PlayerID); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/cpp/PackageManager/PackageManager.h: -------------------------------------------------------------------------------- 1 | #ifdef PACKAGE_MANAGER 2 | 3 | #pragma once 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #if !defined(__EMSCRIPTEN__) 10 | #include 11 | #endif 12 | 13 | using namespace Urho3D; 14 | 15 | class PackageManager : public Object 16 | { 17 | URHO3D_OBJECT(PackageManager, Object); 18 | 19 | public: 20 | PackageManager(Context* context); 21 | virtual ~PackageManager(); 22 | static void RegisterObject(Context* context); 23 | 24 | void Init(); 25 | 26 | private: 27 | void SubscribeToEvents(); 28 | void HandleUpdate(StringHash eventType, VariantMap& eventData); 29 | #if !defined(__EMSCRIPTEN__) 30 | SharedPtr httpRequest_; 31 | #endif 32 | String data_; 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /app/src/main/cpp/PackageManager/PackageManagerEvents.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace PackageEvents { 5 | // URHO3D_EVENT(E_SET_STATE_PARAMETER, SetStateParameter) { 6 | // URHO3D_PARAM(P_NAME, Name); // string - parameter name 7 | // URHO3D_PARAM(P_VALUE, Value); // variant - parameter value 8 | // URHO3D_PARAM(P_SAVE, Save); // bool - should we save state when this parameter is set 9 | // } 10 | } -------------------------------------------------------------------------------- /app/src/main/cpp/Player/PlayerEvents.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace PlayerEvents { 5 | URHO3D_EVENT(E_SET_PLAYER_CAMERA_TARGET, SetPlayerCameraTarget) { 6 | URHO3D_PARAM(P_ID, ID); // int - player controller id 7 | URHO3D_PARAM(P_NODE, Node); // pointer to the target node 8 | URHO3D_PARAM(P_DISTANCE, Distance); // float - set camera distance to target 9 | } 10 | 11 | URHO3D_EVENT(E_PLAYER_SCORE_ADD, PlayerScoreAdd) { 12 | URHO3D_PARAM(P_SCORE, Score); // int - score to add 13 | } 14 | 15 | // Let the app know that player scores have been updated 16 | URHO3D_EVENT(E_PLAYER_SCORES_UPDATED, PlayerScoresUpdated) 17 | { 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/cpp/Player/PlayerState.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | using namespace Urho3D; 7 | 8 | class PlayerState : public Component 9 | { 10 | URHO3D_OBJECT(PlayerState, Component); 11 | 12 | public: 13 | explicit PlayerState(Context* context); 14 | ~PlayerState(); 15 | static void RegisterObject(Context* context); 16 | void AddScore(int value); 17 | void SetScore(int value); 18 | int GetScore() const; 19 | 20 | void SetPlayerID(int id); 21 | int GetPlayerID() const; 22 | 23 | void SetPlayerName(const String& name); 24 | const String& GetPlayerName() const; 25 | 26 | void HideLabel(); 27 | 28 | protected: 29 | void OnNodeSet(Node* node) override; 30 | private: 31 | void HandlePlayerScoreAdd(StringHash eventType, VariantMap& eventData); 32 | void HandlePostUpdate(StringHash eventType, VariantMap& eventData); 33 | void OnScoreChanged(); 34 | 35 | int score_{0}; 36 | int playerId_{-1}; 37 | String name_; 38 | /** 39 | * 3D Text player label node 40 | */ 41 | SharedPtr label_; 42 | }; 43 | -------------------------------------------------------------------------------- /app/src/main/cpp/State/State.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | using namespace Urho3D; 8 | 9 | class State : public Object 10 | { 11 | URHO3D_OBJECT(State, Object); 12 | 13 | static void RegisterObject(Context* context); 14 | 15 | public: 16 | State(Context* context); 17 | 18 | virtual ~State(); 19 | 20 | void SetValue(const String& name, const Variant& value, bool save = false); 21 | const Variant& GetValue(const String& name); 22 | 23 | private: 24 | void SubscribeToEvents(); 25 | void Load(); 26 | void Save(); 27 | void HandleSetParameter(StringHash eventType, VariantMap& eventData); 28 | void HandleIncrementParameter(StringHash eventType, VariantMap& eventData); 29 | String fileLocation_; 30 | 31 | VariantMap data_; 32 | }; 33 | -------------------------------------------------------------------------------- /app/src/main/cpp/State/StateEvents.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace StateEvents { 5 | URHO3D_EVENT(E_SET_STATE_PARAMETER, SetStateParameter) { 6 | URHO3D_PARAM(P_NAME, Name); // string - parameter name 7 | URHO3D_PARAM(P_VALUE, Value); // variant - parameter value 8 | URHO3D_PARAM(P_SAVE, Save); // bool - should we save state when this parameter is set 9 | } 10 | 11 | URHO3D_EVENT(E_INCREMENT_STATE_PARAMETER, IncrementStateParameter) { 12 | URHO3D_PARAM(P_NAME, Name); // string - parameter name 13 | URHO3D_PARAM(P_AMOUNT, Amount); // int - by how much we must increment the value 14 | URHO3D_PARAM(P_SAVE, Save); // bool - should we save state when this parameter is set 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/cpp/UI/Achievements/AchievementsWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include "../BaseWindow.h" 6 | 7 | class AchievementsWindow : public BaseWindow 8 | { 9 | URHO3D_OBJECT(AchievementsWindow, BaseWindow); 10 | 11 | public: 12 | AchievementsWindow(Context* context); 13 | 14 | virtual ~AchievementsWindow(); 15 | 16 | virtual void Init() override; 17 | 18 | private: 19 | 20 | virtual void Create() override; 21 | 22 | void SubscribeToEvents(); 23 | 24 | UIElement* CreateSingleLine(); 25 | 26 | Button* CreateItem(const String& image, const String& message, bool completed, int progress, int threshold); 27 | 28 | void HandleAchievementUnlocked(StringHash eventType, VariantMap& eventData); 29 | 30 | SharedPtr baseWindow_; 31 | 32 | /** 33 | * Window title bar 34 | */ 35 | SharedPtr titleBar_; 36 | 37 | SharedPtr listView_; 38 | 39 | SharedPtr activeLine_; 40 | }; 41 | -------------------------------------------------------------------------------- /app/src/main/cpp/UI/BaseWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace Urho3D; 9 | 10 | class BaseWindow : public Object 11 | { 12 | URHO3D_OBJECT(BaseWindow, Object); 13 | public: 14 | BaseWindow(Context* context); 15 | 16 | virtual ~BaseWindow(); 17 | 18 | /** 19 | * Initialize the view 20 | */ 21 | virtual void Init() {} 22 | 23 | /** 24 | * Set the window parameters 25 | */ 26 | void SetData(VariantMap data); 27 | 28 | private: 29 | /** 30 | * Create the UI 31 | */ 32 | virtual void Create() {} 33 | 34 | protected: 35 | 36 | /** 37 | * Get rid of the window 38 | */ 39 | virtual void Dispose() {} 40 | 41 | /** 42 | * Creates transparent Sprite in the back 43 | * All windows should be created as a child for this overlay 44 | */ 45 | Sprite* CreateOverlay(); 46 | 47 | /** 48 | * Transparent overlay object 49 | */ 50 | SharedPtr overlay_; 51 | 52 | /** 53 | * Data which was passed when window was opened 54 | */ 55 | VariantMap data_; 56 | }; 57 | -------------------------------------------------------------------------------- /app/src/main/cpp/UI/NewGameSettings/NewGameSettingsWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include "../BaseWindow.h" 7 | 8 | class NewGameSettingsWindow : public BaseWindow 9 | { 10 | URHO3D_OBJECT(NewGameSettingsWindow, BaseWindow); 11 | 12 | public: 13 | NewGameSettingsWindow(Context* context); 14 | 15 | virtual ~NewGameSettingsWindow(); 16 | 17 | virtual void Init() override; 18 | 19 | protected: 20 | 21 | virtual void Create() override; 22 | 23 | private: 24 | 25 | void SubscribeToEvents(); 26 | 27 | Button* CreateButton(UIElement *parent, const String& text, int width, IntVector2 position); 28 | CheckBox* CreateCheckbox(const String& label); 29 | 30 | void CreateLevelSelection(); 31 | 32 | SharedPtr baseWindow_; 33 | SharedPtr levelSelection_; 34 | SharedPtr startServer_; 35 | SharedPtr connectServer_; 36 | }; 37 | -------------------------------------------------------------------------------- /app/src/main/cpp/UI/Pause/PauseWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "../BaseWindow.h" 6 | 7 | class PauseWindow : public BaseWindow 8 | { 9 | URHO3D_OBJECT(PauseWindow, BaseWindow); 10 | 11 | public: 12 | PauseWindow(Context* context); 13 | 14 | virtual ~PauseWindow(); 15 | 16 | virtual void Init() override; 17 | 18 | protected: 19 | 20 | virtual void Create() override; 21 | 22 | private: 23 | void HandleUpdate(StringHash eventType, VariantMap& eventData); 24 | void SubscribeToEvents(); 25 | 26 | SharedPtr