Package horizons :: Package world :: Package units :: Class UnitClass
[hide private]
[frames] | no frames]

Type UnitClass

source code

       object --+        
                |        
             type --+    
                    |    
ingametype.IngameType --+
                        |
                       UnitClass

Instance Methods [hide private]
the object's type
__init__(self, id, yaml_data)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_loadObject(cls)
Loads the object with all animations.
source code
 
_do_load(cls, all_action_sets, action_set, action_id) source code

Inherited from type: __call__, __delattr__, __eq__, __ge__, __getattribute__, __gt__, __hash__, __instancecheck__, __le__, __lt__, __ne__, __repr__, __setattr__, __subclasscheck__, __subclasses__, mro

Inherited from object: __format__, __reduce__, __reduce_ex__, __sizeof__, __str__, __subclasshook__

    Inherited from ingametype.IngameType
a new object with type S, a subtype of T
__new__(self, id, yaml_data) source code
 
_fife_object(self) source code
 
_parse_component_templates(self)
Prepares misc data in self.component_templates
source code
 
_strip_translation_marks(self, string)
Converts object translation `string` to translated object for in-game display.
source code
 
name(self) source code
Class Methods [hide private]
 
ensure_action_loaded(cls, action_set_id, action)
Called when an action is actually needed, makes sure it is loaded then
source code
Class Variables [hide private]
  log = logging.getLogger('world.units')
  basepackage = 'horizons.world.units.'
  classstring = 'Unit[{id}]'
  _action_load_callbacks = {}
Instance Variables [hide private]
    Inherited from ingametype.IngameType
  additional_provided_resources
TUTORIAL: Now you know the basic attributes each type has.
Properties [hide private]

Inherited from type: __abstractmethods__, __base__, __bases__, __basicsize__, __dictoffset__, __flags__, __itemsize__, __mro__, __name__, __weakrefoffset__

Inherited from object: __class__

Method Details [hide private]

__init__(self, id, yaml_data)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • id - unit id.
Returns: the object's type
Overrides: object.__init__

_loadObject(cls)

source code 

Loads the object with all animations.

Overrides: ingametype.IngameType._loadObject