프로퍼티 | 타입 | 설명 | |
---|---|---|---|
angle | float | ||
id | int | ||
mass | int | ||
radius | int | ||
speedX | float | ||
speedY | float | ||
spriteID | int | ||
x | float | ||
y | float |
메소드 | 설명 | |
---|---|---|
GameObject ( ) : System |
GameObject() initializes a new ID for every GameObject object which is one more than the previous ID. This sets the IDs so that they will always be unique. |
|
calculateGravity ( ) : void |
calculateGravity() modifies acceleration rates of game objects based on gravity effect
|
|
checkCollision ( GameObject object2 ) : bool |
checkCollision() checks the collision between two GameObjects. Collision detection is based upon the radius of the objects and the distance between them. |
|
outOfBounds ( ) : void | ||
updatePosition ( ) : void |
updatePosition() updates the GameObjects position based off of its current speed. At this time, function is not called. In the future, this method might handle all movement for the GameObjects |
public checkCollision ( GameObject object2 ) : bool | ||
object2 | GameObject | An instance to a GameObject |
리턴 | bool |