![]() |
Dragonfly 2.2
A text-based game engine
|
Public Member Functions | |
EventCollision (GameObject *o1, GameObject *o2, Position p) | |
Create collision event between o1 and o2 at position p. | |
GameObject * | getObject1 () |
Return object that caused collision. | |
void | setObject1 (GameObject *new_o1) |
Set object that caused collision. | |
GameObject * | getObject2 () |
Return object that was collided with. | |
void | setObject2 (GameObject *new_o2) |
Set object that was collided with. | |
Position | getPosition () |
Return the position of the collision. | |
void | setPosition (Position new_pos) |
Set the position of the collision. | |
Protected Attributes | |
Position | pos |
Where collision occurred. | |
GameObject * | obj1 |
The object moving, causing the collision. | |
GameObject * | obj2 |
The object being collided with. |
EventCollision::EventCollision | ( | GameObject * | o1, |
GameObject * | o2, | ||
Position | p | ||
) |
Create collision event between o1 and o2 at position p.
Object o1 "caused" the collision by moving into object o2.