Index
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 toresizeFormat
. - 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
- addObject(Actor) - Method in class Green.World
B
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
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
- 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
- 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
- getKey() - Method in class Green.InputKey
-
Retrieves the
char
representation of the key that was pressed (orPConstants.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
- getObjects() - Method in class Green.World
- getObjects(Class<A>) - Method in class Green.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
withinrange
of an offset. - getObjectsInRange(Class<A>, float) - Method in class Green.Actor
- getOneIntersectingObject(Class<A>) - Method in class Green.Actor
- 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
withinrange
of an offset. - getOneObjectInRange(Class<A>, float) - Method in class Green.Actor
- getOnlyDrawOnScreen() - Method in class Green.World
- 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
- 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
- getUnbounded() - Method in class Green.World
- getUuid() - Method in class Green.Actor
- getUuid() - Method in class Green.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
- getWorld() - Static method in class Green.Green
-
Retrieves the currently-loaded
World
. - getWorldOfType(Class<W>) - Static method in class Green.Actor
- 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
- handleAct() - Method in class Green.World
-
Deprecated.
- handleDraw() - Method in class Green.Green
-
Calls the
Actor.draw()
method on everyActor
, drawing all objects in the currently-loadedWorld
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.Please use
Green.handleMousePosition(int, int, int, int)
instead. - 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
containsfindActor
.
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
- isAtEdge() - Method in class Green.Actor
- 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
N
- NEAREST_NEIGHBOR - Static variable in class Green.Green
-
Nearest-neighbour resizing algorithm.
- NoWorldException - Exception in Green
- NoWorldException() - Constructor for exception Green.NoWorldException
P
- pointInBounds(float, float) - Method in class Green.Actor
- 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 theGreen.loadWorld(World)
method.
R
- removedFromWorld(World) - Method in class Green.Actor
- removeObject(Actor) - Method in class Green.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
- 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
- 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
- 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
- turnTowards(Actor) - Method in class Green.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.
All Classes|All Packages|Constant Field Values|Deprecated API|Serialized Form
Green.handleAct()
instead - this will still be called, but the parent method does additional important things.