Ejemplo n.º 1
0
 def __Init__(self):
     self.GoButtonH = p2.load_image('Pictures\\GoButtonH.png')
     self.ButtonH = p2.load_image('Pictures\\ButtonH.png')
     self.GameLogoH = p2.load_image('Pictures\\GameLogoH.png')
     self.PressSpace = p2.load_image('Pictures\\PressSpace.png')
     self.rad = 0
     self.angle = 0
     self.dir = 1
     self.maxangle = 7
     self.anglegrowth = 0.5
     self.WallR = 0
     self.WallG = 0
     self.WallB = 0
     self.WallDir = -1
     self.BackGroundR = 255
     self.BackGroundG = 255
     self.BackGroundB = 255
     self.BackGroundDir = 1
     self.Wallx1 = -200
     self.Wally1 = -200
     self.Wallx2 = 1000
     self.Wally2 = 200
     self.Wallx3 = -200
     self.Wally3 = 400
     self.Wallx4 = 1000
     self.Wally4 = 600
Ejemplo n.º 2
0
 def __init__(self):
     if self.ToStart == None:
         self.ToStart = p2.load_image('Pictures\\ToStart.png')
     if self.ToMenu == None:
         self.ToMenu = p2.load_image('Pictures\\ToMenu.png')
     if self.highscore == None:
         self.highscore = p2.load_image('Pictures\\highscore.png')
     if self.currentscore == None:
         self.currentscore = p2.load_image('Pictures\\currentscore.png')
     if self.pauseimage == None:
         self.pauseimage = p2.load_image('Pictures\\pauseH.png')
Ejemplo n.º 3
0
def enter():
    global scene, score, highscore, Scale, speed, call_read_pattern, obstacleNum, topsideY, bottomY,alive,lastposition
    global current_time, thornimage, numberimage, file_name, wallR, wallG, wallB, backgroundR, backgroundG, backgroundB
    global player, wall1, wall2, obstacle, stopIngredient, bgm, musicDie, musicRevive
    global start, run, flash, scoreboard, revive, pause

    p2.hide_cursor()

    file_name = 'DataText\\SetHardGame.txt'
    setVariable_file = open(file_name, 'r')
    setVariable = json.load(setVariable_file)
    setVariable_file.close()

    start, run, flash, scoreboard, revive, pause = 0, 1, 2, 3, 4, 5
    alive = 0
    lastposition=0
    speed = setVariable['variable']['speed']
    scene = setVariable['variable']['scene']
    score = setVariable['variable']['score']
    highscore = setVariable['variable']['highscore']
    Scale = setVariable['variable']['Scale']
    obstacleNum = setVariable['variable']['obstacleNum']
    call_read_pattern = setVariable['variable']['call_read_pattern']
    wallR = setVariable['wall']['color']['R']
    wallG = setVariable['wall']['color']['G']
    wallB = setVariable['wall']['color']['B']
    backgroundR = setVariable['background']['color']['R']
    backgroundG = setVariable['background']['color']['G']
    backgroundB = setVariable['background']['color']['B']
    numberimage = p2.load_image('Pictures\\numbersH.png')
    thornimage = p2.load_image('Pictures\\ThornH.png')
    current_time = time.time()
    bgm = p2.Music('Musics\\PurelyGrey-Void[HyperflexOST].mp3')
    bgm.set_volume(64)
    bgm.repeat_play()
    musicDie = p2.Wav('Musics\\MusicDie.wav')
    musicDie.set_volume(64)
    musicRevive = p2.Wav('Musics\\MusicRevive.wav')
    musicRevive.set_volume(64)

    wall1 = Wall(setVariable['wall']['1']['x'], setVariable['wall']['1']['y'])
    wall2 = Wall(setVariable['wall']['2']['x'], setVariable['wall']['2']['y'])
    topsideY, bottomY = wall2.y - 150 - Scale * 25, 100 + 150 + Scale * 25

    stopIngredient = StopIngredient()

    player = Player()
    player._Init_()

    obstacle = []
    obstacle.append(Rect(0,0,200,600,150));
    obstacleNum+=1
    call_read_pattern+=1
Ejemplo n.º 4
0
 def __Init__(self):
     self.GoButtonM = p2.load_image('Pictures\\GoButtonM.png')
     self.ButtonM = p2.load_image('Pictures\\ButtonM.png')
     self.GameLogoM = p2.load_image('Pictures\\GameLogoM.png')
     self.PressSpace = p2.load_image('Pictures\\PressSpace.png')
     self.rad = 0
     self.angle = 0
     self.dir = 1
     self.maxangle = 7
     self.anglegrowth = 0.5
     self.WallR = 204
     self.WallG = 61
     self.WallB = 61
     self.WallDir = 1
     self.BackGroundR = 255
     self.BackGroundG = 151
     self.BackGroundB = 151
     self.BackGroundDir = 1
Ejemplo n.º 5
0
 def __Init__(self):
     self.GoButtonE = p2.load_image('Pictures\\GoButtonE.png')
     self.ButtonE = p2.load_image('Pictures\\ButtonE.png')
     self.GameLogoE = p2.load_image('Pictures\\GameLogoE.png')
     self.PressSpace = p2.load_image('Pictures\\PressSpace.png')
     self.rad = 0
     self.angle = 0
     self.dir = 1
     self.maxangle = 7
     self.anglegrowth = 0.5
     self.WallR = 18
     self.WallG = 105
     self.WallB = 120
     self.WallDir = 1
     self.BackGroundR = 72
     self.BackGroundG = 202
     self.BackGroundB = 225
     self.BackGroundDir = 1
Ejemplo n.º 6
0
 def _Init_(self):
     if self.PlayerE == None:
         self.PlayerE = p2.load_image('Pictures\\PlayerM.png')
     self.x = -50
     self.y = bottomY
     self.currentY = self.y
     self.position = self.bottom
     self.B = bottomY
     self.T = topsideY
     self.rotate = False
     self.angle = 0
     self.divide = 10
     self.anglegrowth = 180 / self.divide
Ejemplo n.º 7
0
def enter():
    global scene, score, highscore, Scale, speed, call_read_pattern, obstacleNum, topsideY, bottomY, alive
    global current_time, thornimage, numberimage, file_name, wallR, wallG, wallB, backgroundR, backgroundG, backgroundB
    global player, obstacle, stopIngredient, bgm, musicDie, musicRevive, background, wall1, wall2
    global start, run, flash, scoreboard, revive, pause

    p2.hide_cursor()

    file_name = 'DataText\\SetMidGame.txt'
    setVariable_file = open(file_name, 'r')
    setVariable = json.load(setVariable_file)
    setVariable_file.close()

    start, run, flash, scoreboard, revive, pause = 0, 1, 2, 3, 4, 5
    alive = 0
    speed = setVariable['variable']['speed']
    scene = setVariable['variable']['scene']
    score = setVariable['variable']['score']
    highscore = setVariable['variable']['highscore']
    Scale = setVariable['variable']['Scale']
    obstacleNum = setVariable['variable']['obstacleNum']
    call_read_pattern = setVariable['variable']['call_read_pattern']
    numberimage = p2.load_image('Pictures\\numbersM.png')
    bgm = p2.Music('Musics\\PurelyGrey-Chasm[HyperflexOST].mp3')
    bgm.set_volume(64)
    bgm.repeat_play()
    musicDie = p2.Wav('Musics\\MusicDie.wav')
    musicDie.set_volume(64)
    musicRevive = p2.Wav('Musics\\MusicRevive.wav')
    musicRevive.set_volume(64)
    current_time = time.time()

    background = [[
        Background((col + 1) * 80 - 80, (row + 1) * 80, 80, 80)
        for col in range(11)
    ] for row in range(8)]
    wall1 = [[
        Wall((col + 1) * 80 - 80, (row + 1) * 80 - 56, 80, 80)
        for col in range(11)
    ] for row in range(3)]
    wall2 = [[
        Wall((col + 1) * 80 - 80, (row + 1) * 80 + 465, 80, 80)
        for col in range(11)
    ] for row in range(3)]
    topsideY, bottomY = 615 - 150 - Scale * 25, 35 + 150 + Scale * 25

    stopIngredient = StopIngredient()
    player = Player()
    player._Init_()

    obstacle = []