Skip to content

New layer groups (2796) #1433

Open
Open
@GalacticEmperor1

Description

@GalacticEmperor1

Issue №2796 opened by fortwoone at 2021-10-24 18:38:31

Description

I suggest we add new types of sprite groups :

  • LayeredFilter : would be able to block sprite addition based on their type ;
  • AutomatedLayered : each subclass of this group would have a class attribute sprite_table (a dict containing pairs of str and ints, each key being the name of a sprite class and the mapped integer the corresponding layer) to which it would refer when adding sprites.

Moreover, it could also be interesting to create a NoSpriteLayer singleton in case someone makes sprites for certain uses and don't want these sprites to be rendered (e.g., adding a sprite of that kind into a group to prevent the player from moving).


Comments

# # fortwoone commented at 2021-11-07 11:59:43

I used some subclasses of current LayeredUpdates that behave similarly in my game, definition here : https://github.com/fortwoone/Oracle-Project/blob/61bb6d122311ab71013a839ce53811503812da91/oracle_project/game.py

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions