Overview
The Scene class holds and manages all GameObject
instances that make up a game scene.
It is responsible for storing the list of objects and handling background rendering.
Field Summary
ArrayList<GameObject> objects
– List of all game objects in the scene.int backgroundcolor
– The background color of the scene, defaults to0
.
Method Summary
void addObject(GameObject o)
Adds a new
GameObject
to the scene.void removeObject(GameObject o)
Removes a specific
GameObject
from the scene.void removeObjectWithName(String name)
Finds and removes the first
GameObject
that matches the given name.void setBackgroundColour(int color)
Sets the background color of the scene using an integer (ARGB format).