mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-25 12:42:41 -06:00
25 lines
777 B
Python
25 lines
777 B
Python
|
from direct.task import Task
|
||
|
import random
|
||
|
|
||
|
from toontown.classicchars import CCharPaths
|
||
|
from toontown.safezone import Playground
|
||
|
from toontown.toonbase import TTLocalizer
|
||
|
|
||
|
|
||
|
class DGPlayground(Playground.Playground):
|
||
|
def enter(self, requestStatus):
|
||
|
Playground.Playground.enter(self, requestStatus)
|
||
|
taskMgr.doMethodLater(1, self.__birds, 'DG-birds')
|
||
|
|
||
|
def exit(self):
|
||
|
Playground.Playground.exit(self)
|
||
|
taskMgr.remove('DG-birds')
|
||
|
|
||
|
def showPaths(self):
|
||
|
self.showPathPoints(CCharPaths.getPaths(TTLocalizer.Goofy))
|
||
|
|
||
|
def __birds(self, task):
|
||
|
base.playSfx(random.choice(self.loader.birdSound))
|
||
|
time = random.random() * 20.0 + 1
|
||
|
taskMgr.doMethodLater(time, self.__birds, 'DG-birds')
|
||
|
return Task.done
|