Index

A B C D E G H I L M N P R S T U W 
All Classes|All Packages|Constant Field Values|Deprecated API|Serialized Form

A

act(float) - Method in class Green.Actor
Called once per frame.
act(float) - Method in class Green.World
Called once per frame.
Actor - Class in Green
The base class for all objects in the library.
Actor(float, float, int, int) - Constructor for class Green.Actor
Creates the new actor at a position with a defined width and height.
Actor(float, float, PImage) - Constructor for class Green.Actor
Creates the new actor at a position with a sprite.
Actor(float, float, PImage, float) - Constructor for class Green.Actor
Creates the new actor at a position with a sprite scaled by scaleMultiplier.
Actor(float, float, PImage, float, int) - Constructor for class Green.Actor
Creates the new actor at a position with a sprite scaled by scaleMultiplier, resized according to resizeFormat.
Actor(float, float, PImage, int, int) - Constructor for class Green.Actor
Creates the new actor at a position with a sprite stretched to fit the defined width and height.
Actor(float, float, PImage, int, int, int) - Constructor for class Green.Actor
Creates the new actor at a position with a sprite, resized according to resizeFormat to fit the defined width and height.
addedToWorld(World) - Method in class Green.Actor
Called when the Actor is added to any World.
addObject(Actor) - Method in class Green.World
Adds an Actor to the World.

B

BILINEAR - Static variable in class Green.Green
Bilinear resizing algorithm.

C

cot(float) - Static method in class Green.Green
Calculates the cotangent of angle in radians.
csc(float) - Static method in class Green.Green
Calculates the cosecant of angle in radians.

D

draw() - Method in class Green.Actor
Renders the Actor to the screen.

E

equals(Object) - Method in class Green.Actor
 
equals(Object) - Method in class Green.InputKey
 
equals(Object) - Method in class Green.World
 

G

getActorUnsafeRemove() - Method in class Green.World
Retrieves the current setting for whether the World should remove Actor instances safely.
getBackgroundColor() - Method in class Green.World
Retrieves the background colour of the World.
getBackgroundImage() - Method in class Green.World
Retrieves the background image currently in use, with scaling applied.
getCamFollowActor() - Method in class Green.World
Retrieves the Actor the camera should follow, if it is set.
getDeltaTime() - Method in class Green.Green
Retrieves the deltaTime - the time since the last frame.
getDigits(int) - Static method in class Green.Green
Calculates the number of digits in a given integer.
getHeight() - Method in class Green.Actor
Retrieves the height of the Actor.
getHeight() - Method in class Green.World
Retrieves the height of the World.
getImage() - Method in class Green.Actor
Retrieves the PImage associated with the Actor.
getInstance() - Static method in class Green.Green
Retrieves the current instance of the library that is running.
getIntersectingObjects(Class<A>) - Method in class Green.Actor
Retrieves a list of all objects matching type in the World that intersect with the Actor, using basic rect comparison.
getKey() - Method in class Green.InputKey
Retrieves the char representation of the key that was pressed (or PConstants.CODED if the key doesn't have one)
getKeyCode() - Method in class Green.InputKey
Retrieves the keycode of the key that was pressed.
getLinesIntersect(float, float, float, float, float, float, float, float) - Static method in class Green.Green
Determines whether two line segments ([(a1x, a1y) - (a2x, a2y)] and [(b1x, b1y) - (b2x, b2y)]) intersect.
getMouseScroll() - Method in class Green.Green
Retrieves the amount that the mouse scrolled in this frame.
getMouseSpeed() - Method in class Green.Green
Calculates the mouse's speed from last frame to this frame.
getNeighbours(Class<A>, float) - Method in class Green.Actor
Retrieves a list of all objects in the World matching type within range of the Actor.
getObjects() - Method in class Green.World
Retrieves a list of all Actor instances in the World.
getObjects(Class<A>) - Method in class Green.World
Retrieves a list of all Actor instances matching type in the World.
getObjectsAtOffset(float, float, Class<A>) - Method in class Green.Actor
Retrieves a list of all objects matching type within 1 unit of an offset.
getObjectsAtOffset(float, float, Class<A>, float) - Method in class Green.Actor
Retrieves a list of all objects matching type within range of an offset.
getObjectsInRange(Class<A>, float) - Method in class Green.Actor
Retrieves a list of all objects in the World matching type within range of the Actor.
getOneIntersectingObject(Class<A>) - Method in class Green.Actor
Retrieves the first object matching type in the World that intersects with the Actor, using basic rect comparison.
getOneObjectAtOffset(float, float, Class<A>) - Method in class Green.Actor
Retrieves the first object matching type within 1 unit of an offset.
getOneObjectAtOffset(float, float, Class<A>, float) - Method in class Green.Actor
Retrieves the first object matching type within range of an offset.
getOneObjectInRange(Class<A>, float) - Method in class Green.Actor
Retrieves the first object in the World matching type within range of the Actor.
getOnlyDrawOnScreen() - Method in class Green.World
Retrieves whether the World should attempt to render Actor instances that are not on-screen.
getOpacity() - Method in class Green.Actor
Retrieves the opacity value (in the range 0 - 255) of the Actor.
getOutOfBoundsColor() - Method in class Green.World
Retrieves the out-of-bounds colour of the World.
getParent() - Method in class Green.Green
Retrieves the parent instance of Processing.
getPointsAngle(float, float, float, float) - Static method in class Green.Green
Calculates the angle between two points ((x1, y1) and (x2, y2)).
getPointsDist(float, float, float, float) - Static method in class Green.Green
Calculates the distance between two points ((x1, y1) and (x2, y2)).
getRandomObject(Class<A>) - Method in class Green.World
Retrieves a single random Actor matching type in the World, or null if the World has no objects.
getResizeFormat() - Method in class Green.Actor
Retrieves the image resize format of the Actor.
getResizeFormat() - Method in class Green.World
Retrieves the background image resize format of the World.
getRotation() - Method in class Green.Actor
Retrieves the rotation value (in degrees) of the Actor.
getSourceBackgroundImage() - Method in class Green.World
Retrieves the original image supplied as the background image, before any scaling has been applied.
getSourceImage() - Method in class Green.Actor
Retrieves the original PImage (before any scaling has been applied) associated with the Actor.
getUnbounded() - Method in class Green.World
Retrieves whether the World has 'collidable' boundaries that prevent Actor instances from going out-of-bounds.
getUuid() - Method in class Green.Actor
Retrieves the UUID of the Actor.
getUuid() - Method in class Green.World
Retrieves the UUID of the World.
getWidth() - Method in class Green.Actor
Retrieves the width of the Actor.
getWidth() - Method in class Green.World
Retrieves the width of the World.
getWorld() - Method in class Green.Actor
Retrieves the current World this Actor is in, or null otherwise.
getWorld() - Static method in class Green.Green
Retrieves the currently-loaded World.
getWorldOfType(Class<W>) - Static method in class Green.Actor
Retrieves the current World this Actor is in as type if possible, or null otherwise.
getX() - Method in class Green.Actor
Retrieves the X-axis position of the Actor.
getY() - Method in class Green.Actor
Retrieves the X-axis position of the Actor.
getZ() - Method in class Green.Actor
Retrieves the Z-axis position of the Actor.
Green - package Green
Easy, simple 2D game creation within Processing.
Green - Class in Green
The main class of the library.
Green(PApplet) - Constructor for class Green.Green
Starts the backbone of the library.

H

handleAct() - Method in class Green.Green
Calls the Actor.act(float) method on every Actor in the currently-loaded World.
handleAct() - Method in class Green.World
Deprecated.
Please call Green.handleAct() instead - this will still be called, but the parent method does additional important things.
handleDraw() - Method in class Green.Green
Calls the Actor.draw() method on every Actor, drawing all objects in the currently-loaded World to screen.
handleDraw() - Method in class Green.World
Deprecated.
Please call Green.handleDraw() instead - this will still be called, but the parent method does additional important things.
handleInput() - Method in class Green.Green
Handles all the frame-by-frame input.
handleKeyDown(char, int) - Method in class Green.Green
Handles the event of a key being pressed.
handleKeyUp(char, int) - Method in class Green.Green
Handles the event of a key being released.
handleMouseDown(int) - Method in class Green.Green
Handles the event of a mouse button being pressed.
handleMousePosition(int, int) - Method in class Green.Green
Deprecated.
handleMousePosition(int, int, int, int) - Method in class Green.Green
Handles the mouse position input.
handleMouseUp(int) - Method in class Green.Green
Handles the event of a mouse button being released.
handleMouseWheel(int) - Method in class Green.Green
Handles when the mouse is scrolled.
hashCode() - Method in class Green.Actor
 
hashCode() - Method in class Green.InputKey
 
hashCode() - Method in class Green.World
 
hasObject(Actor) - Method in class Green.World
Determines whether the World contains findActor.

I

InputKey - Class in Green
A class for storing a key input for (primarily internal) use.
InputKey(char, int) - Constructor for class Green.InputKey
Creates the storage class representing the pressed key.
intersects(Actor) - Method in class Green.Actor
Checks to see whether the Actor intersects another Actor, using basic rect comparison.
isAtEdge() - Method in class Green.Actor
Checks to see if the Actor is at the edge of the World it is currently in.
isKeyDown(char) - Method in class Green.Green
Retrieves whether a specific key is currently down.
isKeyDown(int) - Method in class Green.Green
Retrieves whether a specific key is currently down.
isKeyDown(InputKey) - Method in class Green.Green
Retrieves whether a specific key is currently down.
isKeyDownThisFrame(char) - Method in class Green.Green
Retrieves whether a specific key was pressed this frame.
isKeyDownThisFrame(int) - Method in class Green.Green
Retrieves whether a specific key was pressed this frame.
isKeyDownThisFrame(InputKey) - Method in class Green.Green
Retrieves whether a specific key was pressed this frame.
isKeyUpThisFrame(char) - Method in class Green.Green
Retrieves whether a specific key was released this frame.
isKeyUpThisFrame(int) - Method in class Green.Green
Retrieves whether a specific key was released this frame.
isKeyUpThisFrame(InputKey) - Method in class Green.Green
Retrieves whether a specific key was released this frame.
isMouseButtonDown(int) - Method in class Green.Green
Retrieves whether a specific mouse button is currently down.
isMouseButtonDownHere(int) - Method in class Green.Actor
Retrieves whether a specific mouse button is currently down on this Actor.
isMouseButtonDownThisFrame(int) - Method in class Green.Green
Retrieves whether a specific mouse button was pressed this frame.
isMouseButtonDownThisFrameHere(int) - Method in class Green.Actor
Retrieves whether a specific mouse button was pressed this frame on this Actor.
isMouseButtonUpThisFrame(int) - Method in class Green.Green
Retrieves whether a specific mouse button was released this frame.
isMouseButtonUpThisFrameHere(int) - Method in class Green.Actor
Retrieves whether a specific mouse button was released this frame on this Actor.
isMouseMoving() - Method in class Green.Green
Retrieves whether the mouse has moved this frame.
isMouseScrolling() - Method in class Green.Green
Retrieves whether the mouse is currently scrolling.
isMouseScrollingHere() - Method in class Green.Actor
Retrieves whether the mouse is currently scrolling on this Actor.

L

loadWorld(World) - Method in class Green.Green
Loads a World to make it the one currently in use.

M

move(float) - Method in class Green.Actor
Moves the Actor amount units in the direction of the actor's rotation.
moveGlobal(float, float) - Method in class Green.Actor
Moves the Actor x units on the X-axis and y units on the Y-axis.

N

NEAREST_NEIGHBOR - Static variable in class Green.Green
Nearest-neighbour resizing algorithm.
NoWorldException - Exception in Green
Thrown when a method is called that requires a World to be loaded, and there is no World loaded.
NoWorldException() - Constructor for exception Green.NoWorldException
 

P

pointInBounds(float, float) - Method in class Green.Actor
Checks to see if a point defined by pX and pY is within the Actor's rotated rect.
pointInRectangle(float, float, float, float, float, float, float, float, float, float) - Static method in class Green.Green
Checks whether a point (pPx, pPy) is within the bounds of a rectangle ((pXx, pXy), (pYx, pYy), (pZx, pZy), (pWx, pWy)) where the points are provided in clockwise order.
prepare() - Method in class Green.World
Called when the World is loaded via the Green.loadWorld(World) method.

R

removedFromWorld(World) - Method in class Green.Actor
Called when the Actor is removed from any World.
removeObject(Actor) - Method in class Green.World
Removes an Actor from the World.
resizeNN(PImage, int, int) - Method in class Green.Green
A nearest-neighbour resizing implementation.

S

sec(float) - Static method in class Green.Green
Calculates the secant of angle in radians.
setActorUnsafeRemove(boolean) - Method in class Green.World
Sets whether the World should remove Actor instances safely.
setBackgroundColor(int) - Method in class Green.World
Sets the background colour of the World.
setBackgroundColor(int, int, int) - Method in class Green.World
Sets the background colour of the World.
setBackgroundImage(PImage) - Method in class Green.World
Sets the background image of the World.
setCamFollowActor(Actor) - Method in class Green.World
Sets the Actor the camera should follow.
setDimensions(int, int) - Method in class Green.Actor
Sets the width and height of the Actor.
setDimensions(int, int) - Method in class Green.World
Sets the dimensions of the World.
setHeight(int) - Method in class Green.Actor
Sets the height of the Actor.
setHeight(int) - Method in class Green.World
Sets the height of the World.
setImage(PImage) - Method in class Green.Actor
Sets the image of the Actor.
setLocation(float, float) - Method in class Green.Actor
Sets the X-axis and Y-axis positions of the Actor.
setOnlyDrawOnScreen(boolean) - Method in class Green.World
Sets whether the World should attempt to render Actor instances that are not on-screen.
setOpacity(float) - Method in class Green.Actor
Sets the opacity value (in the range 0 - 255) of the Actor.
setOutOfBoundsColor(int) - Method in class Green.World
Sets the out-of-bounds colour of the World.
setOutOfBoundsColor(int, int, int) - Method in class Green.World
Sets the out-of-bounds colour of the World.
setResizeFormat(int) - Method in class Green.Actor
Sets the image resize format of the Actor.
setResizeFormat(int) - Method in class Green.World
Sets the background image resize format of the World.
setRotation(float) - Method in class Green.Actor
Sets the rotation of the Actor in degrees.
setUnbounded(boolean) - Method in class Green.World
Sets whether the World has 'collidable' boundaries that prevent Actor instances from going out-of-bounds.
setWidth(int) - Method in class Green.Actor
Sets the width of the Actor.
setWidth(int) - Method in class Green.World
Sets the width of the World.
setX(float) - Method in class Green.Actor
Sets the X-axis position of the Actor.
setY(float) - Method in class Green.Actor
Sets the Y-axis position of the Actor.
setZ(float) - Method in class Green.Actor
Sets the Z-axis position of the Actor.
SingleInstanceException - Exception in Green
Thrown when more than one instance of Green is attempted to be created.
SingleInstanceException() - Constructor for exception Green.SingleInstanceException
 

T

TILE - Static variable in class Green.Green
Tile the image to fit (from top left), rather than adjusting it in any way.
tileImage(PImage, int, int) - Method in class Green.Green
Tiles a source image to fill a new image with different dimensions.
toString() - Method in class Green.Actor
 
toString() - Method in class Green.InputKey
 
toString() - Method in class Green.World
 
turn(float) - Method in class Green.Actor
Rotates the Actor degrees amount in degrees.
turnTowards(float, float) - Method in class Green.Actor
Rotates the Actor to face it's right side towards the position (x, y).
turnTowards(Actor) - Method in class Green.Actor
Rotates the Actor to face it's right side towards another Actor.

U

UnknownResizeFormatException - Exception in Green
Thrown when an unknown resize format is passed to a method that expects one.
UnknownResizeFormatException() - Constructor for exception Green.UnknownResizeFormatException
 

W

World - Class in Green
The base class for all worlds in the library.
World() - Constructor for class Green.World
Creates a new world using the screen dimensions.
World(boolean) - Constructor for class Green.World
Creates a new world using the screen dimensions, set to be bounded or otherwise.
World(int) - Constructor for class Green.World
Creates a new world using the screen dimensions with a background colour.
World(int, boolean) - Constructor for class Green.World
Creates a new world using the screen dimensions with a background colour, set to be bounded or otherwise.
World(int, int) - Constructor for class Green.World
Creates a new world with defined dimensions.
World(int, int, boolean) - Constructor for class Green.World
Creates a new world with defined dimensions, set to be bounded or otherwise.
World(int, int, int) - Constructor for class Green.World
Creates a new world with defined dimensions and a background colour.
World(int, int, int, boolean) - Constructor for class Green.World
Creates a new world with defined dimensions and a background colour, set to be bounded or otherwise.
World(int, int, int, PImage) - Constructor for class Green.World
Creates a new world with defined dimensions and a background image with a background colour to draw underneath.
World(int, int, int, PImage, boolean) - Constructor for class Green.World
Creates a new world with defined dimensions and a background image with a background colour to draw underneath, set to be bounded or otherwise.
World(int, int, int, PImage, int) - Constructor for class Green.World
Creates a new world with defined dimensions and a background image with a background colour to draw underneath.
World(int, int, int, PImage, int, boolean) - Constructor for class Green.World
Creates a new world with defined dimensions and a background image with a background colour to draw underneath, set to be bounded or otherwise.
World(int, int, PImage) - Constructor for class Green.World
Creates a new world with defined dimensions and a background image.
World(int, int, PImage, boolean) - Constructor for class Green.World
Creates a new world with defined dimensions and a background image, set to be bounded or otherwise.
World(int, int, PImage, int) - Constructor for class Green.World
Creates a new world with defined dimensions and a background image.
World(int, int, PImage, int, boolean) - Constructor for class Green.World
Creates a new world with defined dimensions and a background image, set to be bounded or otherwise.
World(int, PImage) - Constructor for class Green.World
Creates a new world using the screen dimensions with a background image and a background colour to draw underneath.
World(int, PImage, boolean) - Constructor for class Green.World
Creates a new world using the screen dimensions with a background image and a background colour to draw underneath, set to be bounded or otherwise.
World(PImage) - Constructor for class Green.World
Creates a new world using the screen dimensions with a background image.
World(PImage, boolean) - Constructor for class Green.World
Creates a new world using the screen dimensions with a background image, set to be bounded or otherwise.
A B C D E G H I L M N P R S T U W 
All Classes|All Packages|Constant Field Values|Deprecated API|Serialized Form