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)
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)
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)
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))
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))