Advertisement
This is comment for paste
Attribute system
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- With the add modifier, you could completely remove the switch statement, so instead of this:
- switch(_mod.op_type){
- case 0: array_push(modifiers[0], _mod); break;
- case 1: array_push(modifiers[1], _mod); break;
- case 2: array_push(modifiers[2], _mod); break;
- }
- You would simply have this:
- array_push(modifiers[_mod.op_type], _mod);
- You could probably also write some functions to do the calculations and have them stored in a global array that corresponds to op_type, which would let you shorten the calculations code as well.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement