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

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -