basegame: added an Interface that marks the actor as 'not to be serialised when saving the world'

This commit is contained in:
minjaesong
2022-09-02 23:26:59 +09:00
parent 760188ebe9
commit d6144d52d2
5 changed files with 13 additions and 19 deletions

View File

@@ -13,7 +13,7 @@ import kotlin.math.floor
/**
* Used as construction markers and fixture ghost images
*/
class BlockMarkerActor : ActorWithBody(Actor.RenderOrder.OVERLAY, physProp = PhysProperties.MOBILE_OBJECT) {
class BlockMarkerActor : ActorWithBody(Actor.RenderOrder.OVERLAY, physProp = PhysProperties.MOBILE_OBJECT), NoSerialise {
private val defaultSize = 16.0

View File

@@ -0,0 +1,6 @@
package net.torvald.terrarum.gameactors
/**
* Created by minjaesong on 2022-09-02.
*/
interface NoSerialise

View File

@@ -11,7 +11,7 @@ import net.torvald.terrarum.gameitems.ItemID
*
* Created by minjaesong on 2021-07-30.
*/
class WireActor : ActorWithBody {
class WireActor : ActorWithBody, NoSerialise {
companion object {
val WIRE_NEARBY = arrayOf(