def __init__(self, cr, attackerId, hitObject, objType, pos, skillId, ammoSkillId, normal=None): ProjectileEffect.__init__(self, cr, attackerId, hitObject, objType, pos, skillId, ammoSkillId, normal)
def setProjectileSkillResult(self, skillId, ammoSkillId, skillResult, targetId, areaIdList, attackerEffects, targetEffects, areaIdEffects, pos, normal, codes, attackerId, timestamp): attacker = base.cr.doId2do.get(attackerId) if not attacker: pass if not self.localAvatarUsingWeapon: pos = Point3(*pos) normal = Vec3(*normal) target = self.cr.doId2do.get(targetId) if target: target.projectileWeaponHit(skillId, ammoSkillId, skillResult, targetEffects, pos, normal, codes, attacker) if not codes and base.cr.wantSpecialEffects != 0: objType = 0 ProjectileEffect(self.cr, attackerId, target, objType, pos, skillId, ammoSkillId) for id, effects in zip(areaIdList, areaIdEffects): target = self.cr.doId2do.get(id) if target: target.projectileWeaponHit(skillId, ammoSkillId, skillResult, effects, pos, normal, codes, attacker)
def createProjectileEffect(self, cr, attackerId, hitObject, objType, pos, skillId, ammoSkillId, normal=None): ProjectileEffect(self.cr, attackerId, hitObject, objType, pos, skillId, ammoSkillId, normal)
def _playHitEffect(pos, hitObject, skillId, task=None): attackerId = 0 objType = None ProjectileEffect(base.cr, attackerId, hitObject, objType, pos, skillId, InventoryType.GrenadeExplosion) shakeCamera = False if localAvatar.ship: shakeCamera = False if localAvatar.style.tutorial >= PiratesGlobals.TUT_GOT_SEACHEST: if localAvatar.gameFSM.lockFSM: shakeCamera = False if shakeCamera: cameraShaker = CameraShaker() cameraShaker.reparentTo(render) cameraShaker.shakeSpeed = 0.04 cameraShaker.shakePower = 1.0 cameraShaker.numShakes = 3 cameraShaker.scalePower = 1 cameraShaker.play(400.0) messenger.send(CannonballHitEvent) return
def __init__(self, cr, attackerId, hitObject, objType, pos, skillId, ammoSkillId, normal = None): ProjectileEffect.__init__(self, cr, attackerId, hitObject, objType, pos, skillId, ammoSkillId, normal)