def set_distance_traveled(self, val: Optional[int] = None) -> None: if val is not None: self.distance_traveled = val self.distance_traveled += self.get_distance_traveled() set_texture_uvpos( self, self.texture.uvpos[0] + self.bike.speed / self.texture.size[0], self.texture.uvpos[1]) ValidObject.scene(self.parent).define_and_add_map_elements()
def scene(self): if hasattr(self.road, 'parent') and self.road.parent: return ValidObject.scene(self.road.parent)