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

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -