mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
24 lines
542 B
Kotlin
24 lines
542 B
Kotlin
package net.torvald.terrarum.gameactors
|
|
|
|
import net.torvald.terrarum.gameworld.GameWorld
|
|
|
|
|
|
/**
|
|
* Created by minjaesong on 16-02-05.
|
|
*/
|
|
|
|
object CreatureBuilder {
|
|
|
|
/**
|
|
* @Param jsonFileName with extension
|
|
*/
|
|
operator fun invoke(world: GameWorld, module: String, jsonFileName: String): ActorWithPhysics {
|
|
val actor = ActorWithPhysics(world, Actor.RenderOrder.MIDDLE)
|
|
InjectCreatureRaw(actor.actorValue, module, jsonFileName)
|
|
|
|
|
|
actor.actorValue[AVKey.__ACTION_TIMER] = 0.0
|
|
|
|
return actor
|
|
}
|
|
} |