java.lang.Objectgreenfoot.Actor
Item
public class Item
Write a description of class Item here.
| Constructor Summary | |
|---|---|
Item(java.lang.String name)
Creates a different image depending on parameter name. |
|
| Method Summary | |
|---|---|
void |
act()
Act - do whatever the Item wants to do. |
char |
getType()
Exposes the private member type. |
| Methods inherited from class greenfoot.Actor |
|---|
addedToWorld, getHeight, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWidth, getWorld, getX, getY, intersects, setImage, setImage, setLocation, setRotation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Item(java.lang.String name)
name. Also sets type where necessary (for Rock, Paper, or Scissor).
name - The general title of the image desired. This parameter is compared by equalsIgnoreCase.| Method Detail |
|---|
public void act()
act in class greenfoot.Actorpublic char getType()
type.
char - This Item's private char type.