This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlin.reflect.KClass | |
data class Subscription<T : Any>(val type: KClass<T>, val priority: Int, val unit: (Any) -> Unit) | |
object EventBus { | |
var subscriptions = ArrayList<Subscription<*>>() | |
@Suppress("UNCHECKED_CAST") | |
inline fun <reified T : Any> subscribe(priority: Int = 0, noinline unit: (T) -> Unit) { | |
subscriptions += Subscription(T::class, priority, unit as (Any) -> Unit) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Computer Information: | |
Manufacturer: ASUS | |
Model: All Series | |
Form Factor: Desktop | |
No Touch Input Detected | |
Processor Information: | |
CPU Vendor: GenuineIntel | |
CPU Brand: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz | |
CPU Family: 0x6 |