25) 倍率 = random.randint(1, 3) sq['width'] = (一般尺寸 + random.randint(0, 10)) * 倍率 sq['height'] = (一般尺寸 + random.randint(0, 10)) * 倍率 sq['x'], sq['y'] = 獲得隨機視窗變量(視窗x, 視窗y, sq['width'], sq['height']) sq['movex'] = 獲得隨機速度() sq['movey'] = 獲得隨機速度() if sq['movex'] < 0: sq['外表'] = pygame.transform.scale(向左松鼠圖案, (sq['width'], sq['height'])) else: sq['外表'] = pygame.transform.scale(向右松鼠圖案, (sq['width'], sq['height'])) sq['跳'] = 0 sq['跳出率'] = random.randint(10, 18) sq['跳躍高度'] = random.randint(10, 50) return sq