tuxemon.entity module
- class tuxemon.entity.Entity(*, slug='', world)[source]
Bases:
Generic
[SaveDict
]Entity in the game.
Eventually a class for all things that exist on the game map, like NPCs, players, objects, etc.
Need to refactor in most NPC code to here. Need to refactor -out- all drawing/sprite code. Consider to refactor out world position/movement into “Body” class.
- get_state(session)[source]
Get Entities internal state for saving/loading.
- Parameters:
session (Session) – Game session.
- Return type:
SaveDict
- property moving: bool
Return
True
if the entity is moving.
- set_position(pos)[source]
Set the entity’s position in the game world.
- Parameters:
pos (Sequence[float]) – Position to be set.
- Return type:
None