Difference between revisions of "Lua:Class:Component"
Jump to navigation
Jump to search
(Created page with ''''Component Class''': (Inheritance: Object) Base class for components ===Properties=== ComponentCount: Integer - Number of child components . Readonly Component[int]: …') |
|||
Line 20: | Line 20: | ||
setTag(tagvalue) : Get the tag value | setTag(tagvalue) : Get the tag value | ||
getOwner() : Returns the owner of this component | getOwner() : Returns the owner of this component | ||
+ | |||
+ | ---- | ||
+ | |||
+ | * [[Lua|Lua Functions and Classes]] |
Revision as of 23:49, 17 January 2017
Component Class: (Inheritance: Object)
Base class for components
Properties
ComponentCount: Integer - Number of child components . Readonly Component[int]: Component - Array containing the child components. Starts at 0. Readonly ComponentByName[string]: Component - Returns a component based on the name. Readonly Name: string - The name of the component Tag: integer - Free to use storage space. (Usefull for id's) Owner: Component - Returns the owner of this object. Nil if it has none
Methods
getComponentCount() : Returns the number of components attached to his component getComponent(index) : Returns the specific component findComponentByName(name) : Returns the component with this name getName() : Return the name setName(newname) : Changes the name getTag() : Sets an integer value. You can use this for ID's setTag(tagvalue) : Get the tag value getOwner() : Returns the owner of this component