예제 #1
0
파일: NPC_VP.py 프로젝트: tsp-team/ttsp-src
    def doActivity(self):
        stunDur = self.avatar.getDuration("stun")
        raiseDur = self.avatar.getDuration("raise")
        waitDur = 10.0 - stunDur - raiseDur
        return Parallel(Sequence(Func(self.avatar.loopSound, "chirp"), Func(self.avatar.playSound, "stun"),
                        ActorInterval(self.avatar, "stun"), Func(self.avatar.loop, "downNeutral"),
                        Wait(waitDur), Func(self.avatar.stopSound, "chirp"), Func(self.avatar.playSound, "raise"),
                        ActorInterval(self.avatar, "raise")),

                        SuitGlobals.createStunInterval(self.avatar, 0, stunDur + waitDur, pos = (2, 0, 0), hpr = (0, 0, 90), scale = 2.5))
예제 #2
0
    def enterStunned(self, animB4Stun, ts = 0):
        self.show()

        animB4Stun = SuitGlobals.getAnimById(animB4Stun).getName()

        self.stunnedSound = base.loadSfxOnNode("phase_4/audio/sfx/SZ_TC_bird1.ogg", self)
        self.stunnedSound.setLoop(True)
        self.stunnedSound.play()

        self.stunnedIval = Parallel(Sequence(ActorInterval(self, animB4Stun),
                                             Func(self.loop, 'stunned')),
                                    SuitGlobals.createStunInterval(self, 0, 100))
        self.stunnedIval.start()
예제 #3
0
 def doStunEffect(self):
     self.clearStunnedIval()
     self.stunnedIval = SuitGlobals.createStunInterval(self, 0, 2)
     self.stunnedIval.start()