mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-21 12:00:18 +00:00
...
This commit is contained in:
parent
f80e5b7e6d
commit
ccb4d84d8b
@ -40,7 +40,7 @@ void PyBody::_register(VM* vm, PyObject* mod, PyObject* type){
|
|||||||
PK_REGISTER_PROPERTY(PyBody, "friction: float", _b2Fixture, GetFriction, SetFriction)
|
PK_REGISTER_PROPERTY(PyBody, "friction: float", _b2Fixture, GetFriction, SetFriction)
|
||||||
PK_REGISTER_PROPERTY(PyBody, "restitution: float", _b2Fixture, GetRestitution, SetRestitution)
|
PK_REGISTER_PROPERTY(PyBody, "restitution: float", _b2Fixture, GetRestitution, SetRestitution)
|
||||||
PK_REGISTER_PROPERTY(PyBody, "restitution_threshold: float", _b2Fixture, GetRestitutionThreshold, SetRestitutionThreshold)
|
PK_REGISTER_PROPERTY(PyBody, "restitution_threshold: float", _b2Fixture, GetRestitutionThreshold, SetRestitutionThreshold)
|
||||||
PK_REGISTER_PROPERTY(PyBody, "is_trigger: bool", _b2Fixture, IsSensor, SetSensor)
|
PK_REGISTER_PROPERTY(PyBody, "is_sensor: bool", _b2Fixture, IsSensor, SetSensor)
|
||||||
|
|
||||||
vm->bind(type, "set_box_shape(self, hx: float, hy: float)",
|
vm->bind(type, "set_box_shape(self, hx: float, hy: float)",
|
||||||
[](VM* vm, ArgsView args){
|
[](VM* vm, ArgsView args){
|
||||||
|
@ -112,7 +112,7 @@ class Body:
|
|||||||
friction: float
|
friction: float
|
||||||
restitution: float
|
restitution: float
|
||||||
restitution_threshold: float
|
restitution_threshold: float
|
||||||
is_trigger: bool
|
is_sensor: bool
|
||||||
|
|
||||||
def __new__(cls, world: World, node: _NodeLike = None):
|
def __new__(cls, world: World, node: _NodeLike = None):
|
||||||
"""create a body in the world."""
|
"""create a body in the world."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user