Bladeren bron

First pass at updating changes to AppState.

mitm001 8 jaren geleden
bovenliggende
commit
55bd903abd
1 gewijzigde bestanden met toevoegingen van 16 en 0 verwijderingen
  1. 16 0
      src/docs/asciidoc/jme3/advanced/application_states.adoc

+ 16 - 0
src/docs/asciidoc/jme3/advanced/application_states.adoc

@@ -262,3 +262,19 @@ public class MyAppState extends AbstractAppState {
 }
 
 ----
+
+
+
+=== The Future of AppState
+
+
+There are plans to change the SimpleApplication in the future. Sometime back it was decided that we should really refactor the Application class. SimpleApplication especially is a mess of 'magic' protected fields that on the one hand makes it really easy to slam some simple one-class application together, but on the other hand does new users no favors because they have no idea where 'cam' and 'assetManager' come from. Unfortunately, lots of code refers to Application and it's tough to change... especially the app states.
+
+So, we hatched a plan to convert the Application class to an interface. This would give us some freedom to iterate on a new set of application base classes. You can read about the changes link:https://hub.jmonkeyengine.org/t/jmonkeyengine-3-1-alpha-4-released/35478[here]. As said before we are envisioning a better design, that is not enforced today, but that is already usable. If you look at SimpleApplication default constructor you will understand how it works. 
+
+[source,java]
+----
+public SimpleApplication() {
+    this(new StatsAppState(), new FlyCamAppState(), new AudioListenerState(), new DebugKeysAppState());
+}
+----