Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Initial Version and Version 1 of ~archive/ObjectManager


Ignore:
Timestamp:
Nov 27, 2007, 10:19:12 PM (12 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ~archive/ObjectManager

    v1 v1  
     1= ObjectManage =
     2
     3 * __File__: source:/trunk/src/util/object_manager.h#HEAD
     4
     5== Idea ==
     6The ObjectManager is the one place, where all the Entitites of the Game are stored.
     7The ObjectManager has multiple lists for Environmentals, enemies, dead and living matter, friends, projectiles and so on.
     8
     9With the ObjectManager Entities can be grouped, and as such be ticked, drawn and collided independently and much safer, as without it.
     10
     11== Interaction ==
     12The ObjectManager works closely together with WorldEntity, as it is a storage container for them.
     13
     14The ObjectManager has the following Lists, to store Entities:
     15
     16|| OM_NULL             || Not accessible (where they are created and deleted !! DO NOT USE THIS) ||
     17|| OM_DEAD             || Dead Entities, that might be revived ||
     18|| OM_DEAD_TICK        || Dead Entities, that must be ticked (e.g to respawn them for instance) ||
     19|| OM_ENVIRON_NOTICK   || Environment that is dead matter (ground house...) ||
     20|| OM_ENVIRON          || Environment that moved (water, trees, Particles...) ||
     21|| OM_COMMON           || Everything that is nowhere else, (collides with all groups) ||
     22|| OM_GROUP_??         || Groups, for entitites ||
     23|| OM_GROUP_??_PROJ    || Projectiles of the above mentioned groups. ||
     24
     25
     26To Put an entity into a corresponding group (and thus taking it out of its previous group) do a:
     27{{{
     28#!cpp
     29  WorldEntity* entity = new DoomsDayDevice();
     30  entity->toList(OM_GROUP_01_PROJ);
     31}}}
     32