Skip to content

Commit

Permalink
0612 add pvp 안내
Browse files Browse the repository at this point in the history
  • Loading branch information
yaena1223 committed Jun 12, 2022
1 parent a7194d4 commit 12c6aac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Binary file added Image/catthema/pvp_help.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 14 additions & 4 deletions game/pvpGame.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ def __init__(self,character_data,character1,character2,stage):

self.direction2 = {None: (0, 0), pygame.K_UP: (0, -2), pygame.K_DOWN: (0, 2),
pygame.K_LEFT: (-2, 0), pygame.K_RIGHT: (2, 0)} #playter2


mytheme = pygame_menu.themes.THEME_ORANGE.copy()
self.menu = pygame_menu.Menu('PVP.', self.size[0], self.size[1],
theme=mytheme)

def main(self, screen):
# 메인 이벤트
Expand Down Expand Up @@ -352,7 +353,16 @@ def check_crash(self,o1,o2):
else:
return False


def pvp_info(self):
self.check_resize(self.screen)
self.infopvp_img = "./Image/catthema/pvp_help.png"
self.menu.add.image(self.infopvp_img, scale=Scales.default.value)
infowindow = pygame.image.load(self.infopvp_img)
infowindow = pygame.transform.scale(infowindow, self.size)
self.screen.blit(infowindow, [0,0])
pygame.display.flip()
time.sleep(3) # 3초뒤에 게임 시작.
self.main(self.screen)

# 화면 크기 조정 감지 및 비율 고정
def check_resize(self,screen):
Expand Down Expand Up @@ -558,6 +568,7 @@ def use2(self, game, character2):
self.character2.is_collidable = False
game.item_list.remove(self)


class SpeedUp(Item):
# 스피드업 아이템: 획득 시 캐릭터 이동/발사 속도 증가
def __init__(self, animation):
Expand Down Expand Up @@ -588,4 +599,3 @@ def use2(self, game, character2):
game.item_list.remove(self)



0 comments on commit 12c6aac

Please sign in to comment.