mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 13:04:05 +09:00
particles when actors collide the world
This commit is contained in:
@@ -58,7 +58,7 @@ open class DroppedItem : ActorWithBody {
|
||||
|
||||
isVisible = true
|
||||
|
||||
avBaseMass = (ItemCodex[itemID]?.mass ?: 2.0).coerceAtMost(2.0)
|
||||
avBaseMass = ((ItemCodex[itemID]?.mass) ?: 2.0).coerceAtLeast(2.0)
|
||||
|
||||
actorValue[AVKey.SCALE] = ItemCodex[itemID]?.scale ?: 1.0
|
||||
|
||||
@@ -84,9 +84,18 @@ open class DroppedItem : ActorWithBody {
|
||||
externalV.set(spawnVelo)
|
||||
}
|
||||
|
||||
actorValue.set(AVKey.FALLDAMPENMULT, 0.1)
|
||||
|
||||
printdbg(this, "DroppedItem with itemID '${itemID}'")
|
||||
}
|
||||
|
||||
|
||||
override fun reload() {
|
||||
super.reload()
|
||||
actorValue.set(AVKey.FALLDAMPENMULT, 0.1)
|
||||
}
|
||||
|
||||
|
||||
override fun drawBody(batch: SpriteBatch) {
|
||||
// deserialiser won't call setter of the fields
|
||||
if (visualItemID == "") {
|
||||
|
||||
Reference in New Issue
Block a user