This site requires JavaScript, please enable it in your browser!
Greenfoot back

AD12's Comments

Back to AD12's profile

i managed to create the bar with the method updateImage() but i cant return the field, the value (that shows how much the bar should get filled) is in. in class1 i got public int getValue1() { return Value1; } and in class 2 i create an object of class1 and try to get the value: public void act() { class1 cl= new class1(); Value = cl.getValue1(); } it works when i write "return Value1 = 10;" but it doesnt return the field? btw is my programm really slow and doesn't work roundly, could it be a problem of my code?
Ok Thank you. And what exactly is this field to hold the value? Its no image right!? btw: my Ship (Ship.class) creates the Shots.. (Shot.class) if i adjust the barvalue in the ShotBar (ShotBar.class), how can i return the value into my Ship class, to stop shooting?
just started programmimng a game like space invadors meets stargate (i found already one motivating scenario) and my intention is to write the code by my self, but now i want to add a bar for the shots but i got no idea how to start and i can't find something helpfully. Do you know where to look up? i cant do something with your code...