def apply_force(self, force, point): fp_core_force = libfp_core.Point() fp_core_force.x = force.x fp_core_force.y = force.y fp_core_point = libfp_core.Point() fp_core_point.x = point.x fp_core_point.y = point.y return self.run_native("apply_force", fp_core_force, fp_core_point)
def set_scale(self, value): ''' convert to native fp_core Point object set scale ''' if hasattr(value, "x"): p = libfp_core.Point() p.x = value.x p.y = value.y elif isinstance(value, float): p = libfp_core.Point() p.x = value p.y = value else: raise Exception( "Native group set_scale must take a Point or float") return self.run_native("set_scale", p)
def set_position(self, point): ''' convert to native fp_core Point object sets position of the group and updates all of the items in the group as well ''' p = libfp_core.Point() p.x = point.x p.y = point.y return self.run_native("set_position", p)
def set_gravity(self, gravity): p = libfp_core.Point() p.x = gravity.x p.y = gravity.y return self.run_native("set_gravity", p)
def set_linear_velocity(self, velocity): p = libfp_core.Point() p.x = velocity.x p.y = velocity.y return self.run_native("set_linear_velocity", p)