mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 22:44:04 +09:00
Former-commit-id: 20ca0a8e80f0712c4a3d6a21ee9ae5f15c46c406 Former-commit-id: 2f1cfc2c9b60981053e928a3e7b07117d3b18919
42 lines
1.1 KiB
Kotlin
42 lines
1.1 KiB
Kotlin
package net.torvald.terrarum.gameactors
|
|
|
|
import net.torvald.spriteanimation.SpriteAnimation
|
|
import net.torvald.terrarum.gameactors.ActorHumanoid
|
|
import net.torvald.terrarum.gameactors.ai.scripts.PokemonNPCAI
|
|
import net.torvald.terrarum.mapdrawer.MapDrawer
|
|
|
|
/**
|
|
* Created by minjaesong on 16-03-25.
|
|
*/
|
|
object PlayerBuilderCynthia {
|
|
|
|
operator fun invoke(): ActorWithBody {
|
|
//val p: Player = Player(GameDate(100, 143)) // random value thrown
|
|
val p: HumanoidNPC = HumanoidNPC(PokemonNPCAI(), GameDate(100, 143)) // random value thrown
|
|
InjectCreatureRaw(p.actorValue, "CreatureHuman.json")
|
|
|
|
p.actorValue[AVKey.__PLAYER_QUICKBARSEL] = 0
|
|
p.actorValue[AVKey.NAME] = "Cynthia"
|
|
|
|
|
|
p.makeNewSprite(26, 42)
|
|
p.sprite!!.setSpriteImage("assets/graphics/sprites/test_player_2.png")
|
|
p.sprite!!.setDelay(200)
|
|
p.sprite!!.setRowsAndFrames(1, 1)
|
|
|
|
p.setHitboxDimension(15, p.actorValue.getAsInt(AVKey.BASEHEIGHT) ?: ActorHumanoid.BASE_HEIGHT, 9, 0)
|
|
|
|
p.setPosition(4096.0 * MapDrawer.TILE_SIZE, 300.0 * MapDrawer.TILE_SIZE)
|
|
|
|
|
|
|
|
|
|
p.referenceID = 12345678
|
|
|
|
|
|
|
|
return p
|
|
}
|
|
|
|
|
|
} |