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

2013/5/3

need help

Pinopip Pinopip

2013/5/3

#
Well im trying trying to make my actor to eat but he dont cant see the xxxx.Class
Pinopip Pinopip

2013/5/3

#
  public void eat()
     {
       if (canSee(barrel.class))
        {
            eat(barrel.class);
        }
     }
Pinopip Pinopip

2013/5/3

#
the (cansee(barel.class)) goes red...
Pinopip Pinopip

2013/5/3

#
nvm done it :p jus needet to do this
Pinopip Pinopip

2013/5/3

#
 public void eat()
     {
       Actor barrel;
       barrel = getOneObjectAtOffset(0,0, barrel.class);
       if (barrel!=null)
       {
           World world;
           world = getWorld();
           world.removeObject (barrel);
           
        }
    }
You need to login to post a reply.