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
- logic (None or instance of
Logic) – type’s logic
|
-
class
Mind.Existence.Logic(lf, lc=[], doc='', name='')[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.*
-
class
Mind.Existence.logic_obj(obj)[source]
Logic object.*
-
bind(obj)[source]
Binds logic object with type’s object.*
-
class
Mind.Existence.logic_object(cls)[source]
Decorator for logic object class.
-
class
Mind.Existence.Subject[source]
Subject logic for move_type logic.
-
class
Mind.Existence.opt_size[source]
Optimizes size of object. Size will be picture size.
-
class
Mind.Existence.gravity[source]
Basic gravity object logic class.
| Parameters: |
- g (float) – pixels of acceleration
- jf (float) – jump force
|
-
cls
alias of gravity
-
class
Mind.Existence.collider[source]
Basic collision object logic class.
| Parameters: |
- funcs (list of function or None) – list functions to execute (1st for player’s left, 2nd for player’s down ... 5th for any collision)
- cl_types (str) – names of colliding types
|
-
cls
alias of collider
-
class
Mind.Existence.collider2[source]
Basic collision object logic class (simmilar to collider).
| Parameters: |
- cl_types (str) – names of colliding types
- attr (str) – name of attribute in which are collide functions
|
-
cls
alias of collider2