ActionScript 3.0 Design Patterns

(Chris Devlin) #1
Example: Sprite Factory | 85

is not a productive application, but it will serve as a springboard to thevertical


shooter game that we’ll develop later in the chapter.


The Project window in Figure 2-9 shows the file structure of the Shapes example.


Product Classes: Shape Widgets


The shapes on the stage (Figure 2-9) are the products in this example. These con-


crete shape widgets extend theShapeWidgetabstract class (Example 2-21). Unlike in


previous examples, we defineShapeWidgetas an abstract interface because we want


Figure 2-8. Screenshot of Shapes example stage


Figure 2-9. Shapes example Project window

Free download pdf