rain megaparticle experiment

This commit is contained in:
minjaesong
2017-12-18 20:45:32 +09:00
parent c5fa83b2f4
commit 941d9fa107
16 changed files with 286 additions and 69 deletions

View File

@@ -815,6 +815,16 @@ infix fun Color.minus(other: Color) = Color( // don't turn into an operator!
fun Int.toHex() = this.toLong().and(0xFFFFFFFF).toString(16).padStart(8, '0').toUpperCase()
fun MutableList<Any>.shuffle() {
for (i in this.size - 1 downTo 1) {
val rndIndex = (Math.random() * (i + 1)).toInt()
val t = this[rndIndex]
this[rndIndex] = this[i]
this[i] = t
}
}
val ccW = GameFontBase.toColorCode(0xFFFF)
val ccY = GameFontBase.toColorCode(0xFE8F)