class - switch(...) in Update() or constructor? -
i'm trying make first real game in xna... i've made abilities
class keeps track of different abilities monster or item can have... made enumeration of kinds of abilities want. wondering... better have typeofability
field in class , big switch(typeofability)
in update()
method check type every time , act accordingly, or have lot of fields, big switch(typeofability)
in class constructor, set values of fields , update()
method use fields , no big 'switch(typeofability)'? maybe combination of above?... anyway, in advance help!
Comments
Post a Comment