mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Match Jaymo
This commit is contained in:
parent
207f397e32
commit
f28c65d32b
4 changed files with 46 additions and 45 deletions
|
@ -122,13 +122,13 @@ class DistributedPatternGame(DistributedMinigame):
|
|||
minnieX.removeNode()
|
||||
minnieCircle.removeNode()
|
||||
matchingGameGui.removeNode()
|
||||
self.blinky = NPCToons.createLocalNPC(7010)
|
||||
self.blinky.reparentTo(hidden)
|
||||
self.toon = NPCToons.createLocalNPC(7010)
|
||||
self.toon.reparentTo(hidden)
|
||||
self.backRowHome = Point3(3, 11, 0)
|
||||
self.backRowXSpacing = 1.8
|
||||
self.frontRowHome = Point3(0, 18, 0)
|
||||
self.frontRowXSpacing = 3.0
|
||||
self.stdNumDanceStepPingFrames = self.blinky.getNumFrames(self.toonAnimNames[0])
|
||||
self.stdNumDanceStepPingFrames = self.toon.getNumFrames(self.toonAnimNames[0])
|
||||
self.stdNumDanceStepPingPongFrames = self.__numPingPongFrames(self.stdNumDanceStepPingFrames)
|
||||
self.buttonPressDelayPercent = (self.stdNumDanceStepPingFrames - 1.0) / self.stdNumDanceStepPingPongFrames
|
||||
self.animPlayRates = []
|
||||
|
@ -185,8 +185,8 @@ class DistributedPatternGame(DistributedMinigame):
|
|||
del self.statusBalls
|
||||
self.room.removeNode()
|
||||
del self.room
|
||||
self.blinky.delete()
|
||||
del self.blinky
|
||||
self.toon.delete()
|
||||
del self.toon
|
||||
self.removeChildGameFSM(self.gameFSM)
|
||||
del self.gameFSM
|
||||
|
||||
|
@ -238,19 +238,19 @@ class DistributedPatternGame(DistributedMinigame):
|
|||
self.arrowDict['lt'][k].setPos(0, 0, 1)
|
||||
|
||||
self.formatStatusBalls(self.arrowDict['lt'][2], self.lt.nametag3d)
|
||||
self.blinky.reparentTo(render)
|
||||
self.blinky.setPos(-1.6, 20, 0)
|
||||
self.blinky.setScale(1)
|
||||
self.makeToonLookatCamera(self.blinky)
|
||||
self.blinky.loop('neutral')
|
||||
self.blinky.nametag.manage(base.marginManager)
|
||||
self.blinky.nametag.getNametag3d().setChatWordwrap(8)
|
||||
self.toon.reparentTo(render)
|
||||
self.toon.setPos(-1.6, 20, 0)
|
||||
self.toon.setScale(1)
|
||||
self.makeToonLookatCamera(self.toon)
|
||||
self.toon.loop('neutral')
|
||||
self.toon.nametag.manage(base.marginManager)
|
||||
self.toon.nametag.getNametag3d().setChatWordwrap(8)
|
||||
self.arrowDict['m'] = [self.arrows.pop(), self.xs.pop()]
|
||||
for k in xrange(0, 2):
|
||||
self.arrowDict['m'][k].setBillboardAxis()
|
||||
self.arrowDict['m'][k].setBin('fixed', 100)
|
||||
self.arrowDict['m'][k].setColor(self.arrowColor)
|
||||
self.arrowDict['m'][k].reparentTo(self.blinky.nametag3d)
|
||||
self.arrowDict['m'][k].reparentTo(self.toon.nametag3d)
|
||||
self.arrowDict['m'][k].setScale(4)
|
||||
self.arrowDict['m'][k].setPos(0, 0, 1.7)
|
||||
|
||||
|
@ -267,9 +267,9 @@ class DistributedPatternGame(DistributedMinigame):
|
|||
del self.arrowKeys
|
||||
self.room.reparentTo(hidden)
|
||||
self.roundText.hide()
|
||||
self.blinky.nametag.unmanage(base.marginManager)
|
||||
self.blinky.stop()
|
||||
self.blinky.reparentTo(hidden)
|
||||
self.toon.nametag.unmanage(base.marginManager)
|
||||
self.toon.stop()
|
||||
self.toon.reparentTo(hidden)
|
||||
self.lt.setScale(1)
|
||||
for avId in self.remoteAvIdList:
|
||||
toon = self.getAvatar(avId)
|
||||
|
@ -387,7 +387,7 @@ class DistributedPatternGame(DistributedMinigame):
|
|||
|
||||
def getDanceStepDuration(self):
|
||||
numFrames = self.stdNumDanceStepPingPongFrames
|
||||
return numFrames / abs(self.animPlayRate * self.toonAnimSpeedMult[self.toonAnimNames[0]] * self.blinky.getFrameRate(self.toonAnimNames[0]))
|
||||
return numFrames / abs(self.animPlayRate * self.toonAnimSpeedMult[self.toonAnimNames[0]] * self.toon.getFrameRate(self.toonAnimNames[0]))
|
||||
|
||||
def __getDanceStepAnimTrack(self, toon, anim, speedScale):
|
||||
numFrames = toon.getNumFrames(anim)
|
||||
|
@ -516,12 +516,12 @@ class DistributedPatternGame(DistributedMinigame):
|
|||
index = self.avIdList.index(avId)
|
||||
return self.__getRowPos(self.frontRowHome, self.frontRowXSpacing, index, len(self.avIdList))
|
||||
|
||||
def __setBlinkyChat(self, str, giggle):
|
||||
def __setToonChat(self, str, giggle):
|
||||
str = str.replace('%s', self.getAvatar(self.localAvId).getName())
|
||||
self.blinky.setChatAbsolute(str, CFSpeech)
|
||||
self.toon.setChatAbsolute(str, CFSpeech)
|
||||
|
||||
def __clearBlinkyChat(self):
|
||||
self.blinky.clearChat()
|
||||
def __clearToonChat(self):
|
||||
self.toon.clearChat()
|
||||
|
||||
def enterOff(self):
|
||||
self.notify.debug('enterOff')
|
||||
|
@ -557,13 +557,13 @@ class DistributedPatternGame(DistributedMinigame):
|
|||
toon.setPlayRate(self.animPlayRate * self.toonAnimSpeedMult[anim], anim)
|
||||
|
||||
for anim in self.toonAnimNames:
|
||||
self.blinky.setPlayRate(self.animPlayRate * self.toonAnimSpeedMult[anim], anim)
|
||||
self.toon.setPlayRate(self.animPlayRate * self.toonAnimSpeedMult[anim], anim)
|
||||
|
||||
text = self.strWatch
|
||||
danceTrack = self.getDanceSequenceAnimTrack(self.blinky, self.__serverPattern)
|
||||
danceTrack = self.getDanceSequenceAnimTrack(self.toon, self.__serverPattern)
|
||||
arrowTrack = self.getDanceArrowAnimTrack('m', self.__serverPattern, 0)
|
||||
soundTrack = self.getDanceSequenceButtonSoundTrack(self.__serverPattern)
|
||||
self.showTrack = Sequence(Func(self.__setBlinkyChat, text, 1), Wait(0.5), Parallel(danceTrack, soundTrack, arrowTrack), Wait(0.2), Func(self.__clearBlinkyChat), Func(self.gameFSM.request, 'getUserInput'))
|
||||
self.showTrack = Sequence(Func(self.__setToonChat, text, 1), Wait(0.5), Parallel(danceTrack, soundTrack, arrowTrack), Wait(0.2), Func(self.__clearToonChat), Func(self.gameFSM.request, 'getUserInput'))
|
||||
self.showTrack.start()
|
||||
|
||||
def exitShowServerPattern(self):
|
||||
|
@ -605,7 +605,7 @@ class DistributedPatternGame(DistributedMinigame):
|
|||
self.showStatusBalls(avId)
|
||||
self.__otherToonIndex[avId] = 0
|
||||
|
||||
self.setupTrack = Sequence(Func(self.__setBlinkyChat, self.strGo, 0), Func(self.setText, self.roundText, TTLocalizer.PatternGameGo), Func(self.roundText.setScale, 0.3), Func(enableKeys), Func(startTimer), Wait(0.8), Func(self.__clearBlinkyChat), Func(self.setText, self.roundText, ' '), Func(self.roundText.setScale, 0.12), Func(self.setTextFG, self.roundText, self.normalTextColor))
|
||||
self.setupTrack = Sequence(Func(self.__setToonChat, self.strGo, 0), Func(self.setText, self.roundText, TTLocalizer.PatternGameGo), Func(self.roundText.setScale, 0.3), Func(enableKeys), Func(startTimer), Wait(0.8), Func(self.__clearToonChat), Func(self.setText, self.roundText, ' '), Func(self.roundText.setScale, 0.12), Func(self.setTextFG, self.roundText, self.normalTextColor))
|
||||
self.setupTrack.start()
|
||||
return
|
||||
|
||||
|
@ -685,7 +685,7 @@ class DistributedPatternGame(DistributedMinigame):
|
|||
self.proceedTrack.pause()
|
||||
del self.setupTrack
|
||||
del self.proceedTrack
|
||||
self.__clearBlinkyChat()
|
||||
self.__clearToonChat()
|
||||
|
||||
def enterWaitForPlayerPatterns(self):
|
||||
self.notify.debug('enterWaitForPlayerPatterns')
|
||||
|
@ -751,7 +751,7 @@ class DistributedPatternGame(DistributedMinigame):
|
|||
sound = self.incorrectSound
|
||||
text = self.strWrong
|
||||
soundTrack = Sequence(Func(base.playSfx, sound), Wait(1.6))
|
||||
textTrack = Sequence(Wait(0.2), Func(self.__setBlinkyChat, text, 0), Wait(1.3), Func(self.__clearBlinkyChat))
|
||||
textTrack = Sequence(Wait(0.2), Func(self.__setToonChat, text, 0), Wait(1.3), Func(self.__clearToonChat))
|
||||
self.playBackPatternsTrack = Sequence(Parallel(soundTrack, textTrack, jumpTrack), Func(self.gameFSM.request, 'checkGameOver'))
|
||||
self.playBackPatternsTrack.start()
|
||||
|
||||
|
@ -775,9 +775,9 @@ class DistributedPatternGame(DistributedMinigame):
|
|||
delay = 2.2
|
||||
if self.celebrate:
|
||||
text = TTLocalizer.PatternGameImprov
|
||||
self.__winTrack = Sequence(Func(self.__setBlinkyChat, text, 1), Func(base.playSfx, self.perfectSound), Sequence(self.returnCelebrationIntervals(1)), Sequence(self.returnCelebrationIntervals(0)), Func(self.__clearBlinkyChat), Func(self.gameOver))
|
||||
self.__winTrack = Sequence(Func(self.__setToonChat, text, 1), Func(base.playSfx, self.perfectSound), Sequence(self.returnCelebrationIntervals(1)), Sequence(self.returnCelebrationIntervals(0)), Func(self.__clearToonChat), Func(self.gameOver))
|
||||
else:
|
||||
self.__winTrack = Sequence(Func(self.__setBlinkyChat, text, 1), Func(base.playSfx, sound), Wait(delay), Func(self.__clearBlinkyChat), Func(self.gameOver))
|
||||
self.__winTrack = Sequence(Func(self.__setToonChat, text, 1), Func(base.playSfx, sound), Wait(delay), Func(self.__clearToonChat), Func(self.gameOver))
|
||||
self.__winTrack.start()
|
||||
return
|
||||
|
||||
|
|
|
@ -11536,20 +11536,21 @@ NPCToonDict = {20000: (-1,
|
|||
NPC_REGULAR),
|
||||
7010: (-1,
|
||||
lnames[7010],
|
||||
('dss',
|
||||
('rll',
|
||||
'ms',
|
||||
's',
|
||||
'm',
|
||||
13,
|
||||
'm',
|
||||
2,
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
19,
|
||||
10,
|
||||
13,
|
||||
13,
|
||||
4,
|
||||
4,
|
||||
4,
|
||||
4,
|
||||
1,
|
||||
4),
|
||||
10,
|
||||
7,
|
||||
14,
|
||||
0),
|
||||
'm',
|
||||
0,
|
||||
NPC_REGULAR),
|
||||
|
|
|
@ -4312,8 +4312,8 @@ TugOfWarGameReady = 'Ready...'
|
|||
TugOfWarGameEnd = 'Good game!'
|
||||
TugOfWarGameTie = 'You tied!'
|
||||
TugOfWarPowerMeter = 'Power meter'
|
||||
PatternGameTitle = 'Match Blinky'
|
||||
PatternGameInstructions = 'Little Blinky will show you a dance sequence. ' + "Try to repeat Little Blinky's dance just the way you see it using the arrow keys!"
|
||||
PatternGameTitle = 'Match Jaymo'
|
||||
PatternGameInstructions = 'Jaymo will show you a dance sequence. ' + "Try to repeat Jaymo's dance just the way you see it using the arrow keys!"
|
||||
PatternGameWatch = 'Watch these dance steps...'
|
||||
PatternGameGo = 'GO!'
|
||||
PatternGameRight = 'Good, %s!'
|
||||
|
@ -6241,7 +6241,7 @@ NPCToonNames = {20000: 'Tutorial Tom',
|
|||
7007: 'Dewin Tymme',
|
||||
7008: 'Ima Cagedtoon',
|
||||
7009: 'Jimmy Thelock',
|
||||
7010: 'Little Blinky',
|
||||
7010: 'Jaymo',
|
||||
7011: 'Donald',
|
||||
10001: 'Healer Sara',
|
||||
11001: 'Healer Gabriel',
|
||||
|
@ -6995,10 +6995,10 @@ TipDict = {TIP_NONE: ('',),
|
|||
'If you wait too long to attack a lured Cog, it will wake up. Higher level lures last longer.',
|
||||
'There are fishing ponds on every street in Toontown. Some streets have unique fish.'),
|
||||
TIP_MINIGAME: ('After you fill up your Jellybean jar, any Jellybeans you get from Trolley Games automatically spill over into your bank.',
|
||||
'You can use the arrow keys instead of the mouse in the "Match Blinky" Trolley Game.',
|
||||
'You can use the arrow keys instead of the mouse in the "Match Jaymo" Trolley Game.',
|
||||
'In the Cannon Game you can use the arrow keys to move your cannon and press the "Control" key to fire.',
|
||||
'In the Ring Game, bonus points are awarded when the entire group successfully swims through its rings.',
|
||||
'A perfect game of Match Blinky will double your points.',
|
||||
'A perfect game of Match Jaymo will double your points.',
|
||||
'In the Tug-of-War you are awarded more Jellybeans if you play against a tougher Cog.',
|
||||
'Trolley Game difficulty varies by neighborhood; ' + lToontownCentral + ' has the easiest and ' + lDonaldsDreamland + ' has the hardest.',
|
||||
'Certain Trolley Games can only be played in a group.'),
|
||||
|
|
|
@ -347,7 +347,7 @@ MinigameNames = {'race': RaceGameId,
|
|||
'cannon': CannonGameId,
|
||||
'tag': TagGameId,
|
||||
'pattern': PatternGameId,
|
||||
'minnie': PatternGameId,
|
||||
'jaymo': PatternGameId,
|
||||
'match': PatternGameId,
|
||||
'matching': PatternGameId,
|
||||
'ring': RingGameId,
|
||||
|
|
Loading…
Reference in a new issue