Example #1
0
 async def move_camera_spatial(self, position: Union[Point2, Point3]):
     """ Moves camera to the target position using the spatial aciton interface """
     from s2clientprotocol import spatial_pb2 as spatial_pb
     assert isinstance(position, (Point2, Point3))
     action = sc_pb.Action(action_render=spatial_pb.ActionSpatial(
         camera_move=spatial_pb.ActionSpatialCameraMove(
             center_minimap=common_pb.PointI(x=position.x, y=position.y))))
     await self._execute(action=sc_pb.RequestAction(actions=[action]))
Example #2
0
    async def move_camera_spatial(self, position: Union[Point2, Point3]):
        """Moves camera to the target position using the spatial aciton interface

        :param position:"""
        assert isinstance(position, (Point2, Point3))
        action = sc_pb.Action(action_render=spatial_pb.ActionSpatial(
            camera_move=spatial_pb.ActionSpatialCameraMove(
                center_minimap=position.as_PointI)))
        await self._execute(action=sc_pb.RequestAction(actions=[action]))