The Obj class is the base class for every
other class in your game. It handles everything that a general object
needs to be handled. Any of these methods can be used by any class.
Properties
Methods
-
void dispose() |
Discards the instance created
by the new() method.
|
-
heapPtr doit() |
Returns a pointer to the object.
|
-
void init() |
In Obj, this is just an empty
method which acts as a place holder.
|
-
bool isKindOf(heapPtr
pObj) |
Checks to see if the object is
the same as, or a descendant of pObj.
|
-
bool isMemberOf(heapPtr
pObj) |
If pObj is a class, the object
is an instance, and the object is the same species as pObj,
it returns TRUE. Otherwise, it returns FALSE.
|
-
heapPtr new() |
Creates an instance of the class
and returns a pointer to it.
|
-
void perform(heapPtr
pObj[, params]) |
Calls pObj's doit() method, then,
all the methods/properties specified is params.
|
-
bool respondsTo(selector
aSelector) |
Checks to see if the object will
respond to the specified selector (property or method). Call
this before calling an object's method or accessing an object's
property if you are unsure if the object actually contains it.
|
-
void showSelf() |
Prints the object name to the
screen in a message box.
|
-
string showStr(string
strBuf) |
Copies the object's name to strBuf.
It returns a pointer to the string (strBuf).
|
-
heapPtr yourself() |
Returns a pointer to the object.
|
|