Changes between Initial Version and Version 1 of Exposed_Entity_Template_Functions


Ignore:
Timestamp:
Feb 23, 2008, 4:19:00 AM (16 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Exposed_Entity_Template_Functions

    v1 v1  
     1'''Pyrogenesis Object Model : !EntityTemplate class'''
     2
     3The properties of the !EntityTemplate object are used to initialize corresponding properties of entities of the same type. !EntityTemplate, like Entity, is designed in such a way that the engine itself only defines the minimum set of properties needed for the class to be useable. It is expected that most properties required by the game will primarily be described through external XML files, though they can also be defined by script. This class uses Prometheus' data-inheritance system, so each !EntityTemplate object can specify a parent object to initialize properties from, overriding them as needed. In turn, Entity objects inherit properties from !EntityTemplate objects of their class. Objects of this class cannot be constructed from script; instead, an object is created for each entity class defined in XML files at load-time.
     4
     5= !EntityTemplate Global Functions =
     6
     7== getEntityTemplate ==
     8 * '''Overview:'''
     9  * Look up an !EntityTemplate by name.
     10 * '''Syntax:'''
     11  * template = getEntityTemplate(name);
     12 * '''Parameters:'''
     13  * template name [wstring]
     14 * '''Returns:'''
     15  * entity template object
     16 * '''Notes:'''
     17  *
     18
     19= !EntityTemplate Methods =
     20
     21== toString (Implicit) ==
     22 * '''Overview:'''
     23  * Overrides the default string conversion to include the class name of this template.
     24 * '''Syntax:'''
     25  * toString();
     26 * '''Parameters:'''
     27  * None.
     28 * '''Returns:'''
     29  * A string of the form '[object !EntityTemplate: <Name>]'.
     30 * '''Notes:'''
     31  * This function is called implicitly by the !JavaScript engine to convert this object to a string.
     32
     33= !EntityTemplate Properties =
     34
     35These are the properties currently defined for entity classes by the engine. A more complete list, including the properties defined by data for 0 A.D., can be found in the design document.
     36
     37== super ==
     38 * '''Overview:'''
     39  * Gets or sets a reference to the parent object, from which properties of this template can be inherited.
     40 * '''Type:'''
     41  * !EntityTemplate
     42
     43== name ==
     44 * '''Overview:'''
     45  * Gets or sets the displayed class name.
     46 * '''Type:'''
     47  * string
     48 * '''Notes:'''
     49  * This property can be inherited from the parent template.
     50
     51== speed ==
     52 * '''Overview:'''
     53  * Gets or sets the default maximum speed of entities of this class.
     54 * '''Type:'''
     55  * double
     56 * '''Notes:'''
     57  * This property can be inherited from the parent template.
     58
     59== turningRadius ==
     60 * '''Overview:'''
     61  * Gets or sets the default minimum turning radius of entities of this class.
     62 * '''Type:'''
     63  * double
     64 * '''Notes:'''
     65  * This property can be inherited from the parent template.