Source code for pyrcareworld.attributes.cloth_attr

import pyrcareworld.attributes as attr


[docs] class ClothAttr(attr.BaseAttr): """ Obi cloth class. """
[docs] def parse_message(self, data: dict): """ Parse messages. This function is called by internal function. Returns: Dict: A dict containing useful information of this class. """ super().parse_message(data)
[docs] def GetParticles(self): """ get the cloth particles. """ self._send_data("GetParticles")
[docs] def AddAttach(self, id: int, max_dis: float = 0.03): """ Add Attach clothing to attr object with given ID Args: id: Int, Tatget attr object id. max_dis: Float, max distance. """ self._send_data("AddAttach", int(id), float(max_dis))
[docs] def RemoveAttach(self, id: int): """ Remove Attach clothing to attr object with given ID Args: id: Int, Tatget attr object id. """ self._send_data("RemoveAttach", int(id))