Basic2(xy=(0,0), vxy=(0,0), axy=(0,0), ...)
I am planning on taking this class out in the next version of rabbyt. If you want it to stay, drop me an email explaining why and I might change my mind.
(You can also use the single value properties as keyword arguments, if you prefer.)
This is a convenience class for using two Basic1 instances to simulate physics in two dimensions.
Using item access will return the individual Basic1 instances, so this would work fine:
sprite.xy = Basic2((0,10), axy=(0,-9.81))
You can set the positions, velocities, and accelerations for x and y with the properties x, y, vx, vy, ax, and ay.
You can also assign/retrieve two value at once with xy, vxy, or axy.
Any of these properties can be passed to __init__() as keyword arguments.
Basic2 instances are not automatically added to rabbyt.physics.default_update_manager, but the individual Basic1 instances used for each dimension are. (Adding the Basic2 instance as well would result in the Basic1 instances being updated twice!)
x acceleration
x and y accelerations
y acceleration
x velocity
x and y velocities
y velocity
x position
x and y positions
y position