Poodletooth-iLand/toontown/safezone/TTPlayground.py
John 35b646c4e6 Revert "Spring cleaning"
This reverts commit 1e4bad8c6b.
2015-06-16 20:26:44 +03:00

18 lines
No EOL
599 B
Python
Executable file

from direct.task.Task import Task
from toontown.safezone import Playground
import random
class TTPlayground(Playground.Playground):
def enter(self, requestStatus):
Playground.Playground.enter(self, requestStatus)
taskMgr.doMethodLater(1, self.__birds, 'TT-birds')
def exit(self):
Playground.Playground.exit(self)
taskMgr.remove('TT-birds')
def __birds(self, task):
base.playSfx(random.choice(self.loader.birdSound))
time = random.random() * 20.0 + 1
taskMgr.doMethodLater(time, self.__birds, 'TT-birds')
return Task.done