Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This will contain all tutorials from 3 through 5. Input, Collision, a…
…nd Sound.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
demos/navigateship/src/main/java/carlfx/demos/navigateship/Part3_4_5.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package carlfx.demos.navigateship; | ||
|
||
import carlfx.gameengine.GameWorld; | ||
import javafx.application.Application; | ||
import javafx.stage.Stage; | ||
|
||
/** | ||
* The main driver of the game. | ||
* | ||
* @author cdea | ||
*/ | ||
public class Part3_4_5 extends Application { | ||
|
||
GameWorld gameWorld = new TheExpanse(59, "JavaFX 2 GameTutorial Part 4 Collision"); | ||
|
||
/** | ||
* @param args the command line arguments | ||
*/ | ||
public static void main(String[] args) { | ||
launch(args); | ||
} | ||
|
||
@Override | ||
public void start(Stage primaryStage) { | ||
// setup title, scene, stats, controls, and actors. | ||
gameWorld.initialize(primaryStage); | ||
|
||
// kick off the game loop | ||
gameWorld.beginGameLoop(); | ||
|
||
// display window | ||
primaryStage.show(); | ||
} | ||
|
||
} |