28.04.2019 Views

[JAVA][Beginning Java 8 Games Development]

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

■ Contents<br />

Set and HashSet: Using java.util Unordered Sets212<br />

The java.util HashSet Class: Using Unordered Sets of Objects 212<br />

Creating Your Casting Engine: CastingDirector.java213<br />

Creating an ArrayList Object: CURRENT_CAST Data Store List 214<br />

Another ArrayList Object: COLLIDE_CHECKLIST Data Store List 218<br />

Creating a HashSet Object: REMOVED_ACTORS Data Store Set 219<br />

CastingDirector( ) Constructor: Having NetBeans Write the Code 221<br />

Creating Our Main Actor: The Bagel Hero Subclass223<br />

Summary227<br />

■■Chapter 11: Moving Your Action Figure in 2D: Controlling<br />

the X and Y Display Screen Coordinates229<br />

InvinciBagel.java Redesign: Adding Logical Methods230<br />

The Scene Event Handling Method: .createSceneEventHandling( ) 231<br />

Adding InvinciBagel: Declare Image, Bagel, and CastingDirector 233<br />

The Actor Image Assets Loading Method: .loadImageAssets( ) 234<br />

Creating Your InvinciBagel Bagel Object: .createGameActors( ) 235<br />

Adding Your iBagel to the Scene Graph: .addGameActorNodes( ) 237<br />

Creating and Managing Your Cast: .createCastingDirection( ) 238<br />

Create and Start Your GamePlayLoop: .createStartGameLoop 239<br />

Update Splashscreen Scene Graph: .createSplashScreenNodes( ) 240<br />

Powering the iBagel Actor: Using the GamePlayLoop242<br />

Moving the iBagel Actor Object: Coding Your .update( ) Method 243<br />

Testing Our New Game Design: Moving InvinciBagel246<br />

Summary249<br />

■■Chapter 12: Setting Boundaries for Your Action Figure in 2D: Using the Node<br />

Class LocalToParent Attribute251<br />

InvinciBagel Privatization: Removing Static Modifiers252<br />

Passing Context from InvinciBagel to Bagel: Using this Keyword 254<br />

Removing a Static iBagel Reference: Revise the Handle( ) Method 258<br />

Using this in GamePlayLoop( ) Constructor: GamePlayLoop(this) 260<br />

Removing the Rest of the Static Variables: StackPane and HBox 261<br />

www.it-ebooks.info<br />

xiii

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!