You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
936 B
54 lines
936 B
package mightypork.rogue.world.entity;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
import mightypork.gamecore.eventbus.events.Updateable;
|
|
import mightypork.gamecore.util.annot.DefaultImpl;
|
|
import mightypork.gamecore.util.ion.IonBundle;
|
|
import mightypork.gamecore.util.ion.IonObjBundled;
|
|
|
|
|
|
/**
|
|
* Abstract entity module<br>
|
|
* Modules make up an entity AI and behavior.
|
|
*
|
|
* @author MightyPork
|
|
*/
|
|
public abstract class EntityModule implements IonObjBundled, Updateable {
|
|
|
|
protected final Entity entity;
|
|
|
|
|
|
public EntityModule(Entity entity)
|
|
{
|
|
this.entity = entity;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return whether the module should be saved into a world file
|
|
*/
|
|
public abstract boolean isModuleSaved();
|
|
|
|
|
|
@Override
|
|
@DefaultImpl
|
|
public void load(IonBundle bundle) throws IOException
|
|
{
|
|
}
|
|
|
|
|
|
@Override
|
|
@DefaultImpl
|
|
public void save(IonBundle bundle) throws IOException
|
|
{
|
|
}
|
|
|
|
|
|
@Override
|
|
@DefaultImpl
|
|
public void update(double delta)
|
|
{
|
|
}
|
|
}
|
|
|