diff --git a/build.properties b/build.properties index c833f92..4addddc 100644 --- a/build.properties +++ b/build.properties @@ -1,7 +1,7 @@ project.name=Demo01 project.title=Demo01 project.version=1.0.0 -project.main.class=com.snapgames.apps.Demo01Frame +project.main.class=com.snapgames.apps.desktop.game.GameApp project.javadoc.classpath=com.snapgames.apps project.javadoc.packages=-group "Demo01" com.snapgames.apps project.author.name=Frédéric Delorme diff --git a/src/docs/02-core.md b/src/docs/02-core.md index d7d769f..087df6e 100644 --- a/src/docs/02-core.md +++ b/src/docs/02-core.md @@ -102,7 +102,7 @@ To use the `Demo01Frame` class, create an instance of it and add it to a JFrame: ```java public class GameApp { public static void main(String[] args) { - JFrame frame = new JFrame("Demo01Frame Game"); + JFrame frame = new JFrame("GameApp Game"); Demo01Frame demo = new Demo01Frame(); frame.add(demo); frame.setSize(800, 600); diff --git a/src/docs/resources/Demo01Frame_structure.puml b/src/docs/resources/Demo01Frame_structure.puml index b7a73f3..81c859b 100644 --- a/src/docs/resources/Demo01Frame_structure.puml +++ b/src/docs/resources/Demo01Frame_structure.puml @@ -70,7 +70,7 @@ config=StructureConfiguration; "showPackageLevels": 2, "showDetailedClassStructure": true }, - "rootClass": "com.snapgames.apps.Demo01Frame", + "rootClass": "com.snapgames.apps.desktop.game.GameApp", "extensionCallbackMethod": "" // qualified.class.name#methodName - signature: public static String method(String) } diagram meta data end '/ diff --git a/src/main/java/com/snapgames/apps/Demo01App.java b/src/main/java/com/snapgames/apps/console/Demo01App.java similarity index 98% rename from src/main/java/com/snapgames/apps/Demo01App.java rename to src/main/java/com/snapgames/apps/console/Demo01App.java index 5737553..3264495 100644 --- a/src/main/java/com/snapgames/apps/Demo01App.java +++ b/src/main/java/com/snapgames/apps/console/Demo01App.java @@ -1,4 +1,4 @@ -package com.snapgames.apps; +package com.snapgames.apps.console; import java.io.IOException; import java.time.LocalDateTime; diff --git a/src/main/java/com/snapgames/apps/Demo01Frame.java b/src/main/java/com/snapgames/apps/desktop/game/GameApp.java similarity index 95% rename from src/main/java/com/snapgames/apps/Demo01Frame.java rename to src/main/java/com/snapgames/apps/desktop/game/GameApp.java index 4d35352..0146237 100644 --- a/src/main/java/com/snapgames/apps/Demo01Frame.java +++ b/src/main/java/com/snapgames/apps/desktop/game/GameApp.java @@ -1,7 +1,7 @@ -package com.snapgames.apps; +package com.snapgames.apps.desktop.game; -import com.snapgames.apps.scenes.PlayScene; -import com.snapgames.apps.scenes.TitleScene; +import com.snapgames.apps.desktop.game.scenes.PlayScene; +import com.snapgames.apps.desktop.game.scenes.TitleScene; import javax.imageio.ImageIO; import javax.swing.*; @@ -24,7 +24,7 @@ import java.util.stream.Collectors; /** - * Main class for Project {@link Demo01Frame} + * Main class for Project {@link GameApp} * *

This class is the main class for a java game template. * It initialize default components and services @@ -55,7 +55,7 @@ * @author Frédéric Delorme frederic.delorme@gmail.com * @since 1.0.0 */ -public class Demo01Frame implements KeyListener, MouseListener, MouseWheelListener, MouseMotionListener { +public class GameApp implements KeyListener, MouseListener, MouseWheelListener, MouseMotionListener { /** *

The {@link Entity} class is the Core object for any Scene.

@@ -67,8 +67,8 @@ public class Demo01Frame implements KeyListener, MouseListener, MouseWheelListen * to the mass and assigned {@link Material} and applied forces. *

* - *

The {@link Entity} is drawn by the {@link Demo01Frame#render(Map)} and more precisely by - * the {@link Demo01Frame#drawEntity(Entity, Graphics2D)} operation.

+ *

The {@link Entity} is drawn by the {@link GameApp#render(Map)} and more precisely by + * the {@link GameApp#drawEntity(Entity, Graphics2D)} operation.

* *

you can add som {@link Behavior} on the entity to enhance the different phases of the entity processing:

*