Open aoloe opened 3 years ago
If there is an interest in this feature, I can work on a formal proposal and possibly produce a pull request.
This is a good idea - it's something that is already in Wasabi2D and works well (and is handy).
I'd suggest simply avoiding the Actor class though. We can create a new class like shapes.Rectangle()
and expose shapes
as a built-in.
I also thought about creating a new ActorShape
class.
Still, I'm rather in favor of adding the feature to the Actor
class.
Keeping the same class would help the programmer start with a shape and later move to an image.
But I'm ok with other solutions.
If we put everything in the Actor
, draw()
might automatically draw a shape if one is defined... (also useful for checking the bounding boxes...)...
And do nothing if both the shape and the image are not defined.
seems you need Sprite class linke Sprite in ActionScript 3
This is a good idea - it's something that is already in Wasabi2D and works well (and is handy).
pgzero is nice for teaching kids, Wasabi2D is powerful, but need more work making it out-of-box and lower floor for newbee.
Decorator maybe hard to understand for kids
When teaching the first steps with Pygame zero, kids tend to get lost in:
Would it be possible to allow the actors to also use shapes like rectangles and squares?
I'm thinking of something like