ProcessType

From Bennu Wiki
Revision as of 03:03, 20 April 2007 by Sandman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


A processtype is a definition of a process; not the actual instance, but the type.
There can be multiple instances of one processtype with differing ProcessID's, but there's always one processtype of the same type with one ProcessTypeID, which is as logical as it sounds. For example, one can have a SpaceShip processtype (see the example in process). In the example code, an instance of SpaceShip is created, by calling SpaceShip(). Consider one wants to check in the SpaceShip if it collides with another SpaceShip. This can be done using the following.

if(collision(type SpaceShip))
    // collision code
end

The type statement expects the name of a processtype after it and converts it to the ProcessTypeID associated with the given processtype.