def __init__(self): super().__init__() Player2.this = self self.load_img('img/stair_move.png') self.anim2 = Animator() self.anim2.load('img/ping.png', 1, 2, np.array([0, 0])) self.size[0], self.size[1] = 1, 1 self.anim = Animator() self.anim.load('img/user_idle.png', 1, 5, np.array([80, 0])) # 0 self.anim.load('img/user_walk.png', 1, 8, np.array([80, 0])) # 1 self.anim.load('img/user_run.png', 1, 4, np.array([80, 0])) # 2 self.anim.load('img/user_active.png', 3, 3, np.array([80, 0])) # 3 self.anim.load('img/user_die1.png', 2, 9, np.array([80, 0])) # 4 플레이어한테 죽음 self.anim.load('img/user_movebody.png', 1, 7, np.array([0, 0])) # 5 시체유기 self.anim.load('img/user_attack.png', 3, 7, np.array([0, 0])) # 6 공격 self.anim.load('img/user_hit.png', 3, 1, np.array([80, 0])) # 7 아야 self.anim.anim_arr[7].delayTime = 1 / 2.0 self.attack_sound = Sound.load('sound/Attack2.wav', 100) self.interact_sound = Sound.load('sound/빰.wav', 100) self.hurt_sound = Sound.load('sound/영훈_아야.wav', 100) self.movebody_sound = Sound.load('sound/GetBody.wav', 100) self.die_sound = Sound.load('sound/Die.wav', 100) self.init()
def __init__(self, imgs, pos, remain_time=1.0): super().__init__(pos, remain_time) self.imgs = imgs if remain_time > 2: self.victory_sound = Sound.load('sound/EndVictory.wav', 100) else: self.victory_sound = Sound.load('sound/Victory.wav', 100) self.victory_sound.play()
def __init__(self): super().__init__(1) self.anim = Animator() self.target_cam_pos = np.array([0, 0]) self.mouse_pos = [0, 0] self.anim.load('img/cursor.png', 1, 1, np.array([0, 0])) self.anim.load('img/cursor_attack_start.png', 3, 4, np.array([0, 0])) self.anim.load('img/cursor_attack_doing.png', 1, 2, np.array([0, 0])) self.anim.load('img/cursor_attack_shot.png', 3, 1, np.array([0, 0])) self.interact_sound = Sound.load('sound/Pop.wav', 100) self.shot_sound = Sound.load('sound/Duck Toy.wav', 100) detect_limit = 20 self.leftLimit = detect_limit self.rightLimit = View.views[0].w - detect_limit self.topLimit = View.views[0].h - detect_limit self.bottomLimit = detect_limit
def __init__(self): super().__init__() self.size[0], self.size[1] = 1, 1 self.anim = Animator() self.anim.load('img/user_idle.png', 1, 5, np.array([80, 0])) self.anim.load('img/user_walk.png', 1, 8, np.array([80, 0])) self.anim.load('img/user_run.png', 1, 4, np.array([80, 0])) self.anim.load('img/user_die1.png', 2, 9, np.array([80, 0])) # 3 플레이어한테 죽음 self.anim.load('img/user_hit.png', 3, 1, np.array([80, 0])) # 4 아야 self.speed = 300 self.is_die = False self.is_die_anim_end = False self.is_in_stair = False self.health = 1 self.hurt_sound = Sound.load('sound/영훈_욱.wav', 100) self.player = None Actor.actor_list.append(self)
def reset(): global mouseuser_ready, keyuser_ready, pop_sound mouseuser_ready = False keyuser_ready = False view_center = get_center() pop_sound = Sound.load('sound/Pop.wav', 100)