Hi there JGO,
first of all: happy new year! I’ve an array[] with all the items saved in them. If I change 1 stat of the array all the items with the same id will be changed aswell. So is there a way on having different stats in an Array[]? Please only tell me how to, I want to programm it myself!
Code:
public static final Items[] tiles = new Items[400];
public static final Items SWORD = new ToolsSword(10, 12); //for example these stats are AttackDamage and AttackSpeed
With this code all the items (with the same id) will have the same AttackDamage and ASpeed. So what is the best way to be able to change the attackDamage without changing them all?
if you use something like this:
Void changeAttackDamage(int attackDamage){
this.attackDamage = attackDamage;
}
then it will change the damage of all the items (with the same id).
If you don’t understood the question, just say it.
Thanks for helping already!
-RoseSlayer