Skip to content

Sprite: Change velocity into a tuple#1436

Merged
einarf merged 1 commit intopythonarcade:developmentfrom
einarf:velocity-tuple
Dec 15, 2022
Merged

Sprite: Change velocity into a tuple#1436
einarf merged 1 commit intopythonarcade:developmentfrom
einarf:velocity-tuple

Conversation

@einarf
Copy link
Member

@einarf einarf commented Dec 15, 2022

This solves a a few problems

  • velocity is now a publicly documented member of Sprite
  • Users setting sprite.velocity = 1, 1 will no longer get weird crashes
  • Even if the users supplies a list they will be fine

@einarf
Copy link
Member Author

einarf commented Dec 15, 2022

I don't know how this will affect persomance considering we're adding some extra tuple creations.

It can be changed into two separate float value members if needed, but it should definitely not be a list.

@einarf einarf merged commit 48a9ce5 into pythonarcade:development Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant