public void action() { MouseInfo mouse = Greenfoot.getMouseInfo(); if (!clickingInventory()) { if (mouse != null) { if (mouse.getButton() == 1) { toolbar.action(getX(), getY()); } if (mouse.getButton() == 3) { toolbar.altAction(getX(), getY()); } } } }
public void changeAction(int action) { toolbar.changeAction(action); }
public void setID(int newID) { toolbar.setID(newID); }