type TMuggleDefinition = class(
TMuggleBaseObject
)
There is one MuggleDefinition per class of MuggleObject.
A MuggleDefinition is created by MuggleManager.RegisterClass
When a MuggleObject is first created, it's Initialization routine is called.
This allows objects to use no memory until they are created, so there could be many possible objects for the world, not using resources until created.
This behavior can be called ahead of time, to preload during startup.
The user does not need to worry about MuggleDefinitions. They are maintained by the engine. However they can be useful to store one-time class Data (such as the MasterObject FreeForm for ProxyObjects), and class-wide information.
TMuggleBaseObject
![]() |
Constructor Create; override; |
![]() |
procedure DecrementCount; |
![]() |
Destructor Destroy; override; |
![]() |
procedure IncrementCount; |
![]() |
Constructor Create; override; |
![]() |
procedure DecrementCount; |
Decrement Count by 1
![]() |
Destructor Destroy; override; |
![]() |
procedure IncrementCount; |
Increment Count by 1
![]() |
property ClassID: integer; |
![]() |
property ClassKind: TMuggleClass; |
![]() |
property Count: integer; |
![]() |
property Data: TMuggleBaseContainer; |
![]() |
property Initialized: boolean; |
![]() |
property Maximum: integer; |
![]() |
property Name: string; |
![]() |
property NamePlural: string; |
![]() |
property NameSearch: string; |
![]() |
property NameSearchPlural: string; |
![]() |
property ClassID: integer; |
Unique Class ID
![]() |
property ClassKind: TMuggleClass; |
Class
![]() |
property Count: integer; |
Current number in the world
![]() |
property Data: TMuggleBaseContainer; |
Storage (master objects, etc)
![]() |
property Initialized: boolean; |
Has this class been initialized? (an object of this class added to the engine)
![]() |
property Maximum: integer; |
Maximum allowed in the world
![]() |
property Name: string; |
Name
![]() |
property NamePlural: string; |
Plural Name
![]() |
property NameSearch: string; |
Lower cased name for searching
![]() |
property NameSearchPlural: string; |
Lower cased plural name for searching