def update(self): GameObject.update(self) self.frame_counter.run() if tower_defense.game_object.hasTower == True: if self.frame_counter.flag: tower_defense.game_object.hasEnemy = True if tower_defense.game_object.score < 60: pass elif tower_defense.game_object.score >= 60 and tower_defense.game_object.score < 65: self.frame_counter = FrameCounter(80) boss = Boss(425, 0) boss.HP = 7 add(boss) elif tower_defense.game_object.score >= 120 and tower_defense.game_object.score < 130: self.frame_counter = FrameCounter(50) boss = Boss(425, 0) boss.HP = 13 add(boss) elif tower_defense.game_object.score <= 130: self.frame_counter = FrameCounter(80) boss = Boss(425, 0) boss.HP = 20 add(boss) elif tower_defense.game_object.score >= 210: self.frame_counter = FrameCounter(80) boss = Boss(425, 0) boss.HP = 100 # boss.renderer = Animation(list_super_boss,loop=True,frame_delay=1) add(boss) self.frame_counter.reset()
def update(self): GameObject.update(self) self.pyshicsWithEnemy() # print(self.HP) if self.HP == 0: game_over = GameOverScene() global_scene_manager.change_scene(game_over) self.deactivate()
def update(self): GameObject.update(self) if self.stun: self.renderer = Animation(enemy_stun, loop=True, frame_delay=1) self.stunCooldown -= 1 if self.stunCooldown == 0: self.renderer = Animation(list_enemy, loop=True, frame_delay=1) self.stun = False self.stunCooldown = 20 if not self.stun: self.enemy_move(3) self.deactivate_if_need()
def update(self): # print(self.velocityX, self.vectorY) GameObject.update(self) self.pyshicsWithEnemy() self.move() self.x += self.velocityX self.y += self.velocityY self.cooldown -= 1 if self.cooldown <= 0: self.deactivate() self.cooldown = 80 if self.x == self.e_x and self.y == self.e_y: self.deactivate()
def update(self): GameObject.update(self) self.check()
def update(self): GameObject.update(self) if global_input_manager.enter_pressed: gameplay_scene = GamePlayScene() global_scene_manager.change_scene(gameplay_scene)