diff --git a/natyengine/src/main/java/com/nativegame/natyengine/entity/modifier/DurationModifier.java b/natyengine/src/main/java/com/nativegame/natyengine/entity/modifier/DurationModifier.java index ff78878..225af6d 100644 --- a/natyengine/src/main/java/com/nativegame/natyengine/entity/modifier/DurationModifier.java +++ b/natyengine/src/main/java/com/nativegame/natyengine/entity/modifier/DurationModifier.java @@ -1,13 +1,13 @@ package com.nativegame.natyengine.entity.modifier; -import com.nativegame.natyengine.entity.Entity; +import com.nativegame.natyengine.entity.Updatable; import com.nativegame.natyengine.util.modifier.BaseModifier; /** * Created by Oscar Liang on 2022/12/11 */ -public class DurationModifier extends BaseModifier { +public class DurationModifier extends BaseModifier { private boolean mIsAutoRemove = false; @@ -39,22 +39,22 @@ public void setAutoRemove(boolean autoRemove) { // Overriding methods //-------------------------------------------------------- @Override - protected void onStartModifier(Entity entity) { + protected void onStartModifier(Updatable entity) { } @Override - protected void onUpdateModifier(Entity entity, float durationPercentage) { + protected void onUpdateModifier(Updatable entity, float durationPercentage) { } @Override - protected void onEndModifier(Entity entity) { + protected void onEndModifier(Updatable entity) { if (mIsAutoRemove) { entity.removeFromGame(); } } @Override - protected void onResetModifier(Entity entity) { + protected void onResetModifier(Updatable entity) { } //======================================================== diff --git a/natyengine/src/main/java/com/nativegame/natyengine/entity/shape/Shape.java b/natyengine/src/main/java/com/nativegame/natyengine/entity/shape/Shape.java index 833ff37..065e97c 100644 --- a/natyengine/src/main/java/com/nativegame/natyengine/entity/shape/Shape.java +++ b/natyengine/src/main/java/com/nativegame/natyengine/entity/shape/Shape.java @@ -4,12 +4,13 @@ import com.nativegame.natyengine.camera.Camera; import com.nativegame.natyengine.entity.Drawable; +import com.nativegame.natyengine.entity.Updatable; /** * Created by Oscar Liang on 2022/12/11 */ -public interface Shape extends Drawable { +public interface Shape extends Updatable, Drawable { Camera.CoordinateType getCoordinateType();