def update(self): if not self.disappeared: bulletCount = Auxs.destructBullets(self.hitCircle) if bulletCount > 0: self.destruct() if self.disappeared: self.disappearCount -= 1 if not self.disappeared: if self.remainder > 0: self.locator.position = self.INIT_POSITION self.onRevival() else: self.disappearCount += 1 elif self.barriered: self.barrierCount -= 1 self._input() self.hitCircle.center = self.locator.position self.itemRetrieveHitCircle.center = self.locator.position self.itemHitCircle.center = self.locator.position if self.barriered: self.hitCircle.radius = self.barrierRadius else: self.hitCircle.radius = self.INIT_HIT_RADIUS self.itemRetrieveHitCircle.radius = self.itemRetrieveRadius self.onUpdate()
def onUpdate(self): self.behavior.update() self.move.update() self.face.update() self.primalArmor.update() self.hpGauge.value = self.hp self.hpGauge.update() self.drawing.sideL_valid = self.sideL.valid self.drawing.sideR_valid = self.sideR.valid self.drawing.update() for obj in self.subEnemyObjList: if not obj.valid: self.subEnemyObjList.remove(obj) if self.bulletDestructionFrameCount > 0: Auxs.destructBullets() self.bulletDestructionFrameCount -= 1
def onUpdate(self): super().onUpdate() self.mainLauncher.update() self.optionManager.update() self.lockManager.update() self.drawManager.update() if self.isSpAttacking: self.spFrameCount -= 1 if not self.isSpAttacking: self._spFinished() elif self.spFrameCount == 60: self.drawManager.spFinishing() if self.spFinishedForceFrameCount > 0: circle = Std.Hit.CircleI(self.position, 400) Auxs.applyExRadialForceToBullets(circle, 0.3) self.spFinishedForceFrameCount -= 1 if self.spFinishedForceFrameCount == 0: self.spBulletDestructionFrameCount = self.SP_BULLET_DESTRUCTION_FRAME_NUM if self.spBulletDestructionFrameCount > 0: Auxs.destructBullets() self.spBulletDestructionFrameCount -= 1
def applyDamageToEnemy(self): Auxs.destructBullets(self.hitCircle) damageSum = Auxs.applyDamageToEnemies(self.hitRect, self.damage) if damageSum != 0: self.createBlast()