How to get variable frm another class
Ex:-
Tank1 and cannon1
I want to get health variable frm tank1 class but how will i make a reference to tank1???
EnemyTank tank1 = (EnemyTank) gettOneIntersectingObject(EnemyTank.class);
EnemyTank tank1 = (EnemyTank) gettOneIntersectingObject(EnemyTank.class);
if (tank1 != null) ...
if (tank1 != null) ...
protected void addedToWorld(World w) { Text text=new Text() w.addObject(text,44,33); }