Testing out JmonkeyEngine to make a game in Scala with Akka Actors within a pure FP layer
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.

37 lines
847 B

4 years ago
4 years ago
  1. package wow.doge.mygame.game.appstates;
  2. import com.jme3.app.state.AbstractAppState;
  3. import com.simsilica.es.EntityData;
  4. import com.simsilica.es.base.DefaultEntityData;
  5. import com.jme3.app.state.BaseAppState;
  6. import com.jme3.app.Application;
  7. public class EntityDataState extends BaseAppState {
  8. private EntityData entityData;
  9. public EntityDataState() {
  10. this(new DefaultEntityData());
  11. }
  12. public EntityDataState(EntityData ed) {
  13. this.entityData = ed;
  14. }
  15. public EntityData getEntityData() {
  16. return entityData;
  17. }
  18. public void onEnable() {
  19. }
  20. public void onDisable() {
  21. }
  22. // @Override
  23. public void cleanup(Application application) {
  24. entityData.close();
  25. entityData = null; // cannot be reused
  26. }
  27. public void initialize(Application application) {
  28. }
  29. }