Changeset 9869 in orxonox.OLD for trunk/src/proto
- Timestamp:
- Oct 3, 2006, 12:19:30 AM (18 years ago)
- Location:
- trunk/src/proto
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/proto/proto_class.cc
r9406 r9869 17 17 18 18 #include "proto_class.h" 19 ObjectListDefinition(ProtoClass); 19 20 20 21 … … 27 28 ProtoClass::ProtoClass () 28 29 { 29 this->setClassID(CL_PROTO_ID, "ProtoClass");30 this->registerObject(this, ProtoClass::_objectList); 30 31 31 32 /* If you make a new class, what is most probably the case when you write this file 32 33 don't forget to: 33 34 1. Add the new file new_class.cc to the ./src/Makefile.am 34 2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS35 35 36 36 Advanced Topics: -
trunk/src/proto/proto_class.h
r4838 r9869 15 15 //! A class for ... 16 16 class ProtoClass : public BaseObject { 17 17 ObjectListDeclaration(ProtoClass); 18 18 public: 19 19 ProtoClass(); -
trunk/src/proto/proto_singleton.cc
r9406 r9869 17 17 18 18 #include "proto_singleton.h" 19 20 21 19 ObjectListDefinition(ProtoSingleton); 22 20 23 21 /** … … 26 24 ProtoSingleton::ProtoSingleton () 27 25 { 28 this->setClassID(CL_PROTO_ID, "ProtoSingleton"); 29 this->setName("ProtoSingleton"); 30 31 /* If you make a new class, what is most probably the case when you write this file 32 don't forget to: 33 1. Add the new file new_class.cc to the ./src/Makefile.am 34 2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS 35 !!!!!!!!!! IMPORTANT FOR SINGLETON !!!!!!!!!!!!!!!! 36 3. SingleTon MUST be CL_NEW_CLASS = 0x00000fxx 37 38 Advanced Topics: 39 - if you want to let your object be managed via the ObjectManager make sure to read 40 the object_manager.h header comments. You will use this most certanly only if you 41 make many objects of your class, like a weapon bullet. 42 */ 26 this->registerObject(this, ProtoSingleton::_objectList); 27 this->setName("ProtoSingleton"); 43 28 } 44 29 -
trunk/src/proto/proto_singleton.h
r5405 r9869 13 13 //! A default singleton class. 14 14 class ProtoSingleton : public BaseObject { 15 ObjectListDeclaration(ProtoSingleton); 16 15 17 16 18 public:
Note: See TracChangeset
for help on using the changeset viewer.