Dragonfly 4.20
A text-based game engine
|
Public Member Functions | |
EventCollision () | |
EventCollision (Object *p_o1, Object *p_o2, Vector p) | |
void | setObject1 (Object *p_new_o1) |
Object * | getObject1 () const |
void | setObject2 (Object *p_new_o2) |
Object * | getObject2 () const |
void | setPosition (Vector new_pos) |
Vector | getPosition () const |
Public Member Functions inherited from df::Event | |
Event () | |
virtual | ~Event () |
void | setType (std::string new_type) |
std::string | getType () const |
Private Attributes | |
Vector | m_pos |
Object * | m_p_obj1 |
Object * | m_p_obj2 |
df::EventCollision::EventCollision | ( | ) |
Create collision event at (0,0) with o1 and o2 NULL.
Create collision event between o1 and o2 at position p.
Object o1 "caused" collision by moving into object o2.
Object * df::EventCollision::getObject1 | ( | ) | const |
Return object that caused collision.
Object * df::EventCollision::getObject2 | ( | ) | const |
Return object that was collided with.
Vector df::EventCollision::getPosition | ( | ) | const |
Return position of collision.
void df::EventCollision::setObject1 | ( | Object * | p_new_o1 | ) |
Set object that caused collision.
void df::EventCollision::setObject2 | ( | Object * | p_new_o2 | ) |
Set object that was collided with.
void df::EventCollision::setPosition | ( | Vector | new_pos | ) |
Set position of collision.
|
private |
Where collision occurred.