mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 00:38:18 +00:00
Port Area plugin to Kotlin
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package org.apollo.game.plugins.area
|
||||
|
||||
/**
|
||||
* Defines an area action using the DSL.
|
||||
*/
|
||||
fun action(@Suppress("UNUSED_PARAMETER") name: String, builder: ActionBuilder.() -> Unit) {
|
||||
val listener = ActionBuilder()
|
||||
builder(listener)
|
||||
|
||||
actions.add(listener.build())
|
||||
}
|
||||
|
||||
/**
|
||||
* The [Set] of ([Area], [AreaAction]) [Pair]s.
|
||||
*/
|
||||
val actions = mutableSetOf<Pair<Area, AreaAction>>()
|
||||
|
||||
class AreaAction(val entrance: AreaListener, val inside: AreaListener, val exit: AreaListener)
|
||||
Reference in New Issue
Block a user