Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions play/play.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import pygame
pygame.init()
import pygame.mixer
import pygame.gfxdraw
import pymunk as _pymunk

Expand Down Expand Up @@ -1348,8 +1349,15 @@ def color(self, color_):
self._color = color_
self._should_recompute_primary_surface = True

def new_sound(sound):
return Sound(sound)

class Sound():
def __init__(self, sound):
self.sound = pygame.mixer.Sound(sound)

def play(self):
self.sound.play()

# @decorator
def when_sprite_clicked(*sprites):
Expand Down