Section 3

We need to put this code into our LaserGameForms. The worskpace is pretty big and I prefer smaller modular methods. So we'll break this down into a few more manageable pieces. We begin with the methods that will create the two basic forms.

Here's the method that draws the arrow head, and the change made to use it.

Now we add the code to draw the arc, and the change to use it too.

Our new arrow forms need to be added to the forms cache. I also added a comment line at the top of the method that makes it easy to initialize the forms. Just select the commented code and execute it. We will need to execute this initializer again since we have just added 2 new forms to the cache.

Don't forget this step. You must initialize the cached forms manually here.

Next, we add the methods to access the cached arc arrow forms.

Index Page Next Page

Copyright © 2007, 2008, 2009, 2010 Stephan B Wessels