Game Development Reference
In-Depth Information
y
y
y
Here's the Omq]na class:
l]_g]ca
w
eilknpbh]od*`eolh]u*Ikrea?hel7
lq^he__h]ooOmq]naatpaj`oIkrea?hel
w
lq^he_bqj_pekjOmq]na$%
w
pn]_a$Ep#oia(Omq]naPd]jgobkni]gejcia%7
y
y
y
And here's the Op]n class:
l]_g]ca
w
eilknpbh]od*`eolh]u*Ikrea?hel7
lq^he__h]ooOp]natpaj`oIkrea?hel
w
lq^he_bqj_pekjOp]n$%
w
pn]_a$Dahhk(E#i]op]nE#iiq_d^appanpd]j_en_hao ±
knomq]nao%7
y
y
y
Factory class
Od]laI]gan is the class that produces the shape objects. It contains a op]pe_ method called
i]gaOd]la. i]gaOd]la takes one parameter: a Opnejc that represents the shape you want to make.
Because the method is op]pe_, you can access this method from any other class using this format:
Od]laI]gan*i]gaOd]la$_en_ha%7
This is the same way you access methods in the ?khheoekj class that you've been using, which also
contains op]pe_ methods.
Here's the Od]laI]gan class:
l]_g]ca
w
eilknpbh]od*`eolh]u*Ikrea?hel7
 
Search Nedrilad ::




Custom Search