This commit is contained in:
blueloveTH 2023-08-20 14:40:06 +08:00
parent f80e5b7e6d
commit ccb4d84d8b
2 changed files with 2 additions and 2 deletions

View File

@ -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, "restitution: float", _b2Fixture, GetRestitution, SetRestitution)
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* vm, ArgsView args){

View File

@ -112,7 +112,7 @@ class Body:
friction: float
restitution: float
restitution_threshold: float
is_trigger: bool
is_sensor: bool
def __new__(cls, world: World, node: _NodeLike = None):
"""create a body in the world."""