Open FlatPaper opened 5 years ago
A good approach to fixing this issue is to add a field to the constructor from object.js
:
Ok, another thing, instead of projectileType
which is :bleh:, this should be named projectileShape
, while projectileType
addresses whether an object is a map object or a cannon object.
Yes, you can fix it, seems like a good idea 👍 For now, go to the draw
function of the object and change the beginFill
parameter (it's a hex code) for the map objects to be a different color than the cannon projectile.
In order to differentiate objects of the map and cannons, we should give it a tag and change the colour of it.
https://github.com/firetto/Physics11Simulation/blob/5e4070072daf523a04277d9fa0ab3c94772a258e/cannon.js#L36