Hello,
can someone explain to me how i can call a method from an other class? i tried it like this:
World:
Player:
and in my Gegner class i try to call getSchlaegt():
What is wrong?
public class Level1 extends World { public Actor Held = new Player(); public Level1() { addObject(Held, 110, 336); }
public boolean getSchlaegt(){ return schlaegt; }
Actor g=((Level1)getWorld()).Held; boolean a = g.getSchlaegt();