mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 18:44:05 +09:00
todo weather example
This commit is contained in:
28
assets/mods/basegame/weathers/WeatherGeneric2.json
Normal file
28
assets/mods/basegame/weathers/WeatherGeneric2.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"skyboxGradColourMap": "generic_skybox.tga",
|
||||||
|
"daylightClut": "clut_daylight.tga",
|
||||||
|
"classification": "generic",
|
||||||
|
"cloudChance": 1600,
|
||||||
|
"cloudGamma": [0.48, 2.4],
|
||||||
|
"cloudGammaVariance": [0.1, 0.1],
|
||||||
|
"windSpeed": 0.25,
|
||||||
|
"windSpeedVariance": 1.0,
|
||||||
|
"clouds": {
|
||||||
|
"cumulonimbus": {
|
||||||
|
"filename": "cloud_large.png", "tw": 2048, "th": 1024, "probability": 0.02,
|
||||||
|
"baseScale": 2.0, "scaleVariance": 0.3333333,
|
||||||
|
"altLow": 80, "altHigh": 120
|
||||||
|
},
|
||||||
|
"cumulus": {
|
||||||
|
"filename": "cloud_normal.png", "tw": 1024, "th": 512, "probability": 0.05,
|
||||||
|
"baseScale": 1.0, "scaleVariance": 0.6,
|
||||||
|
"altLow": 80, "altHigh": 800
|
||||||
|
},
|
||||||
|
"altocumulus": {
|
||||||
|
"filename": "cloud_normal.png", "tw": 1024, "th": 512, "probability": 1.0,
|
||||||
|
"baseScale": 0.5, "scaleVariance": 0.1,
|
||||||
|
"altLow": 1600, "altHigh": 2400
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"__comment__": "Make a texture for altocumulus so that this weather can be realised with less than 1000 sprites"
|
||||||
|
}
|
||||||
@@ -39,11 +39,8 @@ class BasicDebugInfoWindow : UICanvas() {
|
|||||||
private var xdelta = 0.0
|
private var xdelta = 0.0
|
||||||
private var ydelta = 0.0
|
private var ydelta = 0.0
|
||||||
|
|
||||||
private val ingame: IngameInstance?
|
private var ingame: IngameInstance? = null
|
||||||
get() = Terrarum.ingame
|
private var world: GameWorld? = null
|
||||||
|
|
||||||
private val world: GameWorld?
|
|
||||||
get() = Terrarum.ingame?.world
|
|
||||||
|
|
||||||
private val icons = TextureRegionPack(Gdx.files.internal("assets/graphics/gui/debug_window_symbols.tga"), 21, 26)
|
private val icons = TextureRegionPack(Gdx.files.internal("assets/graphics/gui/debug_window_symbols.tga"), 21, 26)
|
||||||
private val back = Texture(Gdx.files.internal("assets/graphics/gui/debug_window_background.tga"))
|
private val back = Texture(Gdx.files.internal("assets/graphics/gui/debug_window_background.tga"))
|
||||||
@@ -69,6 +66,11 @@ class BasicDebugInfoWindow : UICanvas() {
|
|||||||
|
|
||||||
private var showTimers = false
|
private var showTimers = false
|
||||||
|
|
||||||
|
override fun show() {
|
||||||
|
ingame = Terrarum.ingame
|
||||||
|
world = ingame?.world
|
||||||
|
}
|
||||||
|
|
||||||
override fun updateUI(delta: Float) {
|
override fun updateUI(delta: Float) {
|
||||||
val player = ingame?.actorNowPlaying
|
val player = ingame?.actorNowPlaying
|
||||||
val hitbox = player?.hitbox
|
val hitbox = player?.hitbox
|
||||||
|
|||||||
Reference in New Issue
Block a user