first of all im brand new to greenfoot and have only played around for maybe 6-10 hours. what im doing is when the key "o" is pressed this class called snake will spawn an obect from the class venom in a set location.


1 | getWorld().addObject(< Actor actor >, < int x >, < int y >); |
1 2 3 | World world = getWorld(); // the reference to a world (the one the actor is in, in this case) world.removeObject( this ); world.addObject( this , 50 , 200 ); |