circular (octagon actually) propagation of light

Former-commit-id: 1e67a3284ea298a0d8f27309d9d8ca800a8525c8
Former-commit-id: a5067df80d1053ceec6d78b6fda6cf0afa3c286c
This commit is contained in:
Song Minjae
2017-01-02 14:08:24 +09:00
parent 0c2cb48135
commit ae97310bf7
3 changed files with 43 additions and 55 deletions

View File

@@ -266,6 +266,8 @@ constructor() : BasicGameState() {
}
private fun changePossession(refid: Int) {
// TODO prevent possessing other player on multiplayer
if (!hasActor(refid)) {
throw IllegalArgumentException("No such actor in actorContainer: $refid")
}
@@ -309,12 +311,19 @@ constructor() : BasicGameState() {
/////////////////
// --> Change of blend mode <-- introduced by ActorWithBody //
actorContainer.forEach { actor ->
if (actor is ActorWithBody && actor.inScreen() && actor !is Player) {
if (actor is ActorWithBody && actor.inScreen() && actor !is Player && !actor.drawTopmost) {
actor.drawBody(gc, worldDrawFrameBuffer.graphics)
}
}
// --> Change of blend mode <-- introduced by ActorWithBody //
player.drawBody(gc, worldDrawFrameBuffer.graphics)
// --> Change of blend mode <-- introduced by ActorWithBody //
actorContainer.forEach { actor ->
if (actor is ActorWithBody && actor.inScreen() && actor !is Player && actor.drawTopmost) {
actor.drawBody(gc, worldDrawFrameBuffer.graphics)
}
}
// --> Change of blend mode <-- introduced by ActorWithBody //
/////////////////////////////