コード例 #1
0
ファイル: wind_dice.py プロジェクト: JeaWoo-Park/Project
 def __init__(self, x, y, attack_power):
     self.image = load_image("image\\wind_bullet.png")
     self.attack_power = attack_power
     self.frame = 0
     self.target = object.bring_object(0, 0)
     self.fire_bgm = load_wav('sound\\shot.wav')
     self.fire_bgm.set_volume(50)
     self.fire_bgm.play()
     if self.target.locking:
         if len(object.objects[0]) > 1:
             self.target = object.bring_object(0, 1)
     self.target_x = self.target.x
     self.target_y = self.target.y
     self.x = x
     self.y = y
コード例 #2
0
ファイル: poison_dice.py プロジェクト: JeaWoo-Park/Project
    def __init__(self, x, y, attack_power):
        self.image = load_image("image\\poison_bullet.png")
        self.attack_power = attack_power
        self.poison_damage = attack_power - 10
        self.frame = 0
        self.target = object.bring_object(
            0, random.randint(0,
                              len(object.objects[0]) - 1))
        self.fire_bgm = load_wav('sound\\shot.wav')
        self.fire_bgm.set_volume(50)
        self.fire_bgm.play()

        self.target_x = self.target.x
        self.target_y = self.target.y

        self.x = x
        self.y = y
コード例 #3
0
ファイル: main.py プロジェクト: JeaWoo-Park/Project
def Create_Dice():
    global dice
    if dice[0].exist and dice[1].exist and dice[2].exist and dice[3].exist and dice[4].exist and \
            dice[5].exist and dice[6].exist and dice[7].exist and dice[8].exist and dice[9].exist and \
            dice[10].exist and \
            dice[11].exist and dice[12].exist and dice[13].exist and dice[14].exist and dice[15].exist:
        return
    idx = random.randint(0, 15)
    if dice[idx].exist:
        Create_Dice()
        return
    if object.bring_object(3, 0).need_point <= object.bring_object(3, 0).point:
        dice[idx].create()
        object.bring_object(3, 0).point -= object.bring_object(3, 0).need_point
        object.bring_object(3, 0).need_point += 10
    else:
        return