Poodletooth-iLand/toontown/safezone/TTPlayground.py

19 lines
600 B
Python
Raw Normal View History

2015-03-03 16:10:12 -06:00
from direct.task.Task import Task
from toontown.safezone import Playground
import random
2015-03-03 16:10:12 -06:00
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')
2015-07-05 18:59:25 -05:00
return Task.done