actor AI from Lua script

Former-commit-id: 184160efc59c4f846f1cc154fe3e60d21b301ee3
Former-commit-id: 4e228542975ea52945a597b7ca1bc06b407c3be7
This commit is contained in:
Song Minjae
2016-12-26 23:55:54 +09:00
parent d0109a88af
commit 35a723ee0f
15 changed files with 132 additions and 95 deletions

View File

@@ -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 ->