def playSoundEffect(self, ammoSkillId): if ammoSkillId in ammoFiringSfx: boomSfx = ammoFiringSfx[ammoSkillId] base.playSfx(boomSfx, node = self.pivot, cutoff = 3500) return None Cannon.playSoundEffect(self, ammoSkillId)
def playSoundEffect(self, ammoSkillId): if ammoSkillId in ammoFiringSfx: boomSfx = ammoFiringSfx[ammoSkillId] base.playSfx(boomSfx, node=self.pivot, cutoff=3500) return None Cannon.playSoundEffect(self, ammoSkillId)
def setPivots(self): Cannon.setPivots(self) bundle = self.root.node().getBundle(0) joint = bundle.findChild('def_cannon_animate') if joint: self.repeater = self.attachNewNode(ModelNode('def_cannon_animate')) self.repeater.setMat(joint.getDefaultValue()) bundle.controlJoint('def_cannon_animate', self.repeater.node()) self.repeater.reparentTo(self.pivot)
def __init__(self, cr, parent, distance, height, targetNps, island): Cannon.__init__(self, cr) self.loadModel(None, InventoryType.CannonL1) self._started = False self._targetNps = targetNps self._skillId = 12906 self._ammoSkillId = self._skillId self._pivotNode = parent.attachNewNode('phantomCannonPivot') self._island = island self.reparentTo(self._pivotNode) self._pivotNode.reparentTo(parent) self.setPos(0, distance, height) self.stash()
def playAttack(self, skillId, ammoSkillId, projectileHitEvent, targetPos=None, wantCollisions=0, flightTime=None, preciseHit=False, buffs=[], timestamp=None, numShots=1, shotNum=-1): if ammoSkillId == InventoryType.DefenseCannonScatterShot: numShots = 4 Cannon.playAttack(self, skillId, ammoSkillId, projectileHitEvent, targetPos, wantCollisions, flightTime, preciseHit, buffs, timestamp, numShots, shotNum)
def __init__(self, cr, shipCannon=False): Cannon.__init__(self, cr, shipCannon) self.repeater = None
def playAttack(self, skillId, ammoSkillId, projectileHitEvent, targetPos = None, wantCollisions = 0, flightTime = None, preciseHit = False, buffs = [], timestamp = None, numShots = 1, shotNum = -1): if ammoSkillId == InventoryType.DefenseCannonScatterShot: numShots = 4 Cannon.playAttack(self, skillId, ammoSkillId, projectileHitEvent, targetPos, wantCollisions, flightTime, preciseHit, buffs, timestamp, numShots, shotNum)
def __init__(self, cr, shipCannon = False): Cannon.__init__(self, cr, shipCannon) self.repeater = None