Files
Terrarum/src/net/torvald/terrarum/gameactors/AIControlled.kt
Song Minjae 5daf424554 Actually utilising ActorAI interface to support AIs written in Kotlin as well as in Lua
Former-commit-id: 53901f5a5d53b33c4254091ec507be82289d57fd
Former-commit-id: 86ce8d2a646a1564ee5e33ef07c5affb338c028e
2017-02-04 22:53:36 +09:00

23 lines
632 B
Kotlin

package net.torvald.terrarum.gameactors
import net.torvald.terrarum.gameactors.ai.ActorAI
/**
* Note: AI-controlled actor must be 'Controllable'
*
* Created by minjaesong on 16-01-31.
*/
interface AIControlled {
val ai: ActorAI
fun moveLeft(amount: Float = 1f)
fun moveRight(amount: Float = 1f)
fun moveUp(amount: Float = 1f)
fun moveDown(amount: Float = 1f)
fun moveJump(amount: Float = 1f)
/** fly toward arbitrary angle WARNING: the map is looped! */
fun moveTo(bearing: Double)
/** fly toward arbitrary coord WARNING: the map is looped! */
fun moveTo(toX: Double, toY: Double)
}