Game Development Reference
In-Depth Information
Creating a Scoring Engine Method:
.scoringEngine()
Before we finish up with this chapter, let's put a framework in place for the scoring en-
gine, so we can focus the entire next chapter on game play. Create a private void
scoringEngine(Actor object){} empty method right after the checkColli-
sion() method, and add a scoringEngine(object); method call at the end of the
if(collide(object)) conditional if() structure, inside of the checkCollision()
method. As you can see in Figure 16-46 , you will get one wavy gray warning highlight
under the Actor object reference inside of the .scoringEngine() method declaration.
This is because the object reference has not been implemented inside of the method
body.
Figure 16-46 . Add a private void scoringEngine(Actor object) empty method, and call if inside .checkCollision()
method
 
 
Search WWH ::




Custom Search