entity

This class can also be access with fireform.entity if import fireform was used.

class fireform.entity.entity(*contents, ordering=0, tags=set())

A game entity.

This class should not be inherited from (because that’s not how things work).

An entities’ attibutes and behaviours are defined by the ‘blobs’ that they are made from.

attach(c)

Add either a data or behaviour object to the entity.

Data and behaviour objects can only be assigned to one entity. An entity cannot have more than one of any type of named data of behaviour. Note that is may have multiple instances of anonymous datum or behaviours (future feature).

Do not use this method once the entity has been added to the world.

Parameters:
c: fireform.data.base or fireform.behaviour.base

The component to add

kill()

Destroy the entity.

The entity will be removed from the world on the next tick, so you should still check if it is alive when interacting with it.