public class Camera
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
Main |
main
An instance of the Main object
|
double |
x
The x coordinate of the camera
|
double |
y
The y coordinate of the camera
|
| Constructor and Description |
|---|
Camera()
The default constructor
|
Camera(double x,
double y,
Main main)
The general constructor used to create the camera
|
| Modifier and Type | Method and Description |
|---|---|
void |
followSonic(GameObject sonic)
Follows the given game object
|
public double x
public double y
public Main main
public Camera()
public Camera(double x,
double y,
Main main)
x - The x coordiante of the objecty - The y coordiante of the objectmain - The object main from the Main classpublic void followSonic(GameObject sonic)
sonic - The gameobject is Sonic