mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 04:54:05 +09:00
tiles with light level <= 1 will be rendered as black square, phys support for non-self-moving bodies (e.g. balls)
Former-commit-id: 5611e2d89f4601e57d014c45f0479600778217f6 Former-commit-id: d900c0733a6d1dcbd9aaed8e9f7f1671c3866624
This commit is contained in:
@@ -40,6 +40,7 @@ object WeatherMixer {
|
||||
lateinit var mixedWeather: BaseModularWeather
|
||||
|
||||
val globalLightNow = Color(0)
|
||||
private val world = Terrarum.ingame.world
|
||||
|
||||
// Weather indices
|
||||
const val WEATHER_GENERIC = "generic"
|
||||
@@ -90,9 +91,17 @@ object WeatherMixer {
|
||||
)
|
||||
Terrarum.ingame.addParticle(rainParticle)
|
||||
}
|
||||
globalLightNow.set(getGlobalLightOfTime(world.time.elapsedSeconds).darker(0.3f))
|
||||
}
|
||||
}
|
||||
|
||||
private fun Color.set(other: Color) {
|
||||
this.r = other.r
|
||||
this.g = other.g
|
||||
this.b = other.b
|
||||
this.a = other.a
|
||||
}
|
||||
|
||||
fun render(g: Graphics) {
|
||||
|
||||
// we will not care for nextSkybox for now
|
||||
|
||||
Reference in New Issue
Block a user