예제 #1
0
 def invalid_target(self, sender, target):
     if isPlayer(target):
         pstatus = self.player_status[target]
         avatar = pstatus.avatar
         if avatar.shaking == 0:
             avatar.shaking = 1
             avatar._pos.set_transition(dt=0.25, method=lambda t: anim.oscillate_n(t, 4))
             avatar.pos += euclid.Vector3(10, 0, 0)
             clock.schedule_once(lambda t: setattr(avatar, "shaking", 0), 0.5)
     elif isPermanent(target):
         zone = self.play_zones[target.controller]
         guicard = zone.get_card(target)
         guicard.shake()
         clock.schedule_once(lambda t: guicard.unshake(), 0.25)
예제 #2
0
 def invalid_target(self, sender, target):
     if isPlayer(target):
         pstatus = self.player_status[target]
         avatar = pstatus.avatar
         if avatar.shaking == 0:
             avatar.shaking = 1
             avatar._pos.set_transition(
                 dt=0.25, method=lambda t: anim.oscillate_n(t, 4))
             avatar.pos += euclid.Vector3(10, 0, 0)
             clock.schedule_once(lambda t: setattr(avatar, "shaking", 0),
                                 0.5)
     elif isPermanent(target):
         zone = self.play_zones[target.controller]
         guicard = zone.get_card(target)
         guicard.shake()
         clock.schedule_once(lambda t: guicard.unshake(), 0.25)
예제 #3
0
 def shake(self):
     self._pos.set_transition(dt=0.25,
                              method=lambda t: anim.oscillate_n(t, 3))
     self.pos += euclid.Vector3(0.05, 0, 0)
예제 #4
0
 def animate(self, status):
     symbol = self.symbols[status]
     symbol.scale = anim.animate(symbol.scale, 1.15*symbol.scale, dt=1.0, method=lambda t: anim.oscillate_n(t, 3))
예제 #5
0
 def animate(self, status):
     symbol = self.symbols[status]
     symbol.scale = anim.animate(symbol.scale,
                                 1.15 * symbol.scale,
                                 dt=1.0,
                                 method=lambda t: anim.oscillate_n(t, 3))
예제 #6
0
파일: card.py 프로젝트: trunghuynh/incantus
 def shake(self):
     self._pos.set_transition(dt=0.25, method=lambda t: anim.oscillate_n(t, 3))
     self.pos += euclid.Vector3(0.05, 0, 0)