mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-08 04:41:51 +09:00
more wires moved from work_files into assets
This commit is contained in:
@@ -58,7 +58,7 @@ open class ActorWithBody(renderOrder: RenderOrder, val physProp: PhysProperties)
|
||||
|
||||
var drawMode = BlendMode.NORMAL
|
||||
|
||||
open var hasMoved: Boolean = false
|
||||
open var isStationary: Boolean = true
|
||||
protected set
|
||||
open var tooltipText: String? = null // null: display nothing
|
||||
val mouseUp: Boolean
|
||||
@@ -499,7 +499,7 @@ open class ActorWithBody(renderOrder: RenderOrder, val physProp: PhysProperties)
|
||||
|
||||
}
|
||||
|
||||
hasMoved = (oldHitbox != hitbox)
|
||||
isStationary = (hitbox - oldHitbox).magnitudeSquared < PHYS_EPSILON_VELO
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,6 +21,8 @@ open class DroppedItem(private val itemID: ItemID, topLeftX: Int, topLeftY: Int)
|
||||
|
||||
private val textureRegion = ItemCodex.getItemImage(itemID)
|
||||
|
||||
var itemCount = 1
|
||||
|
||||
init {
|
||||
if (itemID.startsWith("actor@"))
|
||||
throw RuntimeException("Attempted to create DroppedItem actor of a real actor; the real actor must be dropped instead.")
|
||||
@@ -86,5 +88,7 @@ open class DroppedItem(private val itemID: ItemID, topLeftX: Int, topLeftY: Int)
|
||||
|
||||
override fun update(delta: Float) {
|
||||
super.update(delta)
|
||||
|
||||
// TODO merge into the already existing droppeditem with isStationary==true if one is detected
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user