Open Snipy7374 opened 1 year ago
draw()
in 3.0PhysicsEngine could possible have some type/interface
I've brought this idea up before, but the response I got was that it's hard to standardize on physics engine behavior.
TL;DR: SpriteList
's typing is better now, but please help with Sprite
if you have time and avoid a PhysicsEngine
type until after 3.0.
Sprite
& SpriteList
TypingSpriteList
typing is improved by #1977, but please feel free to take a second lookphysics_engines.py
features in our most popular tutorial, I've started cleaning up the types and docstring in it as part of #1981Sprite
and related classes thoroughly annotatedAs to the engine type / Protocol, here are my current thoughts after starting on #1981:
SpriteList
s + properties for checking collisionScene
's layers and structuring and how it interacts with physics engine objects, but probably after 3.0
Enhancement request:
arcade.Sprite.draw
andarcade.Sprite.register_physic_engine
have unannotated arguments (AKA Unknown) as well asarcade.SpriteList.draw
What should be added/changed?
Add type hints for the mentioned above members.
What would it help with?
It'll help users with development and understanding the actual valid type of arguments.