Game Development Reference
In-Depth Information
launchIt
=
false
;
}
}
Figure 17-45
.
Add a launchIt flag to the if(onScreen) condition to make that code structure wait for the pauseCounter
For the
if(takeSides)
version of this if(onScreen && launchIt) structure, make sure
to change the destination to
-70
, make the counter
if(spriteMoveL >= destination)
and
the counter update
spriteMoveL-=1;
and the takeSides equal to
false
in the
else
por-
tion of this conditional structure. Next, let's update our
scoring engine
in the Bagel
class.
Update the .scoringEngine() Method:
Using .equals()