Open yoel123 opened 4 years ago
I think ship weapons can be data only, as all weapons function the same the only difference is they have different stats.
there might be a few functions for shooting different types of weapons but they practically work the same with the difference being stats.
that way ship can have an ArrayList of weapon names, and when you need a weapons data you call its row from the database by name.
maybe I shod make a weapon modal class (like item) so I can call stats like w.range or w.dmg etc etc.
w.range
w.dmg
ship upgrades that modify say range will just add to the range variable as modifier no need to change weapons data.
I think ship weapons can be data only, as all weapons function the same the only difference is they have different stats.
there might be a few functions for shooting different types of weapons but they practically work the same with the difference being stats.
that way ship can have an ArrayList of weapon names, and when you need a weapons data you call its row from the database by name.
maybe I shod make a weapon modal class (like item) so I can call stats like
w.range
orw.dmg
etc etc.ship upgrades that modify say range will just add to the range variable as modifier no need to change weapons data.