예제 #1
0
 def built_from_axis_origin(cls,
                            x_axis=Vector2(),
                            y_axis=Vector2(),
                            origin=Vector2()):
     self._check_param_type('x_axis', x_axis, Vector2)
     self._check_param_type('y_axis', y_axis, Vector2)
     self._check_param_type('origin', origin, Vector2)
     ret = Transform2D()
     lib.godot_transform2d_new_with_axis_origin(self._gd_ptr,
                                                x_axis._gd_ptr,
                                                y_axis._gd_ptr,
                                                origin._gd_ptr)
     return ret
예제 #2
0
 def __init__(self, rot=0.0, pos=Vector2()):
     self._check_param_float('rot', rot)
     self._check_param_type('pos', pos, Vector2)
     self._gd_ptr = godot_transform2d_alloc()
     lib.godot_transform2d_new(self._gd_ptr, rot, pos._gd_ptr)