Game Development Reference
In-Depth Information
castDirector object, using the
.addCurrentCast()
method that we created in
Chapter
10
.
The Java method structure, which is shown error-free in
Figure 11-8
, should look
like the following:
private void
createCastingDirection()
{
castDirector =
new
CastingDirector();
castDirector
.addCurrentCast
(iBagel);
}
Figure 11-8
.
Create private void createCastingDirection() method with castDirector and .addCurrentCast() state-
ments
Now that we have put our Image assets into place, created our Actor object, added
him to the Scene Graph, created a CastingDirector engine, and added our iBagel to the
cast, we're ready to deal with the Game Timing Engine.
Create and Start Your GamePlayLoop: .cre-
ateStartGameLoop
I am going to jump ahead of the .createSceneGraphNodes() method, which is still our
most complex method body and which I am saving for last, and create a new method
called .createStartGameLoop(). Inside of this method we're going to create, and then
start, our GamePlayLoop object, which we created back in
Chapter 7
using the