What is the best way to have multiple bullets from the same family do different damage? I want all the bullets from the family to have the same properties but have different damage amounts they deal. Like a blue bullet does 1, a green does 2, and a red does 3. But I want them to be able to damage and be destroyed by the dame things. Any ideas?
Develop games in your browser. Powerful, performant & highly capable.
An family instance variable would work well for this.
I do have one and I use it to set the damage for all the bullets, but I want each bullet to modify that number.
Example if the blue bullet would make the do the BulletFamily.damage+1 but the Red bullet would do Bulletfamily.damage.+2
Just specify different values to the damage variable for each object type in your family.
As simple as it seems.