mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 12:34:05 +09:00
controlling part of Player moved to ActorHumanoid to alleviate the potential pain on your arse when implementing any NPCs
Former-commit-id: 33f5dba5becef6d60e1413bb8085eeaa0673a345 Former-commit-id: 8c5a3ad7a9d8565908829798110ade8f294c8d44
This commit is contained in:
@@ -3,6 +3,7 @@ package net.torvald.terrarum
|
||||
import net.torvald.imagefont.GameFontBase
|
||||
import net.torvald.terrarum.audio.AudioResourceLibrary
|
||||
import net.torvald.terrarum.concurrent.ThreadPool
|
||||
import net.torvald.terrarum.console.ActorHumanoid
|
||||
import net.torvald.terrarum.gameactors.*
|
||||
import net.torvald.terrarum.console.Authenticator
|
||||
import net.torvald.terrarum.console.CommandDict
|
||||
@@ -59,7 +60,7 @@ constructor() : BasicGameState() {
|
||||
lateinit var notifier: UIHandler
|
||||
|
||||
lateinit internal var playerWrapper: AnyPlayer
|
||||
internal val player: HistoricalFigure // currently POSSESSED actor :)
|
||||
internal val player: ActorHumanoid // currently POSSESSED actor :)
|
||||
get() = playerWrapper.actor
|
||||
|
||||
//private var GRADIENT_IMAGE: Image? = null
|
||||
@@ -251,13 +252,13 @@ constructor() : BasicGameState() {
|
||||
throw IllegalArgumentException("No such actor in actorContainer: $refid")
|
||||
}
|
||||
|
||||
playerWrapper = AnyPlayer(getActorByID(refid) as HistoricalFigure)
|
||||
playerWrapper = AnyPlayer(getActorByID(refid) as ActorHumanoid)
|
||||
WorldSimulator(world, player, UPDATE_DELTA)
|
||||
}
|
||||
|
||||
private fun setAppTitle() {
|
||||
Terrarum.appgc.setTitle(
|
||||
"${Terrarum.NAME}" +
|
||||
Terrarum.NAME +
|
||||
" — F: ${Terrarum.appgc.fps} (${Terrarum.TARGET_INTERNAL_FPS})" +
|
||||
" — M: ${Terrarum.memInUse}M / ${Terrarum.totalVMMem}M")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user