My greenfoot file is a game of plants vs zombies and it all of a sudden just wouldn't let me open the file anymore. I can open up my other greenfoot programs but I can't open this one.
xPosition=<some number> yPosition=<some number>
private void shootPeas(int timeInterval) { if (!getWorld().getObjects(Zombie.class).isEmpty()) { long curTime = System.currentTimeMillis(); if (curTime >= lastAdded + timeInterval) //5000ms = 5s { lastAdded = curTime; Pea pea = new Pea(); World world = getWorld(); world.addObject(pea, getX() + 28, getY() -11); } } }