mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 20:14:05 +09:00
actor AI from Lua script
Former-commit-id: 184160efc59c4f846f1cc154fe3e60d21b301ee3 Former-commit-id: 4e228542975ea52945a597b7ca1bc06b407c3be7
This commit is contained in:
@@ -298,11 +298,13 @@ constructor() : BasicGameState() {
|
||||
/////////////////
|
||||
// draw actors //
|
||||
/////////////////
|
||||
// --> Change of blend mode <-- introduced by ActorWithBody //
|
||||
actorContainer.forEach { actor ->
|
||||
if (actor is ActorWithBody && actor.inScreen() && actor !is Player) {
|
||||
actor.drawBody(gc, worldDrawFrameBuffer.graphics)
|
||||
}
|
||||
}
|
||||
// --> Change of blend mode <-- introduced by ActorWithBody //
|
||||
player.drawBody(gc, worldDrawFrameBuffer.graphics)
|
||||
|
||||
|
||||
@@ -311,32 +313,37 @@ constructor() : BasicGameState() {
|
||||
/////////////////////////////
|
||||
LightmapRenderer.renderLightMap()
|
||||
|
||||
// --> blendMul() <-- by MapCamera.renderFront
|
||||
MapCamera.renderFront(gc, worldDrawFrameBuffer.graphics)
|
||||
// --> blendNormal() <-- by MapCamera.renderFront
|
||||
MapDrawer.render(gc, worldDrawFrameBuffer.graphics)
|
||||
|
||||
|
||||
blendMul()
|
||||
// --> blendMul() <-- by MapCamera.drawEnvOverlay
|
||||
MapDrawer.drawEnvOverlay(worldDrawFrameBuffer.graphics)
|
||||
|
||||
if (!KeyToggler.isOn(KEY_LIGHTMAP_RENDER)) blendMul() else blendNormal()
|
||||
if (!KeyToggler.isOn(KEY_LIGHTMAP_RENDER)) blendMul()
|
||||
else blendNormal()
|
||||
LightmapRenderer.draw(worldDrawFrameBuffer.graphics)
|
||||
blendNormal()
|
||||
|
||||
|
||||
//////////////////////
|
||||
// draw actor glows //
|
||||
//////////////////////
|
||||
// --> blendLightenOnly() <-- introduced by ActorWithBody //
|
||||
actorContainer.forEach { actor ->
|
||||
if (actor is ActorWithBody && actor.inScreen() && actor !is Player) {
|
||||
actor.drawGlow(gc, worldDrawFrameBuffer.graphics)
|
||||
}
|
||||
}
|
||||
// --> blendLightenOnly() <-- introduced by ActorWithBody //
|
||||
player.drawGlow(gc, worldDrawFrameBuffer.graphics)
|
||||
|
||||
|
||||
////////////////////////
|
||||
// debug informations //
|
||||
////////////////////////
|
||||
blendNormal()
|
||||
// draw reference ID if debugWindow is open
|
||||
if (debugWindow.isVisible) {
|
||||
actorContainer.forEachIndexed { i, actor ->
|
||||
|
||||
Reference in New Issue
Block a user