slight elaboration on world wire changed event

This commit is contained in:
minjaesong
2021-08-03 13:39:08 +09:00
parent 7624e37bda
commit 1ae3e34392
3 changed files with 13 additions and 7 deletions

View File

@@ -582,8 +582,9 @@ inline fun printStackTrace(obj: Any) = printStackTrace(obj, System.out) // becau
fun printStackTrace(obj: Any, out: PrintStream = System.out) {
if (AppLoader.IS_DEVELOPMENT_BUILD) {
Thread.currentThread().stackTrace.forEach {
out.println("[${obj.javaClass.simpleName}] ... $it")
Thread.currentThread().stackTrace.forEachIndexed { index, it ->
if (index >= 3)
out.println("[${obj.javaClass.simpleName}] ... $it")
}
}
}
@@ -631,4 +632,9 @@ class UIContainer {
interface Id_UICanvasNullable {
fun get(): UICanvas?
}
}
// haskell-inspired array selectors
// head and last use first() and last()
fun <T> Array<T>.tail() = this.sliceArray(1 until this.size)
fun <T> Array<T>.init() = this.sliceArray(0 until this.lastIndex)