Mind.Existence

Classes, methods and functions marked with * aren’t for usual cases, they are made to help to the rest of the library.

class Mind.Existence.Object(*groups)[source]

Basic object class in object/group model.

Parameters:groups – groups which object belongs to
add_group(gr)[source]

Adds groups to object.

Parameters:gr – group which will object be added to.
class Mind.Existence.group(*objects, groups=[], part=False)[source]

Basic group class in object/group model.

Parameters:
  • objects – objects which belongs to group
  • groups (list) – list of groups group belongs to
  • part (bool) – if True if any object has some function it will belong to group
add_func(fname)[source]

Adds function to group.*

add_object(obj)[source]

Adds object to group.

Parameters:obj – object which will be added to group.
Mind.Existence.join(*dicts)[source]

Joins dictionaries.*

class Mind.Existence.mov_type(Type, Map, picture, *groups, width=None, height=None, name='', props={}, logic=None)[source]

Basic class for all types of game objects.

Parameters:
  • Map – Map for all objects
  • picture – picture for all objects
  • groups – groups for all objects
  • width (int) – width for all objects
  • height (int) – height for all objects
  • name (str) – type name for all objects
  • props (dict) – properties for all objects
class Mind.Existence.Logic(lf)[source]

Basic logic class for move type.*

Mind.Existence.init_logic(fnc)[source]

Decorator for init logic functions.

Mind.Existence.blit_logic(fnc)[source]

Decorator for blit logic functions.

Mind.Existence.set_pos_logic(fnc)[source]

Decorator for set_position logic functions.

Mind.Existence.move_logic(fnc)[source]

Decorator for move logic functions.

class Mind.Existence.logic_class(cls)[source]

Decorator for logic class.

bind(obj)[source]

Binds logic class with type’s object.*