un-hardcode fog config
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package gay.pizza.CavesOfJolk
|
||||
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g3d.Attribute
|
||||
import com.badlogic.gdx.graphics.g3d.Attributes
|
||||
import com.badlogic.gdx.math.MathUtils
|
||||
import com.badlogic.gdx.math.Vector2
|
||||
import ktx.math.div
|
||||
@ -58,3 +60,7 @@ fun Color.mix(rhs: Color, x: Float) = Color(
|
||||
MathUtils.lerp(this.g, rhs.g, x),
|
||||
MathUtils.lerp(this.b, rhs.b, x),
|
||||
MathUtils.lerp(this.a, rhs.a, x))
|
||||
|
||||
//FIXME: find some way to get rid of these warnings
|
||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER", "UNCHECKED_CAST")
|
||||
fun <T: Attribute> Attributes.get(type: Long) = get(type) as? T
|
||||
|
Reference in New Issue
Block a user