mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-17 05:54:05 +09:00
working filesystem (tested: mkdir, open, file:writeLine/close, cp, mv, rm)
Former-commit-id: ce3fcae801291f770ed19dce4616b8ab61556f9b Former-commit-id: 999d637fac1c1c6a9ff855ebb8f7f37336519771
This commit is contained in:
34
src/net/torvald/terrarum/gameactors/FixtureBase.kt
Normal file
34
src/net/torvald/terrarum/gameactors/FixtureBase.kt
Normal file
@@ -0,0 +1,34 @@
|
||||
package net.torvald.terrarum.gameactors
|
||||
|
||||
import net.torvald.spriteanimation.SpriteAnimation
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-06-17.
|
||||
*/
|
||||
open class FixtureBase : ActorWithBody() {
|
||||
/**
|
||||
* 0: Open
|
||||
* 1: Blocked
|
||||
* 2: Platform; can be stood on, press DOWN to go down. Also allows other blocks can be places on top of it (e.g. torch)
|
||||
* 3: Wall_left; blocks rightward movement
|
||||
* 4: Wall_right: blocks leftward movement
|
||||
* For example, flag of 4 is good for tables; player can stand on, which means
|
||||
* downward movement is blocked within the fixtures' AABB.
|
||||
*/
|
||||
var collisionFlag: Int = 0
|
||||
|
||||
/**
|
||||
* Normally if player is standing on the fixtures (with flag 2 -- COLLISION_PLATFORM),
|
||||
* pressing DOWN wiil allow player to get down.
|
||||
* Setting this flag TRUE will block such movement (player cannot get down)
|
||||
*/
|
||||
var cannotPassThru = false
|
||||
|
||||
companion object {
|
||||
val COLLISION_OPEN = 0
|
||||
val COLLISION_BLOCKED = 1
|
||||
val COLLISION_PLATFORM = 2
|
||||
val COLLISION_WALL_LEFT = 3
|
||||
val COLLISION_WALL_RIGHT = 4
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user