mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 11:34:05 +09:00
still have no idea how to make this work
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
package net.torvald.terrarum.modulebasegame.gameactors
|
||||
|
||||
import net.torvald.terrarum.TerrarumAppConfiguration.TILE_SIZE
|
||||
import net.torvald.terrarum.gameactors.ActorID
|
||||
import net.torvald.terrarum.gameactors.ActorWithBody
|
||||
import net.torvald.terrarum.gameactors.PhysProperties
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2022-02-28.
|
||||
*/
|
||||
open class ActorMovingPlatform() : ActorWithBody() {
|
||||
|
||||
protected var tilewiseWidth = 3
|
||||
protected val actorsRiding = ArrayList<ActorID>() // saving actorID due to serialisation issues
|
||||
|
||||
init {
|
||||
physProp = PhysProperties.PHYSICS_OBJECT
|
||||
|
||||
setHitboxDimension(TILE_SIZE * tilewiseWidth, TILE_SIZE, 0, 0)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make the actor its externalV controlled by this platform
|
||||
*/
|
||||
fun mount(actor: ActorWithBody) {
|
||||
actorsRiding.add(actor.referenceID)
|
||||
}
|
||||
|
||||
/**
|
||||
* Make the actor its externalV no longer controlled by this platform
|
||||
*/
|
||||
fun dismount(actor: ActorWithBody) {
|
||||
actorsRiding.remove(actor.referenceID)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user