Le dim 22/08/2004 à 22:22, Matthieu Fertré a écrit : > Only one big class ? I'm not sure this is the good choice. For me, it's > more logical to have one class for one type of weapons like : > - dynamite, mine (weapon that we put down) > - grenade, bazooka, ... (with a launching action) > - baseball, fire punch, (need to be near the opponent) > - ....
Ok, you're right. But the idea was to reduce the number of classes ! I don't think that one class per weapon is the best choice ! Because it's too difficult to write a new weapon ! For me, a weapon should be : - a weapon class / type : launch something (like dynamite, bazooka, mine, ...), punch (baseball, etc.), ... - resources : sounds & images - options like : o Need a force to launch (bazooka) or not (dynamite) o Initial force to launch o Damages o ... Like Julien said, using script should be the best way ! Bye, Haypo