2015-03-03 16:10:12 -06:00
|
|
|
from toontown.classicchars import CCharPaths
|
2015-03-16 08:41:50 -05:00
|
|
|
from direct.fsm import ClassicFSM, State
|
|
|
|
import random
|
2015-03-03 16:10:12 -06:00
|
|
|
from toontown.safezone import Playground
|
|
|
|
from toontown.toonbase import TTLocalizer
|
2015-03-16 08:41:50 -05:00
|
|
|
from toontown.toonbase import ToontownGlobals
|
2015-03-03 16:10:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
class MMPlayground(Playground.Playground):
|
2015-03-16 08:41:50 -05:00
|
|
|
def __init__(self, loader, parentFSM, doneEvent):
|
|
|
|
Playground.Playground.__init__(self, loader, parentFSM, doneEvent)
|
|
|
|
self.activityFsm = ClassicFSM.ClassicFSM('Activity', [State.State('off', self.enterOff, self.exitOff, ['OnPiano']), State.State('OnPiano', self.enterOnPiano, self.exitOnPiano, ['off'])], 'off', 'off')
|
|
|
|
self.activityFsm.enterInitialState()
|
|
|
|
|
2015-03-03 16:10:12 -06:00
|
|
|
def showPaths(self):
|
|
|
|
self.showPathPoints(CCharPaths.getPaths(TTLocalizer.Minnie))
|
2015-03-16 08:41:50 -05:00
|
|
|
|
|
|
|
def enterOff(self):
|
|
|
|
return None
|
|
|
|
|
|
|
|
def exitOff(self):
|
|
|
|
return None
|
|
|
|
|
|
|
|
def enterOnPiano(self):
|
|
|
|
base.localAvatar.b_setParent(ToontownGlobals.SPMinniesPiano)
|
|
|
|
|
|
|
|
def exitOnPiano(self):
|
|
|
|
base.localAvatar.b_setParent(ToontownGlobals.SPRender)
|
|
|
|
|
|
|
|
|