Moozonian
Web Images Developer News Books Maps Shopping Moo-AI
Showing results for image (3).png
GitHub Repo https://github.com/Sudeeprajpoot15/pygame

Sudeeprajpoot15/pygame

from itertools import cycle import random import sys import pygame from pygame.locals import * FPS = 30 SCREENWIDTH = 288 SCREENHEIGHT = 512 PIPEGAPSIZE = 100 # gap between upper and lower part of pipe BASEY = SCREENHEIGHT * 0.79 # image, sound and hitmask dicts IMAGES, SOUNDS, HITMASKS = {}, {}, {} # list of all possible players (tuple of 3 positions of flap) PLAYERS_LIST = ( # red box ( 'assets/sprites/redbox-upflap.png', 'assets/sprites/redbox-midflap.png', 'assets/sprites/redbox-downflap.png', ), # blue box ( 'assets/sprites/bluebox-upflap.png', 'assets/sprites/bluebox-midflap.png', 'assets/sprites/bluebox-downflap.png', ), # yellow box ( 'assets/sprites/yellowbox-upflap.png', 'assets/sprites/yellowbox-midflap.png', 'assets/sprites/yellowbox-downflap.png', ), ) # list of backgrounds BACKGROUNDS_LIST = ( 'assets/sprites/background-day.png', 'assets/sprites/background-night.png', ) # list of pipes PIPES_LIST = ( 'assets/sprites/pipe-green.png', 'assets/sprites/pipe-red.png', ) try: xrange except NameError: xrange = range def main(): global SCREEN, FPSCLOCK pygame.init() FPSCLOCK = pygame.time.Clock() # Fullscreen scaled output SCREEN = pygame.display.set_mode((SCREENWIDTH, SCREENHEIGHT), pygame.SCALED | pygame.FULLSCREEN) pygame.display.set_caption('Flappy Box') # numbers sprites for score display IMAGES['numbers'] = (pygame.image.load('assets/sprites/0.png').convert_alpha(), pygame.image.load('assets/sprites/1.png').convert_alpha(), pygame.image.load('assets/sprites/2.png').convert_alpha(), pygame.image.load('assets/sprites/3.png').convert_alpha(), pygame.image.load('assets/sprites/4.png').convert_alpha(), pygame.image.load('assets/sprites/5.png').convert_alpha(), pygame.image.load('assets/sprites/6.png').convert_alpha(), pygame.image.load('assets/sprites/7.png').convert_alpha(), pygame.image.load('assets/sprites/8.png').convert_alpha(), pygame.image.load('assets/sprites/9.png').convert_alpha()) # game over sprite IMAGES['gameover'] = pygame.image.load('assets/sprites/gameover.png').convert_alpha() # message sprite for welcome screen IMAGES['message'] = pygame.image.load('assets/sprites/message.png').convert_alpha() # base (ground) sprite IMAGES['base'] = pygame.image.load('assets/sprites/base.png').convert_alpha() # sounds soundExt = '.ogg' SOUNDS['die'] = pygame.mixer.Sound('assets/audio/die' + soundExt) SOUNDS['hit'] = pygame.mixer.Sound('assets/audio/hit' + soundExt) SOUNDS['point'] = pygame.mixer.Sound('assets/audio/point' + soundExt) SOUNDS['wing'] = pygame.mixer.Sound('assets/audio/wing' + soundExt) while True: # select random background sprites randBg = random.randint(0, len(BACKGROUNDS_LIST) - 1) IMAGES['background'] = pygame.image.load(BACKGROUNDS_LIST[randBg]).convert() # select random player sprites randPlayer = random.randint(0, len(PLAYERS_LIST) - 1) IMAGES['player'] = ( pygame.image.load(PLAYERS_LIST[randPlayer][0]).convert_alpha(), pygame.image.load(PLAYERS_LIST[randPlayer][1]).convert_alpha(), pygame.image.load(PLAYERS_LIST[randPlayer][2]).convert_alpha(), ) # select random pipe sprites pipeindex = random.randint(0, len(PIPES_LIST) - 1) IMAGES['pipe'] = ( pygame.transform.flip(pygame.image.load(PIPES_LIST[pipeindex]).convert_alpha(), False, True), pygame.image.load(PIPES_LIST[pipeindex]).convert_alpha(), ) # hismask for pipes HITMASKS['pipe'] = ( getHitmask(IMAGES['pipe'][0]), getHitmask(IMAGES['pipe'][1]), ) # hitmask for player HITMASKS['player'] = ( getHitmask(IMAGES['player'][0]), getHitmask(IMAGES['player'][1]), getHitmask(IMAGES['player'][2]), ) movementInfo = showWelcomeAnimation() crashInfo = mainGame(movementInfo) showGameOverScreen(crashInfo) def showWelcomeAnimation(): """Shows welcome screen animation of flappy box""" # index of player to blit on screen playerIndex = 0 playerIndexGen = cycle([0, 1, 2, 1]) # iterator used to change playerIndex after every 5th iteration loopIter = 0 playerx = int(SCREENWIDTH * 0.2) playery = int((SCREENHEIGHT - IMAGES['player'][0].get_height()) / 2) messagex = int((SCREENWIDTH - IMAGES['message'].get_width()) / 2) messagey = int(SCREENHEIGHT * 0.12) basex = 0 # amount by which base can maximum shift to left baseShift = IMAGES['base'].get_width() - IMAGES['background'].get_width() # player shm for up-down motion on welcome screen playerShmVals = {'val': 0, 'dir': 1} while True: for event in pygame.event.get(): if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE): pygame.quit() sys.exit() if event.type == KEYDOWN and (event.key == K_SPACE or event.key == K_UP) or event.type == MOUSEBUTTONDOWN: # make first flap sound and return values for mainGame SOUNDS['wing'].play() return { 'playery': playery + playerShmVals['val'], 'basex': basex, 'playerIndexGen': playerIndexGen, } # adjust playery, playerIndex, basex if (loopIter + 1) % 5 == 0: playerIndex = next(playerIndexGen) loopIter = (loopIter + 1) % 30 basex = -((-basex + 4) % baseShift) playerShm(playerShmVals) # draw sprites SCREEN.blit(IMAGES['background'], (0, 0)) SCREEN.blit(IMAGES['player'][playerIndex], (playerx, playery + playerShmVals['val'])) SCREEN.blit(IMAGES['message'], (messagex, messagey)) SCREEN.blit(IMAGES['base'], (basex, BASEY)) pygame.display.update() FPSCLOCK.tick(FPS) def mainGame(movementInfo): score = playerIndex = loopIter = 0 playerIndexGen = movementInfo['playerIndexGen'] playerx, playery = int(SCREENWIDTH * 0.2), movementInfo['playery'] basex = movementInfo['basex'] baseShift = IMAGES['base'].get_width() - IMAGES['background'].get_width() # get 2 new pipes to add to upperPipes lowerPipes list newPipe1 = getRandomPipe() newPipe2 = getRandomPipe() # list of upper pipes upperPipes = [ { 'x': SCREENWIDTH + 200, 'y': newPipe1[0]['y'] }, { 'x': SCREENWIDTH + 200 + (SCREENWIDTH / 2), 'y': newPipe2[0]['y'] }, ] # list of lowerpipe lowerPipes = [ { 'x': SCREENWIDTH + 200, 'y': newPipe1[1]['y'] }, { 'x': SCREENWIDTH + 200 + (SCREENWIDTH / 2), 'y': newPipe2[1]['y'] }, ] pipeVelX = -4 # player velocity, max velocity, downward accleration, accleration on flap playerVelY = -9 # player's velocity along Y, default same as playerFlapped playerMaxVelY = 10 # max vel along Y, max descend speed playerMinVelY = -8 # min vel along Y, max ascend speed playerAccY = 1 # players downward accleration playerRot = 45 # player's rotation playerVelRot = 3 # angular speed playerRotThr = 20 # rotation threshold playerFlapAcc = -9 # players speed on flapping playerFlapped = False # True when player flaps while True: for event in pygame.event.get(): if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE): pygame.quit() sys.exit() if event.type == KEYDOWN and (event.key == K_SPACE or event.key == K_UP) or event.type == MOUSEBUTTONDOWN: if playery > -2 * IMAGES['player'][0].get_height(): playerVelY = playerFlapAcc playerFlapped = True SOUNDS['wing'].play() # check for crash here crashTest = checkCrash({'x': playerx, 'y': playery, 'index': playerIndex}, upperPipes, lowerPipes) if crashTest[0]: return {'y': playery, 'groundCrash': crashTest[1], 'basex': basex, 'upperPipes': upperPipes, 'lowerPipes': lowerPipes, 'score': score, 'playerVelY': playerVelY, 'playerRot': playerRot} # check for score playerMidPos = playerx + IMAGES['player'][0].get_width() / 2 for pipe in upperPipes: pipeMidPos = pipe['x'] + IMAGES['pipe'][0].get_width() / 2 if pipeMidPos <= playerMidPos < pipeMidPos + 4: score += 1 SOUNDS['point'].play() # playerIndex basex change if (loopIter + 1) % 3 == 0: playerIndex = next(playerIndexGen) loopIter = (loopIter + 1) % 30 basex = -((-basex + 100) % baseShift) # rotate the player if playerRot > -90: playerRot -= playerVelRot # player's movement if playerVelY < playerMaxVelY and not playerFlapped: playerVelY += playerAccY if playerFlapped: playerFlapped = False # more rotation to cover the threshold (calculated in visible rotation) playerRot = 45 playerHeight = IMAGES['player'][playerIndex].get_height() playery += min(playerVelY, BASEY - playery - playerHeight) # move pipes to left for uPipe, lPipe in zip(upperPipes, lowerPipes): uPipe['x'] += pipeVelX lPipe['x'] += pipeVelX # add new pipe when first pipe is about to touch left of screen if len(upperPipes) > 0 and 0 < upperPipes[0]['x'] < 5: newPipe = getRandomPipe() upperPipes.append(newPipe[0]) lowerPipes.append(newPipe[1]) # remove first pipe if its out of the screen if len(upperPipes) > 0 and upperPipes[0]['x'] < -IMAGES['pipe'][0].get_width(): upperPipes.pop(0) lowerPipes.pop(0) # draw sprites SCREEN.blit(IMAGES['background'], (0, 0)) for uPipe, lPipe in zip(upperPipes, lowerPipes): SCREEN.blit(IMAGES['pipe'][0], (uPipe['x'], uPipe['y'])) SCREEN.blit(IMAGES['pipe'][1], (lPipe['x'], lPipe['y'])) SCREEN.blit(IMAGES['base'], (basex, BASEY)) # print score so player overlaps the score showScore(score) # Player rotation has a threshold visibleRot = playerRotThr if playerRot <= playerRotThr: visibleRot = playerRot playerSurface = pygame.transform.rotate(IMAGES['player'][playerIndex], visibleRot) SCREEN.blit(playerSurface, (playerx, playery)) pygame.display.update() FPSCLOCK.tick(FPS) def showGameOverScreen(crashInfo): """crashes the player down ans shows gameover image""" score = crashInfo['score'] playerx = SCREENWIDTH * 0.2 playery = crashInfo['y'] playerHeight = IMAGES['player'][0].get_height() playerVelY = crashInfo['playerVelY'] playerAccY = 2 playerRot = crashInfo['playerRot'] playerVelRot = 7 basex = crashInfo['basex'] upperPipes, lowerPipes = crashInfo['upperPipes'], crashInfo['lowerPipes'] # play hit and die sounds SOUNDS['hit'].play() if not crashInfo['groundCrash']: SOUNDS['die'].play() while True: for event in pygame.event.get(): if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE): pygame.quit() sys.exit() if event.type == KEYDOWN and (event.key == K_SPACE or event.key == K_UP) or event.type == MOUSEBUTTONDOWN: if playery + playerHeight >= BASEY - 1: return # player y shift if playery + playerHeight < BASEY - 1: playery += min(playerVelY, BASEY - playery - playerHeight) # player velocity change if playerVelY < 15: playerVelY += playerAccY # rotate only when it's a pipe crash if not crashInfo['groundCrash']: if playerRot > -90: playerRot -= playerVelRot # draw sprites SCREEN.blit(IMAGES['background'], (0, 0)) for uPipe, lPipe in zip(upperPipes, lowerPipes): SCREEN.blit(IMAGES['pipe'][0], (uPipe['x'], uPipe['y'])) SCREEN.blit(IMAGES['pipe'][1], (lPipe['x'], lPipe['y'])) SCREEN.blit(IMAGES['base'], (basex, BASEY)) showScore(score) playerSurface = pygame.transform.rotate(IMAGES['player'][1], playerRot) SCREEN.blit(playerSurface, (playerx, playery)) SCREEN.blit(IMAGES['gameover'], (50, 180)) FPSCLOCK.tick(FPS) pygame.display.update() def playerShm(playerShm): """oscillates the value of playerShm['val'] between 8 and -8""" if abs(playerShm['val']) == 8: playerShm['dir'] *= -1 if playerShm['dir'] == 1: playerShm['val'] += 1 else: playerShm['val'] -= 1 def getRandomPipe(): """returns a randomly generated pipe""" # y of gap between upper and lower pipe gapY = random.randrange(0, int(BASEY * 0.6 - PIPEGAPSIZE)) gapY += int(BASEY * 0.2) pipeHeight = IMAGES['pipe'][0].get_height() pipeX = SCREENWIDTH + 10 return [ { 'x': pipeX, 'y': gapY - pipeHeight }, # upper pipe { 'x': pipeX, 'y': gapY + PIPEGAPSIZE }, # lower pipe ] def showScore(score): """displays score in center of screen""" scoreDigits = [int(x) for x in list(str(score))] totalWidth = 0 # total width of all numbers to be printed for digit in scoreDigits: totalWidth += IMAGES['numbers'][digit].get_width() Xoffset = (SCREENWIDTH - totalWidth) / 2 for digit in scoreDigits: SCREEN.blit(IMAGES['numbers'][digit], (Xoffset, SCREENHEIGHT * 0.1)) Xoffset += IMAGES['numbers'][digit].get_width() def checkCrash(player, upperPipes, lowerPipes): """returns True if player collders with base or pipes.""" pi = player['index'] player['w'] = IMAGES['player'][0].get_width() player['h'] = IMAGES['player'][0].get_height() # if player crashes into ground if player['y'] + player['h'] >= BASEY - 1: return [True, True] else: playerRect = pygame.Rect(player['x'], player['y'], player['w'], player['h']) pipeW = IMAGES['pipe'][0].get_width() pipeH = IMAGES['pipe'][0].get_height() for uPipe, lPipe in zip(upperPipes, lowerPipes): # upper and lower pipe rects uPipeRect = pygame.Rect(uPipe['x'], uPipe['y'], pipeW, pipeH) lPipeRect = pygame.Rect(lPipe['x'], lPipe['y'], pipeW, pipeH) # player and upper/lower pipe hitmasks pHitMask = HITMASKS['player'][pi] uHitmask = HITMASKS['pipe'][0] lHitmask = HITMASKS['pipe'][1] # if player collided with upipe or lpipe uCollide = pixelCollision(playerRect, uPipeRect, pHitMask, uHitmask) lCollide = pixelCollision(playerRect, lPipeRect, pHitMask, lHitmask) if uCollide or lCollide: return [True, False] return [False, False] def pixelCollision(rect1, rect2, hitmask1, hitmask2): """Checks if two objects collide and not just their rects""" rect = rect1.clip(rect2) if rect.width == 0 or rect.height == 0: return False x1, y1 = rect.x - rect1.x, rect.y - rect1.y x2, y2 = rect.x - rect2.x, rect.y - rect2.y for x in xrange(rect.width): for y in xrange(rect.height): if hitmask1[x1 + x][y1 + y] and hitmask2[x2 + x][y2 + y]: return True return False def getHitmask(image): """returns a hitmask using an image's alpha.""" mask = [] for x in xrange(image.get_width()): mask.append([]) for y in xrange(image.get_height()): mask[x].append(bool(image.get_at((x, y))[3])) return mask if __name__ == '__main__': main()
GitHub Repo https://github.com/ftcurz/sordum

ftcurz/sordum

run (dcontrol.exe) and press disable windows defender image_3.png should look like this if you did it correctly retry logging in and running celex.exe
GitHub Repo https://github.com/michaelehrig/Pillow_image_composer

michaelehrig/Pillow_image_composer

A simple app I use to compose product variant images for an online store. It takes 3 pngs per product variant and modifies them to match the need.
GitHub Repo https://github.com/someshsrichandan/bill_to_excel

someshsrichandan/bill_to_excel

You can upload your public Google Drive folder containing images named in ascending order (e.g., 1.png, 2.jpg, 3.png, etc.). Once uploaded, I can analyze the images and convert the extracted information into an Excel file. You can also specify which fields or data you want to extract from the images.
GitHub Repo https://github.com/UmairHussain123/Push-Notification-Test-Node-Server-FCM-

UmairHussain123/Push-Notification-Test-Node-Server-FCM-

node index.js <Token device >\ "Sale Alert" "Tap to view" \ --image=https://hhcnewapp.blr1.digitaloceanspaces.com/storage/146/Yogurt_3.png \ --data='{"screen":"OrderDetail","orderId":"123","imageUrl":"https://Digtalpaces.com/storage/146/Yogurt_3.png","route":"Notification"}'
GitHub Repo https://github.com/Azenris/grey_merger

Azenris/grey_merger

Merges 3 PNG grey images into different channels of 1 image.
GitHub Repo https://github.com/bukvic6/Quizzi_Image

bukvic6/Quizzi_Image

Quiz that generates 3 x 3 png image.Terminal app.
GitHub Repo https://github.com/Natasha3009/puzzle.json

Natasha3009/puzzle.json

{"v":"5.6.2","fr":29.9700012207031,"ip":0,"op":45.0000018328876,"w":800,"h":450,"nm":"1_2","ddd":0,"assets":[{"id":"image_0","w":1280,"h":720,"u":"images/","p":"img_0.png","e":0},{"id":"image_1","w":1280,"h":720,"u":"images/","p":"img_1.png","e":0},{"id":"image_2","w":1280,"h":720,"u":"images/","p":"img_2.png","e":0},{"id":"image_3","w":1280,"h":720,"u":"images/","p":"img_3.png","e":0},{"id":"image_4","w":1280,"h":720,"u":"images/","p":"img_4.png","e":0},{"id":"image_5","w":1280,"h":720,"u":"images/","p":"img_5.png","e":0},{"id":"image_6","w":1280,"h":720,"u":"images/","p":"img_6.png","e":0},{"id":"image_7","w":1280,"h":720,"u":"images/","p":"img_7.png","e":0},{"id":"image_8","w":1280,"h":720,"u":"images/","p":"img_8.png","e":0},{"id":"image_9","w":1280,"h":720,"u":"images/","p":"img_9.png","e":0},{"id":"image_10","w":1280,"h":720,"u":"images/","p":"img_10.png","e":0},{"id":"image_11","w":1280,"h":720,"u":"images/","p":"img_11.png","e":0},{"id":"image_12","w":1280,"h":720,"u":"images/","p":"img_12.png","e":0},{"id":"image_13","w":1280,"h":720,"u":"images/","p":"img_13.png","e":0},{"id":"image_14","w":1280,"h":720,"u":"images/","p":"img_14.png","e":0},{"id":"image_15","w":1280,"h":720,"u":"images/","p":"img_15.png","e":0},{"id":"image_16","w":1280,"h":720,"u":"images/","p":"img_16.png","e":0},{"id":"image_17","w":1280,"h":720,"u":"images/","p":"img_17.png","e":0},{"id":"image_18","w":1280,"h":720,"u":"images/","p":"img_18.png","e":0},{"id":"image_19","w":1280,"h":720,"u":"images/","p":"img_19.png","e":0},{"id":"image_20","w":1280,"h":720,"u":"images/","p":"img_20.png","e":0},{"id":"image_21","w":1280,"h":720,"u":"images/","p":"img_21.png","e":0},{"id":"image_22","w":1280,"h":720,"u":"images/","p":"img_22.png","e":0},{"id":"image_23","w":1280,"h":720,"u":"images/","p":"img_23.png","e":0},{"id":"image_24","w":1280,"h":720,"u":"images/","p":"img_24.png","e":0},{"id":"image_25","w":1280,"h":720,"u":"images/","p":"img_25.png","e":0},{"id":"image_26","w":1280,"h":720,"u":"images/","p":"img_26.png","e":0},{"id":"image_27","w":1280,"h":720,"u":"images/","p":"img_27.png","e":0},{"id":"image_28","w":1280,"h":720,"u":"images/","p":"img_28.png","e":0},{"id":"image_29","w":1280,"h":720,"u":"images/","p":"img_29.png","e":0},{"id":"image_30","w":1280,"h":720,"u":"images/","p":"img_30.png","e":0},{"id":"image_31","w":1280,"h":720,"u":"images/","p":"img_31.png","e":0},{"id":"image_32","w":1280,"h":720,"u":"images/","p":"img_32.png","e":0},{"id":"image_33","w":1280,"h":720,"u":"images/","p":"img_33.png","e":0},{"id":"image_34","w":1280,"h":720,"u":"images/","p":"img_34.png","e":0},{"id":"image_35","w":1280,"h":720,"u":"images/","p":"img_35.png","e":0},{"id":"image_36","w":1280,"h":720,"u":"images/","p":"img_36.png","e":0},{"id":"image_37","w":1280,"h":720,"u":"images/","p":"img_37.png","e":0},{"id":"image_38","w":1280,"h":720,"u":"images/","p":"img_38.png","e":0},{"id":"image_39","w":1280,"h":720,"u":"images/","p":"img_39.png","e":0},{"id":"image_40","w":1280,"h":720,"u":"images/","p":"img_40.png","e":0},{"id":"image_41","w":1280,"h":720,"u":"images/","p":"img_41.png","e":0},{"id":"image_42","w":1280,"h":720,"u":"images/","p":"img_42.png","e":0},{"id":"image_43","w":1280,"h":720,"u":"images/","p":"img_43.png","e":0},{"id":"image_44","w":1280,"h":720,"u":"images/","p":"img_44.png","e":0},{"id":"image_45","w":1280,"h":720,"u":"images/","p":"img_45.png","e":0},{"id":"image_46","w":1280,"h":720,"u":"images/","p":"img_46.png","e":0},{"id":"image_47","w":1280,"h":720,"u":"images/","p":"img_47.png","e":0},{"id":"image_48","w":1280,"h":720,"u":"images/","p":"img_48.png","e":0},{"id":"image_49","w":1280,"h":720,"u":"images/","p":"img_49.png","e":0},{"id":"image_50","w":1280,"h":720,"u":"images/","p":"img_50.png","e":0},{"id":"image_51","w":1280,"h":720,"u":"images/","p":"img_51.png","e":0},{"id":"image_52","w":1280,"h":720,"u":"images/","p":"img_52.png","e":0},{"id":"image_53","w":1280,"h":720,"u":"images/","p":"img_53.png","e":0},{"id":"image_54","w":1280,"h":720,"u":"images/","p":"img_54.png","e":0},{"id":"image_55","w":1280,"h":720,"u":"images/","p":"img_55.png","e":0},{"id":"image_56","w":1280,"h":720,"u":"images/","p":"img_56.png","e":0},{"id":"image_57","w":1280,"h":720,"u":"images/","p":"img_57.png","e":0},{"id":"image_58","w":1280,"h":720,"u":"images/","p":"img_58.png","e":0},{"id":"image_59","w":1280,"h":720,"u":"images/","p":"img_59.png","e":0},{"id":"image_60","w":1280,"h":720,"u":"images/","p":"img_60.png","e":0},{"id":"image_61","w":1280,"h":720,"u":"images/","p":"img_61.png","e":0},{"id":"image_62","w":1280,"h":720,"u":"images/","p":"img_62.png","e":0},{"id":"image_63","w":1280,"h":720,"u":"images/","p":"img_63.png","e":0},{"id":"image_64","w":1280,"h":720,"u":"images/","p":"img_64.png","e":0},{"id":"image_65","w":1280,"h":720,"u":"images/","p":"img_65.png","e":0},{"id":"image_66","w":1280,"h":720,"u":"images/","p":"img_66.png","e":0},{"id":"image_67","w":1280,"h":720,"u":"images/","p":"img_67.png","e":0},{"id":"image_68","w":1280,"h":720,"u":"images/","p":"img_68.png","e":0},{"id":"image_69","w":1280,"h":720,"u":"images/","p":"img_69.png","e":0},{"id":"image_70","w":1280,"h":720,"u":"images/","p":"img_70.png","e":0},{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":2,"nm":"1_0000.png","cl":"png","refId":"image_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":0.9990000406901,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"1_0001.png","cl":"png","refId":"image_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0.9990000406901,"op":1.99800008138021,"st":0.9990000406901,"bm":0},{"ddd":0,"ind":3,"ty":2,"nm":"1_0002.png","cl":"png","refId":"image_2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":1.99800008138021,"op":2.99700012207031,"st":1.99800008138021,"bm":0},{"ddd":0,"ind":4,"ty":2,"nm":"1_0003.png","cl":"png","refId":"image_3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":2.99700012207031,"op":3.99600016276042,"st":2.99700012207031,"bm":0},{"ddd":0,"ind":5,"ty":2,"nm":"1_0004.png","cl":"png","refId":"image_4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":3.99600016276042,"op":4.99500020345052,"st":3.99600016276042,"bm":0},{"ddd":0,"ind":6,"ty":2,"nm":"1_0005.png","cl":"png","refId":"image_5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":4.99500020345052,"op":5.99400024414062,"st":4.99500020345052,"bm":0},{"ddd":0,"ind":7,"ty":2,"nm":"1_0006.png","cl":"png","refId":"image_6","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":5.99400024414063,"op":6.99300028483073,"st":5.99400024414063,"bm":0},{"ddd":0,"ind":8,"ty":2,"nm":"1_0007.png","cl":"png","refId":"image_7","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":6.99300028483073,"op":7.99200032552083,"st":6.99300028483073,"bm":0},{"ddd":0,"ind":9,"ty":2,"nm":"1_0008.png","cl":"png","refId":"image_8","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":7.99200032552083,"op":8.99100036621094,"st":7.99200032552083,"bm":0},{"ddd":0,"ind":10,"ty":2,"nm":"1_0009.png","cl":"png","refId":"image_9","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":8.99100036621094,"op":9.99000040690104,"st":8.99100036621094,"bm":0},{"ddd":0,"ind":11,"ty":2,"nm":"1_0010.png","cl":"png","refId":"image_10","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":9.99000040690104,"op":10.9890004475911,"st":9.99000040690104,"bm":0},{"ddd":0,"ind":12,"ty":2,"nm":"1_0011.png","cl":"png","refId":"image_11","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":10.9890004475911,"op":11.9880004882812,"st":10.9890004475911,"bm":0},{"ddd":0,"ind":13,"ty":2,"nm":"1_0012.png","cl":"png","refId":"image_12","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":11.9880004882813,"op":12.9870005289714,"st":11.9880004882813,"bm":0},{"ddd":0,"ind":14,"ty":2,"nm":"1_0013.png","cl":"png","refId":"image_13","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":12.9870005289714,"op":13.9860005696615,"st":12.9870005289714,"bm":0},{"ddd":0,"ind":15,"ty":2,"nm":"1_0014.png","cl":"png","refId":"image_14","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":13.9860005696615,"op":14.9850006103516,"st":13.9860005696615,"bm":0},{"ddd":0,"ind":16,"ty":2,"nm":"1_0015.png","cl":"png","refId":"image_15","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":14.9850006103516,"op":15.9840006510417,"st":14.9850006103516,"bm":0},{"ddd":0,"ind":17,"ty":2,"nm":"1_0016.png","cl":"png","refId":"image_16","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":15.9840006510417,"op":16.9830006917318,"st":15.9840006510417,"bm":0},{"ddd":0,"ind":18,"ty":2,"nm":"1_0017.png","cl":"png","refId":"image_17","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":16.9830006917318,"op":17.9820007324219,"st":16.9830006917318,"bm":0},{"ddd":0,"ind":19,"ty":2,"nm":"1_0018.png","cl":"png","refId":"image_18","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":17.9820007324219,"op":18.981000773112,"st":17.9820007324219,"bm":0},{"ddd":0,"ind":20,"ty":2,"nm":"1_0019.png","cl":"png","refId":"image_19","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":18.981000773112,"op":19.9800008138021,"st":18.981000773112,"bm":0},{"ddd":0,"ind":21,"ty":2,"nm":"1_0020.png","cl":"png","refId":"image_20","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":19.9800008138021,"op":20.9790008544922,"st":19.9800008138021,"bm":0},{"ddd":0,"ind":22,"ty":2,"nm":"1_0021.png","cl":"png","refId":"image_21","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":20.9790008544922,"op":21.9780008951823,"st":20.9790008544922,"bm":0},{"ddd":0,"ind":23,"ty":2,"nm":"1_0022.png","cl":"png","refId":"image_22","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":21.9780008951823,"op":22.9770009358724,"st":21.9780008951823,"bm":0},{"ddd":0,"ind":24,"ty":2,"nm":"1_0023.png","cl":"png","refId":"image_23","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":22.9770009358724,"op":23.9760009765625,"st":22.9770009358724,"bm":0},{"ddd":0,"ind":25,"ty":2,"nm":"1_0024.png","cl":"png","refId":"image_24","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":23.9760009765625,"op":24.9750010172526,"st":23.9760009765625,"bm":0},{"ddd":0,"ind":26,"ty":2,"nm":"1_0025.png","cl":"png","refId":"image_25","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":24.9750010172526,"op":25.9740010579427,"st":24.9750010172526,"bm":0},{"ddd":0,"ind":27,"ty":2,"nm":"1_0026.png","cl":"png","refId":"image_26","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":25.9740010579427,"op":26.9730010986328,"st":25.9740010579427,"bm":0},{"ddd":0,"ind":28,"ty":2,"nm":"1_0027.png","cl":"png","refId":"image_27","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":26.9730010986328,"op":27.9720011393229,"st":26.9730010986328,"bm":0},{"ddd":0,"ind":29,"ty":2,"nm":"1_0028.png","cl":"png","refId":"image_28","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":27.9720011393229,"op":28.971001180013,"st":27.9720011393229,"bm":0},{"ddd":0,"ind":30,"ty":2,"nm":"1_0029.png","cl":"png","refId":"image_29","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":28.971001180013,"op":29.9700012207031,"st":28.971001180013,"bm":0},{"ddd":0,"ind":31,"ty":2,"nm":"1_0030.png","cl":"png","refId":"image_30","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":29.9700012207031,"op":30.9690012613932,"st":29.9700012207031,"bm":0},{"ddd":0,"ind":32,"ty":2,"nm":"1_0031.png","cl":"png","refId":"image_31","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":30.9690012613932,"op":31.9680013020833,"st":30.9690012613932,"bm":0},{"ddd":0,"ind":33,"ty":2,"nm":"1_0032.png","cl":"png","refId":"image_32","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":31.9680013020833,"op":32.9670013427734,"st":31.9680013020833,"bm":0},{"ddd":0,"ind":34,"ty":2,"nm":"1_0033.png","cl":"png","refId":"image_33","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":32.9670013427734,"op":33.9660013834635,"st":32.9670013427734,"bm":0},{"ddd":0,"ind":35,"ty":2,"nm":"1_0034.png","cl":"png","refId":"image_34","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":33.9660013834635,"op":34.9650014241536,"st":33.9660013834635,"bm":0},{"ddd":0,"ind":36,"ty":2,"nm":"1_0035.png","cl":"png","refId":"image_35","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":34.9650014241536,"op":35.9640014648438,"st":34.9650014241536,"bm":0},{"ddd":0,"ind":37,"ty":2,"nm":"1_0036.png","cl":"png","refId":"image_36","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":35.9640014648437,"op":36.9630015055339,"st":35.9640014648437,"bm":0},{"ddd":0,"ind":38,"ty":2,"nm":"1_0037.png","cl":"png","refId":"image_37","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":36.9630015055339,"op":37.962001546224,"st":36.9630015055339,"bm":0},{"ddd":0,"ind":39,"ty":2,"nm":"1_0038.png","cl":"png","refId":"image_38","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":37.962001546224,"op":38.9610015869141,"st":37.962001546224,"bm":0},{"ddd":0,"ind":40,"ty":2,"nm":"1_0039.png","cl":"png","refId":"image_39","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":38.9610015869141,"op":39.9600016276042,"st":38.9610015869141,"bm":0},{"ddd":0,"ind":41,"ty":2,"nm":"1_0040.png","cl":"png","refId":"image_40","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":39.9600016276042,"op":40.9590016682943,"st":39.9600016276042,"bm":0},{"ddd":0,"ind":42,"ty":2,"nm":"1_0041.png","cl":"png","refId":"image_41","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":40.9590016682943,"op":41.9580017089844,"st":40.9590016682943,"bm":0},{"ddd":0,"ind":43,"ty":2,"nm":"1_0042.png","cl":"png","refId":"image_42","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":41.9580017089844,"op":42.9570017496745,"st":41.9580017089844,"bm":0},{"ddd":0,"ind":44,"ty":2,"nm":"1_0043.png","cl":"png","refId":"image_43","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":42.9570017496745,"op":43.9560017903646,"st":42.9570017496745,"bm":0},{"ddd":0,"ind":45,"ty":2,"nm":"1_0044.png","cl":"png","refId":"image_44","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":43.9560017903646,"op":44.9550018310547,"st":43.9560017903646,"bm":0},{"ddd":0,"ind":46,"ty":2,"nm":"1_0045.png","cl":"png","refId":"image_45","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":44.9550018310547,"op":45.9540018717448,"st":44.9550018310547,"bm":0},{"ddd":0,"ind":47,"ty":2,"nm":"1_0046.png","cl":"png","refId":"image_46","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":45.9540018717448,"op":46.9530019124349,"st":45.9540018717448,"bm":0},{"ddd":0,"ind":48,"ty":2,"nm":"1_0047.png","cl":"png","refId":"image_47","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":46.9530019124349,"op":47.952001953125,"st":46.9530019124349,"bm":0},{"ddd":0,"ind":49,"ty":2,"nm":"1_0048.png","cl":"png","refId":"image_48","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":47.952001953125,"op":48.9510019938151,"st":47.952001953125,"bm":0},{"ddd":0,"ind":50,"ty":2,"nm":"1_0049.png","cl":"png","refId":"image_49","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":48.9510019938151,"op":49.9500020345052,"st":48.9510019938151,"bm":0},{"ddd":0,"ind":51,"ty":2,"nm":"1_0050.png","cl":"png","refId":"image_50","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":49.9500020345052,"op":50.9490020751953,"st":49.9500020345052,"bm":0},{"ddd":0,"ind":52,"ty":2,"nm":"1_0051.png","cl":"png","refId":"image_51","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":50.9490020751953,"op":51.9480021158854,"st":50.9490020751953,"bm":0},{"ddd":0,"ind":53,"ty":2,"nm":"1_0052.png","cl":"png","refId":"image_52","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":51.9480021158854,"op":52.9470021565755,"st":51.9480021158854,"bm":0},{"ddd":0,"ind":54,"ty":2,"nm":"1_0053.png","cl":"png","refId":"image_53","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":52.9470021565755,"op":53.9460021972656,"st":52.9470021565755,"bm":0},{"ddd":0,"ind":55,"ty":2,"nm":"1_0054.png","cl":"png","refId":"image_54","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":53.9460021972656,"op":54.9450022379557,"st":53.9460021972656,"bm":0},{"ddd":0,"ind":56,"ty":2,"nm":"1_0055.png","cl":"png","refId":"image_55","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":54.9450022379557,"op":55.9440022786458,"st":54.9450022379557,"bm":0},{"ddd":0,"ind":57,"ty":2,"nm":"1_0056.png","cl":"png","refId":"image_56","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":55.9440022786458,"op":56.9430023193359,"st":55.9440022786458,"bm":0},{"ddd":0,"ind":58,"ty":2,"nm":"1_0057.png","cl":"png","refId":"image_57","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":56.9430023193359,"op":57.942002360026,"st":56.9430023193359,"bm":0},{"ddd":0,"ind":59,"ty":2,"nm":"1_0058.png","cl":"png","refId":"image_58","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":57.942002360026,"op":58.9410024007162,"st":57.942002360026,"bm":0},{"ddd":0,"ind":60,"ty":2,"nm":"1_0059.png","cl":"png","refId":"image_59","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":58.9410024007161,"op":59.9400024414062,"st":58.9410024007161,"bm":0},{"ddd":0,"ind":61,"ty":2,"nm":"1_0060.png","cl":"png","refId":"image_60","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":59.9400024414062,"op":60.9390024820963,"st":59.9400024414062,"bm":0},{"ddd":0,"ind":62,"ty":2,"nm":"1_0061.png","cl":"png","refId":"image_61","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":60.9390024820963,"op":61.9380025227864,"st":60.9390024820963,"bm":0},{"ddd":0,"ind":63,"ty":2,"nm":"1_0062.png","cl":"png","refId":"image_62","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":61.9380025227865,"op":62.9370025634766,"st":61.9380025227865,"bm":0},{"ddd":0,"ind":64,"ty":2,"nm":"1_0063.png","cl":"png","refId":"image_63","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":62.9370025634766,"op":63.9360026041667,"st":62.9370025634766,"bm":0},{"ddd":0,"ind":65,"ty":2,"nm":"1_0064.png","cl":"png","refId":"image_64","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":63.9360026041667,"op":64.9350026448568,"st":63.9360026041667,"bm":0},{"ddd":0,"ind":66,"ty":2,"nm":"1_0065.png","cl":"png","refId":"image_65","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":64.9350026448568,"op":65.9340026855469,"st":64.9350026448568,"bm":0},{"ddd":0,"ind":67,"ty":2,"nm":"1_0066.png","cl":"png","refId":"image_66","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":65.9340026855469,"op":66.933002726237,"st":65.9340026855469,"bm":0},{"ddd":0,"ind":68,"ty":2,"nm":"1_0067.png","cl":"png","refId":"image_67","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":66.933002726237,"op":67.9320027669271,"st":66.933002726237,"bm":0},{"ddd":0,"ind":69,"ty":2,"nm":"1_0068.png","cl":"png","refId":"image_68","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":67.9320027669271,"op":68.9310028076172,"st":67.9320027669271,"bm":0},{"ddd":0,"ind":70,"ty":2,"nm":"1_0069.png","cl":"png","refId":"image_69","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":68.9310028076172,"op":69.9300028483073,"st":68.9310028076172,"bm":0},{"ddd":0,"ind":71,"ty":2,"nm":"1_0070.png","cl":"png","refId":"image_70","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[640,360,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":69.9300028483073,"op":70.9290028889974,"st":69.9300028483073,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[400,225,0],"ix":2},"a":{"a":0,"k":[640,360,0],"ix":1},"s":{"a":0,"k":[59,59,100],"ix":6}},"ao":0,"w":1280,"h":720,"ip":0,"op":45.0000018328876,"st":-9.00000036657752,"bm":0}],"markers":[]}
GitHub Repo https://github.com/k10uD/gamepet

k10uD/gamepet

import play photo = play.new_image(image = "1.jpg", x = 0, y = 0, size = 80) text = play.new_text(words = "GIVE ME MY FOOD!!!", x = 0, y = -80, font_size = 20, color = "black") @play.when_program_starts def start(): photo.hide() @play.repeat_forever def do (): if play.key_is_pressed("a"): text.words = "I want to eat" photo.image = "2.jpg" photo.show() if play.key_is_pressed("s"): text.words = "come I will give you a hug!" photo.image = "3.png" photo.show() if play.key_is_pressed("d"): text.words = "relax" photo.image = "4.jpg" photo.show() if play.key_is_pressed("w"): text.words = "YUHU!!!" photo.image = "5.png" photo.show() play.start_program()
GitHub Repo https://github.com/LilTopp/dsa

LilTopp/dsa

import pickle import pygame import os from pygame import mixer from os import path pygame.font.init() pygame.mixer.init() # Version----------------- Version = "1.0" # SetupWindow----------------- HEIGHT, WIDTH = 800, 800 WIN = pygame.display.set_mode((HEIGHT, WIDTH)) pygame.display.set_caption("Game") display = pygame.Surface((HEIGHT, WIDTH)) characterHeight = 90 characterWidth = 100 Block_width = 40 Block_heigh = 40 tile_size = 50 run = True clock = pygame.time.Clock() FPS = 60 player_rect = pygame.Rect((80, 100), (80, 90)) lvl = 1 maxlevels = 20 # BackgroundMusic----------------- def backgroundmusic(): mixer.music.load("music/popsmoke.mp3") mixer.music.set_volume(0.008) mixer.music.play(-1) # SFX----------------- jump_s = pygame.mixer.Sound('music/jump.sound.mp3') jump_s.set_volume(0.4) shoot_s = pygame.mixer.Sound('music/shoot.sound.mp3') shoot_s.set_volume(0.3) # Background"0" Background = pygame.image.load(os.path.join("assets/imgs", "BC3.png")) # ImageUpload----------------- """ WalkingList = [pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_000.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_001.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_002.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_003.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_004.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_005.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_006.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_007.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_008.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_009.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_010.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_011.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_012.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_013.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_014.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_015.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_016.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Walking", "Satyr_01_Walking_017.png")), (characterHeight, characterWidth)), ] IdleList = [pygame.transform.scale(pygame.image.load(os.path.join("Idle", "Satyr_01_Idle_000.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle", "Satyr_01_Idle_001.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle", "Satyr_01_Idle_002.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle", "Satyr_01_Idle_003.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle", "Satyr_01_Idle_004.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle", "Satyr_01_Idle_005.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle", "Satyr_01_Idle_006.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle", "Satyr_01_Idle_007.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle", "Satyr_01_Idle_008.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle", "Satyr_01_Idle_009.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle", "Satyr_01_Idle_010.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle", "Satyr_01_Idle_011.png")), (characterHeight, characterWidth)), ] JumpList = [pygame.transform.scale(pygame.image.load(os.path.join("Jump Loop", "Satyr_01_Jump Loop_000.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Jump Loop", "Satyr_01_Jump Loop_001.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Jump Loop", "Satyr_01_Jump Loop_002.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Jump Loop", "Satyr_01_Jump Loop_003.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Jump Loop", "Satyr_01_Jump Loop_004.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Jump Loop", "Satyr_01_Jump Loop_005.png")), (characterHeight, characterWidth)), ] IdleBlinkList = [pygame.transform.scale(pygame.image.load(os.path.join("Idle Blink", "Satyr_01_Idle Blinking_000.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle Blink", "Satyr_01_Idle Blinking_001.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle Blink", "Satyr_01_Idle Blinking_002.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle Blink", "Satyr_01_Idle Blinking_003.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle Blink", "Satyr_01_Idle Blinking_004.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle Blink", "Satyr_01_Idle Blinking_005.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle Blink", "Satyr_01_Idle Blinking_006.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle Blink", "Satyr_01_Idle Blinking_007.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle Blink", "Satyr_01_Idle Blinking_008.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle Blink", "Satyr_01_Idle Blinking_009.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle Blink", "Satyr_01_Idle Blinking_010.png")), (characterHeight, characterWidth)), pygame.transform.scale(pygame.image.load(os.path.join("Idle Blink", "Satyr_01_Idle Blinking_011.png")), (characterHeight, characterWidth))] """ def reset_level(lvl): player.reset(100, HEIGHT - 130) blob_group.empty() tele_group.empty() # load in level data and create world if path.exists(f'level{lvl}_data'): pickle_in = open(f'level{lvl}_data', 'rb') world_data = pickle.load(pickle_in) world = World(world_data) return world class World(): def __init__(self, data): self.tile_list = [] # load images grass_img = pygame.transform.scale(pygame.image.load(os.path.join("tiles/1 Tiles/2.png")), (Block_heigh, Block_width)) dirt_img = pygame.transform.scale(pygame.image.load(os.path.join("tiles/1 Tiles/1.png")), (Block_heigh, Block_width)) row_count = 0 for row in data: col_count = 0 for tile in row: if tile == 1: img = pygame.transform.scale(grass_img, (Block_width, Block_width)) img_rect = img.get_rect() img_rect.x = col_count * Block_width img_rect.y = row_count * Block_width tile = (img, img_rect) self.tile_list.append(tile) if tile == 0: img = pygame.transform.scale(dirt_img, (Block_width, Block_width)) img_rect = img.get_rect() img_rect.x = col_count * Block_width img_rect.y = row_count * Block_width tile = (img, img_rect) self.tile_list.append(tile) if tile == 2: blob = Enemy(col_count * Block_width, row_count * Block_width - 15) blob_group.add(blob) if tile == 3: tele = Teleport(col_count * Block_width, row_count * Block_width - 15) tele_group.add(tele) col_count += 1 row_count += 1 def draw(self): for tile in self.tile_list: WIN.blit(tile[0], tile[1]) Tree = pygame.transform.scale(pygame.image.load(os.path.join("Willows", "3.png")), (350, 300)) WIN.blit(Tree, (450, 420)) Tombstone = pygame.transform.scale(pygame.image.load(os.path.join("Stones", "1.png")), (80, 70)) WIN.blit(Tombstone, (470, 650)) class Player(pygame.sprite.Sprite): def __init__(self, x, y, health=100): self.images_right = [] self.images_left = [] self.inx = 0 self.counter = 0 for num in range(0, 18): img_right = pygame.image.load(f"Player/Walking/Satyr_01_Walking_{num}.png") img_right = pygame.transform.scale(img_right, (characterWidth, characterHeight)) img_left = pygame.transform.flip(img_right, True, False) self.images_right.append(img_right) self.images_left.append(img_left) self.image = self.images_right[self.inx] self.rect = self.image.get_rect() self.rect.x = x + 40 self.rect.y = y self.rect.width = 40 self.rect.height = 60 self.height = self.image.get_height() self.width = self.image.get_width() self.palyer_img = None self.direction = 0 self.char_vel = 0 self.jumped = False self.jumpingcounter = 0 Tombstone = pygame.transform.scale(pygame.image.load(os.path.join("Stones", "1.png")), (80, 70)) WIN.blit(Tombstone, (470, 650)) self.Tombstone = Tombstone.get_rect() self.jump_s = pygame.mixer.Sound('music/jump.sound.mp3') self.jump_s.set_volume(0.4) self.collect_crystal_sound = pygame.mixer.Sound('music/coinsound.mp3') self.collect_crystal_sound.set_volume(0.1) self.crystalcounter = 0 def update(self): hx = 0 hy = 0 walk_cooldown = 1 # jumping&Moving&Gravity # 1.0-Jumping keys = pygame.key.get_pressed() if keys[pygame.K_SPACE] and self.jumped == False: self.char_vel = -15 self.jumpingcounter += 1 self.jumped = True self.jump_s.play() if keys[pygame.K_SPACE] == False: self.jumped = False # 1.1-Moving if keys[pygame.K_a]: hx -= 5 self.counter += 1 self.direction = -1 if keys[pygame.K_d]: hx += 5 self.counter += 1 self.direction = 1 if keys[pygame.K_a] == False and keys[pygame.K_d] == False: self.counter = 0 self.inx = 0 self.image = self.images_right[self.inx] # Animation if self.counter > walk_cooldown: self.counter = 0 self.inx += 1 if self.inx >= len(self.images_right): self.inx = 0 if self.direction == 1: self.image = self.images_right[self.inx] if self.direction == -1: self.image = self.images_left[self.inx] # 1.2-Gravity self.char_vel += 1 if self.char_vel > 7: self.char_vel = 7 hy += self.char_vel # Collisions for tile in world.tile_list: if tile[1].colliderect(self.rect.x + hx, self.rect.y, self.rect.width, self.rect.height): hx = 0 if tile[1].colliderect(self.rect.x, self.rect.y + hy, self.rect.width, self.rect.height): if self.char_vel < 0: hy = tile[1].bottom - self.rect.top self.char_vel = 0 elif self.char_vel >= 0: hy = tile[1].top - self.rect.bottom self.char_vel = 0 # collisons with Crystals if pygame.sprite.spritecollide(self, blob_group, True): print("Stretli sa") self.collect_crystal_sound.play() self.crystalcounter += 1 return self.crystalcounter # collisons with Teleport if pygame.sprite.spritecollide(self, tele_group, False): game_over = 1 print("teleport") self.rect.x += hx self.rect.y += hy if self.rect.bottom > HEIGHT: self.rect.bottom = HEIGHT hy = 0 if self.crystalcounter == 5: tele_group.draw(WIN) tele_group.update() imgsrect = self.image.get_rect() imgsrect.x = self.rect.x - 34 imgsrect.y = self.rect.y - 10 WIN.blit(self.image, imgsrect) class Lava(pygame.sprite.Sprite): def __init__(self, x, y): pygame.sprite.Sprite.__init__(self) self.image = pygame.transform.scale(pygame.image.load(os.path.join("lava", "lava_tile1.png")), (Block_heigh, Block_width)) self.rect = self.image.get_rect() self.rect.x = x self.rect.y = y self.move_lava = -5 def update(self): self.rect.y += self.move_lava """ def draw(self): WIN.blit(self.image, (450, 420)) """ class Enemy(pygame.sprite.Sprite): def __init__(self, x, y, ): pygame.sprite.Sprite.__init__(self) self.image = pygame.transform.scale(pygame.image.load(os.path.join("tiles/1 Tiles/3.png")), (Block_heigh, Block_width)) self.rect = self.image.get_rect() self.rect.x = x self.rect.y = y self.move = -1 self.move_counter = 0 def update(self): self.rect.y += self.move self.move_counter += 1 if self.move_counter > 15: self.move *= -1 self.move_counter = 0 class Teleport(pygame.sprite.Sprite): def __init__(self, x, y, ): pygame.sprite.Sprite.__init__(self) self.image = pygame.transform.scale(pygame.image.load(os.path.join("tiles/1 Tiles/4.png")), (Block_heigh, Block_width)) self.rect = self.image.get_rect() self.rect.x = x self.rect.y = y self.moveteleport = -1 self.move_counter_teleport = 0 def update(self): self.rect.y += self.moveteleport self.move_counter_teleport += 1 if self.move_counter_teleport > 15: self.moveteleport *= -1 self.move_counter_teleport = 0 # main----------------- backgroundmusic() shoot_s.play() player = Player(400, HEIGHT - 40) blob_group = pygame.sprite.Group() tele_group = pygame.sprite.Group() pickle_in = open(f"level{lvl}_data", "rb") world_data = pickle.load(pickle_in) world = World(world_data) while run: world.draw() clock.tick(FPS) player.update() pygame.display.update() WIN.blit(Background, (0, 0)) """ Lava.draw() """ """ Lava.update() """ blob_group.draw(WIN) blob_group.update() game_over = player.update(game_over) if game_over == 1: lvl += 1 if lvl <= maxlevels: world_data = [] world = reset_level(lvl) game_over = 0 else: pass for event in pygame.event.get(): if event.type == pygame.QUIT: run = False