Claypool

Courses

Publications

Students

Projects

Service

Downloads

Misc


Dragonfly: EventCollision Class Reference
Dragonfly 2.2
A text-based game engine
Public Member Functions | Protected Attributes

EventCollision Class Reference

Inheritance diagram for EventCollision:
Event

List of all members.

Public Member Functions

 EventCollision (GameObject *o1, GameObject *o2, Position p)
 Create collision event between o1 and o2 at position p.
GameObjectgetObject1 ()
 Return object that caused collision.
void setObject1 (GameObject *new_o1)
 Set object that caused collision.
GameObjectgetObject2 ()
 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.
GameObjectobj1
 The object moving, causing the collision.
GameObjectobj2
 The object being collided with.

Constructor & Destructor Documentation

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.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Friends