i making a game. i have a player and i want him to shoot different kind of bullets. i already have created my player class and bullet1 class. i am think of making bullet2 class, and bullet3 class.
than i can make a variable. main start with like this:
String bulletName="bullet1"
if player gets a item2 than
bulletName="bullet2"
if player get item3 than
bulletName="bullet3"
and than i can test when bullet to print by
if(bulletName.equals(bullet1))
{}
else if(...)
{}
else
{}
let me know if there is better way to do this.