mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-21 16:04:05 +09:00
Actually utilising ActorAI interface to support AIs written in Kotlin as well as in Lua
Former-commit-id: 53901f5a5d53b33c4254091ec507be82289d57fd Former-commit-id: 86ce8d2a646a1564ee5e33ef07c5affb338c028e
This commit is contained in:
@@ -2,6 +2,7 @@ package net.torvald.terrarum.gameactors
|
||||
|
||||
import net.torvald.spriteanimation.SpriteAnimation
|
||||
import net.torvald.terrarum.gameactors.ActorHumanoid
|
||||
import net.torvald.terrarum.gameactors.ai.LuaAIWrapper
|
||||
import net.torvald.terrarum.mapdrawer.FeaturesDrawer
|
||||
|
||||
/**
|
||||
@@ -11,9 +12,12 @@ object PlayerBuilderCynthia {
|
||||
|
||||
operator fun invoke(): ActorWithSprite {
|
||||
//val p: Player = Player(GameDate(100, 143)) // random value thrown
|
||||
val p: HumanoidNPC = HumanoidNPC("/net/torvald/terrarum/gameactors/ai/scripts/PokemonNPCAI.lua",
|
||||
val p: HumanoidNPC = HumanoidNPC(
|
||||
LuaAIWrapper("/net/torvald/terrarum/gameactors/ai/scripts/PokemonNPCAI.lua"),
|
||||
GameDate(100, 143)) // random value thrown
|
||||
InjectCreatureRaw(p.actorValue, "CreatureHuman.json")
|
||||
(p.ai as LuaAIWrapper).attachActor(p)
|
||||
|
||||
|
||||
p.actorValue[AVKey.__PLAYER_QUICKBARSEL] = 0
|
||||
p.actorValue[AVKey.NAME] = "Cynthia"
|
||||
|
||||
Reference in New Issue
Block a user