(self, pos, size)
Translate and scale the goal.
Translate and scale the goal.
Translate and scale the goal .
def _move_goal(self, pos, size):
    """Translate and scale the goal."""
    for geom in self._goal_geoms:
      unit_fromto = _GOALPOSTS[geom.name]
      geom.fromto = _goalpost_fromto(unit_fromto, size, pos, self._direction)
      geom.size = (_post_radius(geom.name, self._goalpost_radius),)
    if self._make_net:
      net_vertices = self._make_net_vertices(size)
      for geom in self._net_geoms:
        geom.pos = pos
        geom.mesh.vertex = net_vertices[geom.mesh.name]
        geom.mesh.scale = size
def _move_goal ( self , pos , size ) : for geom in self . _goal_geoms : unit_fromto = _GOALPOSTS [ geom . name ] geom . fromto = _goalpost_fromto ( unit_fromto , size , pos , self . _direction ) geom . size = ( _post_radius ( geom . name , self . _goalpost_radius ) , ) if self . _make_net : net_vertices = self . _make_net_vertices ( size ) for geom in self . _net_geoms : geom . pos = pos geom . mesh . vertex = net_vertices [ geom . mesh . name ] geom . mesh . scale = size