Animation Factory
src.view.animation_factory
¶
Factory helpers for animation-related view objects.
The documentation follows Google-style docstrings so tools such as pdoc, Sphinx Napoleon, or MkDocs-based pipelines can expose parameters, return values, and side effects in a consistent HTML API reference.
AnimationFactory
¶
Small factory that creates animation and effect view objects.
Notes
This class is documented as part of the public project API and is intended to be readable in generated HTML documentation.
Source code in src\view\animation_factory.py
create_animation(hero, sprite_conf)
¶
Create the animation view object associated with a unit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hero
|
Unit
|
Unit model instance to register or update. |
required |
sprite_conf
|
SpriteConfig instance describing frame indexes and effect metadata. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
object |
Value produced by the underlying game or rendering operation. |
Source code in src\view\animation_factory.py
create_effect(sprite_conf)
¶
Create the effect view object associated with a sprite configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sprite_conf
|
SpriteConfig instance describing frame indexes and effect metadata. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
object |
Value produced by the underlying game or rendering operation. |