示例#1
0
    def add_mob(self,
                mob: Mob,
                x: float,
                y: float,
                mass: float = 100,
                friction: float = 1.):
        """Adds a mob to the game world centred at the position ('x', 'y')

        Parameters:
            mob (Mob): The mob to add to the game world

            - See add_thing for other parameters
        """

        self.add_thing(mob,
                       x,
                       y,
                       mob.get_size(),
                       collision_type=self._collision_types['mob'],
                       categories=self._thing_categories["mob"],
                       mass=mass,
                       friction=friction)