├── README.md ├── data.txt ├── demo.png ├── plane_cnn.py ├── platech.ttf ├── rec_inference_model ├── .success ├── __model__ ├── __params__ └── model.yml └── resources ├── font ├── font.fnt └── font.png └── image ├── background.png ├── gameover.png ├── shoot.pack ├── shoot.png ├── shoot_background.pack └── shoot_background.png /README.md: -------------------------------------------------------------------------------- 1 | # PaddlePaddle实现手势识别玩转打飞机小游戏! 2 | 3 | ## 运行代码: 4 | 5 | ``` 6 | python plane_cnn.py 7 | ``` 8 | 9 | ## 演示视频: 10 | https://www.bilibili.com/video/BV1HV411t7LG/ 11 | 12 | ![](https://github.com/Sharpiless/Hand-gesture-recognition-for-game/blob/master/demo.png) 13 | -------------------------------------------------------------------------------- /data.txt: -------------------------------------------------------------------------------- 1 | 25 -------------------------------------------------------------------------------- /demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sharpiless/Hand-gesture-recognition-for-game/aee3688fb8c1f9d3147760e7bf129c02c0eb65ef/demo.png -------------------------------------------------------------------------------- /plane_cnn.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import pygame 3 | from sys import exit 4 | from pygame.locals import * 5 | import random 6 | import cv2 7 | from imutils import resize 8 | from paddlex.deploy import Predictor 9 | import pygame.font 10 | import os 11 | 12 | 13 | def text_objects(text, font): 14 | # 将字符串转换为pygame的文本框 15 | textSurface = font.render(text, True, (0, 0, 0)) 16 | return textSurface, textSurface.get_rect() 17 | 18 | 19 | # 设置游戏屏幕大小 20 | SCREEN_WIDTH = 480 21 | SCREEN_HEIGHT = 800 22 | 23 | # 手势识别器 24 | model = Predictor('rec_inference_model', use_gpu=True) 25 | 26 | # 子弹类 27 | 28 | 29 | class Bullet(pygame.sprite.Sprite): 30 | def __init__(self, bullet_img, init_pos): 31 | pygame.sprite.Sprite.__init__(self) 32 | self.image = bullet_img # 子弹图像 33 | self.rect = self.image.get_rect() # 子弹大小和位置 34 | self.rect.midbottom = init_pos # 设置初始位置 35 | self.speed = 10 # 子弹速度 36 | 37 | def move(self): 38 | self.rect.top -= self.speed # 子弹移动 39 | 40 | # 玩家飞机类 41 | 42 | 43 | class Player(pygame.sprite.Sprite): 44 | def __init__(self, plane_img, player_rect, init_pos): 45 | pygame.sprite.Sprite.__init__(self) 46 | self.image = [] # 用来存储玩家飞机图片的列表 47 | for i in range(len(player_rect)): 48 | self.image.append(plane_img.subsurface( 49 | player_rect[i]).convert_alpha()) 50 | self.rect = player_rect[0] # 初始化图片所在的矩形 51 | self.rect.topleft = init_pos # 初始化矩形的左上角坐标 52 | self.speed = 8 # 初始化玩家飞机速度,这里是一个确定的值 53 | self.bullets = pygame.sprite.Group() # 玩家飞机所发射的子弹的集合 54 | self.is_hit = False # 玩家是否被击中 55 | 56 | # 发射子弹 57 | def shoot(self, bullet_img): 58 | bullet = Bullet(bullet_img, self.rect.midtop) 59 | self.bullets.add(bullet) 60 | 61 | # 向上移动,需要判断边界 62 | def moveUp(self): 63 | if self.rect.top <= 0: 64 | self.rect.top = 0 65 | else: 66 | self.rect.top -= self.speed 67 | 68 | # 向下移动,需要判断边界 69 | def moveDown(self): 70 | if self.rect.top >= SCREEN_HEIGHT - self.rect.height: 71 | self.rect.top = SCREEN_HEIGHT - self.rect.height 72 | else: 73 | self.rect.top += self.speed 74 | 75 | # 向左移动,需要判断边界 76 | def moveLeft(self): 77 | if self.rect.left <= 0: 78 | self.rect.left = 0 79 | else: 80 | self.rect.left -= self.speed 81 | 82 | # 向右移动,需要判断边界 83 | def moveRight(self): 84 | if self.rect.left >= SCREEN_WIDTH - self.rect.width: 85 | self.rect.left = SCREEN_WIDTH - self.rect.width 86 | else: 87 | self.rect.left += self.speed 88 | 89 | # 敌机类 90 | 91 | 92 | class Enemy(pygame.sprite.Sprite): 93 | def __init__(self, enemy_img, enemy_down_imgs, init_pos): 94 | pygame.sprite.Sprite.__init__(self) 95 | self.image = enemy_img 96 | self.rect = self.image.get_rect() 97 | self.rect.topleft = init_pos 98 | self.down_imgs = enemy_down_imgs 99 | self.speed = 1 100 | 101 | # 敌机移动,边界判断及删除在游戏主循环里处理 102 | def move(self): 103 | self.rect.top += self.speed 104 | 105 | 106 | # 初始化 pygame 107 | pygame.init() 108 | 109 | # 设置游戏界面大小、背景图片及标题 110 | # 游戏界面像素大小 111 | screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) 112 | 113 | # 游戏界面标题 114 | pygame.display.set_caption('Python打飞机大战') 115 | 116 | # 背景图 117 | background = pygame.image.load('resources/image/background.png').convert() 118 | 119 | # 开始游戏 120 | # start_btn = pygame.image.load("2019031114200572.png").convert() 121 | 122 | # Game Over 的背景图 123 | game_over = pygame.image.load('resources/image/gameover.png') 124 | 125 | # 飞机及子弹图片集合 126 | plane_img = pygame.image.load('resources/image/shoot.png') 127 | 128 | # 设置玩家飞机不同状态的图片列表,多张图片展示为动画效果 129 | player_rect = [] 130 | player_rect.append(pygame.Rect(0, 99, 102, 126)) # 玩家飞机图片 131 | player_rect.append(pygame.Rect(165, 234, 102, 126)) # 玩家爆炸图片 132 | 133 | player_pos = [200, 600] 134 | player = Player(plane_img, player_rect, player_pos) 135 | 136 | # 子弹图片 137 | bullet_rect = pygame.Rect(1004, 987, 9, 21) 138 | bullet_img = plane_img.subsurface(bullet_rect) 139 | 140 | # 敌机不同状态的图片列表,包括正常敌机,爆炸的敌机图片 141 | enemy1_rect = pygame.Rect(534, 612, 57, 43) 142 | enemy1_img = plane_img.subsurface(enemy1_rect) 143 | enemy1_down_imgs = plane_img.subsurface(pygame.Rect(267, 347, 57, 43)) 144 | 145 | 146 | # 存储敌机,管理多个对象 147 | enemies1 = pygame.sprite.Group() 148 | 149 | # 存储被击毁的飞机 150 | enemies_down = pygame.sprite.Group() 151 | 152 | # 初始化射击及敌机移动频率 153 | shoot_frequency = 0 154 | enemy_frequency = 0 155 | 156 | # 初始化分数 157 | score = 0 158 | 159 | # 游戏循环帧率设置 160 | clock = pygame.time.Clock() 161 | 162 | # 判断游戏循环退出的参数 163 | running = True 164 | 165 | # 移动方向(初始化) 166 | move = 'pause' 167 | 168 | # 读取前置摄像头 169 | camera = cv2.VideoCapture(0) 170 | 171 | # 手势区域 172 | top, right, bottom, left = 90, 360, 285, 580 173 | 174 | fps = 50 175 | 176 | start = False 177 | 178 | if os.path.exists('data.txt'): 179 | with open('data.txt', 'r') as f: 180 | max_score = eval(f.read()) 181 | else: 182 | max_score = 0 183 | 184 | # 游戏主循环 185 | while running: 186 | # 控制游戏最大帧率 187 | clock.tick(fps) 188 | # 绘制背景 189 | screen.fill(0) 190 | screen.blit(background, (0, 0)) 191 | 192 | # 绘制玩家飞机 193 | if not player.is_hit: 194 | screen.blit(player.image[0], player.rect) # 将正常飞机画出来 195 | else: 196 | # 玩家飞机被击中后的效果处理 197 | screen.blit(player.image[1], player.rect) # 将爆炸的飞机画出来 198 | running = False 199 | 200 | if not start: 201 | # 开始界面 202 | screen_rect = screen.get_rect() 203 | largeText = pygame.font.Font('platech.ttf', 80) 204 | TextSurf, TextRect = text_objects('飞机大战', largeText) 205 | TextRect.center = ((SCREEN_WIDTH/2), (SCREEN_HEIGHT/3)) 206 | screen.blit(TextSurf, TextRect) # 绘制“飞机大战”文本框 207 | 208 | # 设置按钮的尺寸和其他属性 209 | width, height = 200, 50 210 | button_color = (0, 255, 0) 211 | text_color = (255, 255, 255) 212 | font = pygame.font.SysFont(None, 48) 213 | 214 | # 创建按钮的rect对象,居中 215 | rect = pygame.Rect(0, 0, width, height) 216 | rect.center = screen_rect.center 217 | msg_image = font.render("Play", True, text_color, 218 | button_color) 219 | msg_image_rect = msg_image.get_rect() 220 | msg_image_rect.center = rect.center 221 | screen.fill(button_color, rect) 222 | screen.blit(msg_image, msg_image_rect) 223 | pressed = pygame.mouse.get_pressed() # 创建开始游戏按钮 224 | x1, y1 = pygame.mouse.get_pos() 225 | if x1 > 142 and y1 > 377: 226 | if x1 < 338 and y1 < 423: 227 | if pressed[0]: 228 | # 响应点击Play事件,游戏开始 229 | start = True 230 | 231 | else: 232 | if score < 25: 233 | # 生成子弹,需要控制发射频率 234 | # 首先判断玩家飞机没有被击中 235 | if not player.is_hit: 236 | if shoot_frequency % 15 == 0: 237 | # 循环15次发射一个子弹 238 | player.shoot(bullet_img) 239 | if shoot_frequency % 5 == 0: 240 | # 读取摄像头图像 241 | grabbed, frame = camera.read() 242 | if not grabbed: 243 | break 244 | frame = resize(frame, width=600) # 对摄像头图像放缩 245 | frame = cv2.flip(frame, 1) # 图像镜像处理(左右手问题) 246 | cv2.rectangle(frame, (left, top), 247 | (right, bottom), (0, 255, 0), 2) # 绘制绿框 248 | roi = frame[top:bottom, right:left] # 手势位置 249 | if shoot_frequency % 10 == 0: 250 | pred = model.predict(roi) # 使用SVM/CNN预测手势 251 | move = pred[0]['category'] 252 | print('-[INFO] Update movement to ', move) 253 | cv2.imshow('frame', frame) # 显示摄像头画面 254 | cv2.waitKey(int(1000/fps)) 255 | shoot_frequency += 1 256 | if shoot_frequency >= 15: 257 | shoot_frequency = 0 258 | 259 | # 生成敌机,需要控制生成频率 260 | # 循环50次生成一架敌机 261 | if enemy_frequency % 50 == 0: 262 | enemy1_pos = [random.randint( 263 | 0, SCREEN_WIDTH - enemy1_rect.width), 0] 264 | enemy1 = Enemy(enemy1_img, enemy1_down_imgs, enemy1_pos) 265 | enemies1.add(enemy1) 266 | enemy_frequency += 1 267 | if enemy_frequency >= 100: 268 | enemy_frequency = 0 269 | 270 | for bullet in player.bullets: 271 | # 以固定速度移动子弹 272 | bullet.move() 273 | # 移动出屏幕后删除子弹 274 | if bullet.rect.bottom < 0: 275 | player.bullets.remove(bullet) 276 | 277 | for enemy in enemies1: 278 | # 2. 移动敌机 279 | enemy.move() 280 | # 3. 敌机与玩家飞机碰撞效果处理 281 | if pygame.sprite.collide_circle(enemy, player): 282 | enemies_down.add(enemy) 283 | enemies1.remove(enemy) 284 | player.is_hit = True 285 | break 286 | # 4. 移动出屏幕后删除敌人 287 | if enemy.rect.top < 0: 288 | enemies1.remove(enemy) 289 | 290 | # 敌机被子弹击中效果处理 291 | # 将被击中的敌机对象添加到击毁敌机 Group 中 292 | enemies1_down = pygame.sprite.groupcollide( 293 | enemies1, player.bullets, 1, 1) 294 | for enemy_down in enemies1_down: 295 | enemies_down.add(enemy_down) 296 | 297 | # 敌机被子弹击中效果显示 298 | for enemy_down in enemies_down: 299 | enemies_down.remove(enemy_down) 300 | score += 1 301 | screen.blit(enemy_down.down_imgs, enemy_down.rect) # 将爆炸的敌机画出来 302 | 303 | # 显示子弹 304 | player.bullets.draw(screen) 305 | # 显示敌机 306 | enemies1.draw(screen) 307 | else: 308 | screen_rect = screen.get_rect() 309 | largeText = pygame.font.Font('platech.ttf', 80) 310 | TextSurf, TextRect = text_objects('恭喜过关!', largeText) # 通关标识 311 | TextRect.center = ((SCREEN_WIDTH/2), (SCREEN_HEIGHT/3)) 312 | screen.blit(TextSurf, TextRect) 313 | 314 | # 设置按钮的尺寸和其他属性 315 | width, height = 200, 50 316 | button_color = (0, 255, 0) 317 | text_color = (255, 255, 255) 318 | font = pygame.font.SysFont(None, 48) 319 | 320 | # 创建按钮的rect对象,居中 321 | rect = pygame.Rect(0, 0, width, height) 322 | rect.center = screen_rect.center 323 | msg_image = font.render("Play", True, text_color, 324 | button_color) 325 | msg_image_rect = msg_image.get_rect() 326 | msg_image_rect.center = rect.center 327 | screen.fill(button_color, rect) 328 | screen.blit(msg_image, msg_image_rect) 329 | pressed = pygame.mouse.get_pressed() 330 | x1, y1 = pygame.mouse.get_pos() 331 | if x1 > 142 and y1 > 377: 332 | if x1 < 338 and y1 < 423: 333 | if pressed[0]: 334 | score = 0 335 | # 绘制得分 336 | score_font = pygame.font.Font(None, 36) 337 | if score > max_score: 338 | max_score = score 339 | with open('data.txt', 'w') as f: 340 | f.write(str(max_score)) 341 | score_text = score_font.render( 342 | 'score: {}/25 max score: {}'.format(str(score), max_score), True, (128, 128, 128)) 343 | text_rect = score_text.get_rect() 344 | text_rect.topleft = [10, 10] 345 | screen.blit(score_text, text_rect) 346 | 347 | # 更新屏幕 348 | pygame.display.update() 349 | 350 | # 处理游戏退出 351 | for event in pygame.event.get(): 352 | if event.type == pygame.QUIT: 353 | pygame.quit() 354 | exit() 355 | 356 | if move == 'right': 357 | player.moveRight() 358 | elif move == 'left': 359 | player.moveLeft() 360 | elif move == 'up': 361 | player.moveUp() 362 | elif move == 'down': 363 | player.moveDown() 364 | 365 | # 游戏 Game Over 后显示最终得分 366 | font = pygame.font.Font(None, 64) 367 | text = font.render('Final Score: ' + str(score), True, (255, 0, 0)) 368 | text_rect = text.get_rect() 369 | text_rect.centerx = screen.get_rect().centerx 370 | text_rect.centery = screen.get_rect().centery + 24 371 | screen.blit(game_over, (0, 0)) 372 | screen.blit(text, text_rect) 373 | 374 | # 显示得分并处理游戏退出 375 | while 1: 376 | for event in pygame.event.get(): 377 | if event.type == pygame.QUIT: 378 | pygame.quit() 379 | exit() 380 | pygame.display.update() 381 | -------------------------------------------------------------------------------- /platech.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sharpiless/Hand-gesture-recognition-for-game/aee3688fb8c1f9d3147760e7bf129c02c0eb65ef/platech.ttf -------------------------------------------------------------------------------- /rec_inference_model/.success: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sharpiless/Hand-gesture-recognition-for-game/aee3688fb8c1f9d3147760e7bf129c02c0eb65ef/rec_inference_model/.success -------------------------------------------------------------------------------- /rec_inference_model/__model__: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sharpiless/Hand-gesture-recognition-for-game/aee3688fb8c1f9d3147760e7bf129c02c0eb65ef/rec_inference_model/__model__ -------------------------------------------------------------------------------- /rec_inference_model/__params__: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sharpiless/Hand-gesture-recognition-for-game/aee3688fb8c1f9d3147760e7bf129c02c0eb65ef/rec_inference_model/__params__ -------------------------------------------------------------------------------- /rec_inference_model/model.yml: -------------------------------------------------------------------------------- 1 | Model: MobileNetV3_small_ssld 2 | Transforms: 3 | - RandomCrop: 4 | crop_size: 224 5 | lower_ratio: 0.75 6 | lower_scale: 0.08 7 | upper_ratio: 1.3333333333333333 8 | - Normalize: 9 | mean: 10 | - 0.485 11 | - 0.456 12 | - 0.406 13 | std: 14 | - 0.229 15 | - 0.224 16 | - 0.225 17 | TransformsMode: RGB 18 | _Attributes: 19 | eval_metrics: 20 | acc1: 0.9161490683229814 21 | fixed_input_shape: null 22 | labels: 23 | - pause 24 | - down 25 | - left 26 | - right 27 | - up 28 | model_type: classifier 29 | num_classes: 5 30 | _ModelInputsOutputs: 31 | test_inputs: 32 | - - image 33 | - image 34 | test_outputs: 35 | - - predict 36 | - softmax_0.tmp_0 37 | _init_params: 38 | num_classes: 5 39 | completed_epochs: 0 40 | status: Infer 41 | version: 1.3.1 42 | -------------------------------------------------------------------------------- /resources/font/font.fnt: -------------------------------------------------------------------------------- 1 | info face="Deeko Comic Regular" size=40 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=0,0 2 | common lineHeight=26 base=27 scaleW=512 scaleH=512 pages=1 packed=0 3 | page id=0 file="font.png" 4 | chars count=11 5 | char id=32 x=0 y=0 width=0 height=0 xoffset=0 yoffset=27 xadvance=12 page=0 chnl=0 6 | char id=52 x=0 y=0 width=30 height=40 xoffset=1 yoffset=-7 xadvance=30 page=0 chnl=0 7 | char id=51 x=30 y=0 width=27 height=38 xoffset=1 yoffset=-5 xadvance=27 page=0 chnl=0 8 | char id=88 x=57 y=0 width=30 height=34 xoffset=1 yoffset=-5 xadvance=30 page=0 chnl=0 9 | char id=56 x=87 y=0 width=33 height=34 xoffset=1 yoffset=-7 xadvance=34 page=0 chnl=0 10 | char id=57 x=120 y=0 width=30 height=33 xoffset=1 yoffset=-4 xadvance=30 page=0 chnl=0 11 | char id=50 x=150 y=0 width=29 height=33 xoffset=1 yoffset=-3 xadvance=30 page=0 chnl=0 12 | char id=48 x=179 y=0 width=27 height=31 xoffset=1 yoffset=-3 xadvance=28 page=0 chnl=0 13 | char id=54 x=206 y=0 width=31 height=31 xoffset=1 yoffset=0 xadvance=32 page=0 chnl=0 14 | char id=53 x=237 y=0 width=35 height=31 xoffset=1 yoffset=0 xadvance=36 page=0 chnl=0 15 | char id=49 x=272 y=0 width=6 height=31 xoffset=1 yoffset=-5 xadvance=7 page=0 chnl=0 16 | char id=55 x=278 y=0 width=33 height=30 xoffset=1 yoffset=-1 xadvance=34 page=0 chnl=0 17 | kernings count=-1 18 | -------------------------------------------------------------------------------- /resources/font/font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sharpiless/Hand-gesture-recognition-for-game/aee3688fb8c1f9d3147760e7bf129c02c0eb65ef/resources/font/font.png -------------------------------------------------------------------------------- /resources/image/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sharpiless/Hand-gesture-recognition-for-game/aee3688fb8c1f9d3147760e7bf129c02c0eb65ef/resources/image/background.png -------------------------------------------------------------------------------- /resources/image/gameover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sharpiless/Hand-gesture-recognition-for-game/aee3688fb8c1f9d3147760e7bf129c02c0eb65ef/resources/image/gameover.png -------------------------------------------------------------------------------- /resources/image/shoot.pack: -------------------------------------------------------------------------------- 1 | 2 | shoot.png 3 | format: RGBA8888 4 | filter: Nearest,Nearest 5 | repeat: none 6 | enemy3_down6 7 | rotate: false 8 | xy: 0, 747 9 | size: 166, 261 10 | orig: 166, 261 11 | offset: 0, 0 12 | index: -1 13 | enemy3_hit 14 | rotate: false 15 | xy: 166, 750 16 | size: 169, 258 17 | orig: 169, 258 18 | offset: 0, 0 19 | index: -1 20 | enemy3_n1 21 | rotate: false 22 | xy: 335, 750 23 | size: 169, 258 24 | orig: 169, 258 25 | offset: 0, 0 26 | index: -1 27 | enemy3_n2 28 | rotate: false 29 | xy: 504, 750 30 | size: 169, 258 31 | orig: 169, 258 32 | offset: 0, 0 33 | index: -1 34 | enemy3_down1 35 | rotate: false 36 | xy: 0, 486 37 | size: 165, 261 38 | orig: 165, 261 39 | offset: 0, 0 40 | index: -1 41 | enemy3_down2 42 | rotate: false 43 | xy: 0, 225 44 | size: 165, 261 45 | orig: 165, 261 46 | offset: 0, 0 47 | index: -1 48 | enemy3_down5 49 | rotate: false 50 | xy: 673, 748 51 | size: 166, 260 52 | orig: 166, 260 53 | offset: 0, 0 54 | index: -1 55 | enemy3_down3 56 | rotate: false 57 | xy: 839, 748 58 | size: 165, 260 59 | orig: 165, 260 60 | offset: 0, 0 61 | index: -1 62 | enemy3_down4 63 | rotate: false 64 | xy: 165, 486 65 | size: 165, 261 66 | orig: 165, 261 67 | offset: 0, 0 68 | index: -1 69 | hero1 70 | rotate: false 71 | xy: 0, 99 72 | size: 102, 126 73 | orig: 102, 126 74 | offset: 0, 0 75 | index: -1 76 | hero2 77 | rotate: false 78 | xy: 165, 360 79 | size: 102, 126 80 | orig: 102, 126 81 | offset: 0, 0 82 | index: -1 83 | hero_blowup_n1 84 | rotate: false 85 | xy: 165, 234 86 | size: 102, 126 87 | orig: 102, 126 88 | offset: 0, 0 89 | index: -1 90 | hero_blowup_n2 91 | rotate: false 92 | xy: 330, 624 93 | size: 102, 126 94 | orig: 102, 126 95 | offset: 0, 0 96 | index: -1 97 | hero_blowup_n3 98 | rotate: false 99 | xy: 330, 498 100 | size: 102, 126 101 | orig: 102, 126 102 | offset: 0, 0 103 | index: -1 104 | hero_blowup_n4 105 | rotate: false 106 | xy: 432, 624 107 | size: 102, 126 108 | orig: 102, 126 109 | offset: 0, 0 110 | index: -1 111 | enemy2 112 | rotate: false 113 | xy: 0, 0 114 | size: 69, 99 115 | orig: 69, 99 116 | offset: 0, 0 117 | index: -1 118 | enemy2_hit 119 | rotate: false 120 | xy: 432, 525 121 | size: 69, 99 122 | orig: 69, 99 123 | offset: 0, 0 124 | index: -1 125 | ufo2 126 | rotate: false 127 | xy: 102, 118 128 | size: 60, 107 129 | orig: 60, 107 130 | offset: 0, 0 131 | index: -1 132 | enemy2_down1 133 | rotate: false 134 | xy: 534, 655 135 | size: 69, 95 136 | orig: 69, 95 137 | offset: 0, 0 138 | index: -1 139 | enemy2_down2 140 | rotate: false 141 | xy: 603, 655 142 | size: 69, 95 143 | orig: 69, 95 144 | offset: 0, 0 145 | index: -1 146 | enemy2_down3 147 | rotate: false 148 | xy: 672, 653 149 | size: 69, 95 150 | orig: 69, 95 151 | offset: 0, 0 152 | index: -1 153 | enemy2_down4 154 | rotate: false 155 | xy: 741, 653 156 | size: 69, 95 157 | orig: 69, 95 158 | offset: 0, 0 159 | index: -1 160 | ufo1 161 | rotate: false 162 | xy: 267, 398 163 | size: 58, 88 164 | orig: 58, 88 165 | offset: 0, 0 166 | index: -1 167 | bomb 168 | rotate: false 169 | xy: 810, 691 170 | size: 63, 57 171 | orig: 63, 57 172 | offset: 0, 0 173 | index: -1 174 | enemy1_down1 175 | rotate: false 176 | xy: 267, 347 177 | size: 57, 51 178 | orig: 57, 51 179 | offset: 0, 0 180 | index: -1 181 | enemy1_down2 182 | rotate: false 183 | xy: 873, 697 184 | size: 57, 51 185 | orig: 57, 51 186 | offset: 0, 0 187 | index: -1 188 | enemy1_down3 189 | rotate: false 190 | xy: 267, 296 191 | size: 57, 51 192 | orig: 57, 51 193 | offset: 0, 0 194 | index: -1 195 | enemy1_down4 196 | rotate: false 197 | xy: 930, 697 198 | size: 57, 51 199 | orig: 57, 51 200 | offset: 0, 0 201 | index: -1 202 | game_pause_nor 203 | rotate: false 204 | xy: 267, 251 205 | size: 60, 45 206 | orig: 60, 45 207 | offset: 0, 0 208 | index: -1 209 | game_pause_pressed 210 | rotate: false 211 | xy: 810, 646 212 | size: 60, 45 213 | orig: 60, 45 214 | offset: 0, 0 215 | index: -1 216 | enemy1 217 | rotate: false 218 | xy: 534, 612 219 | size: 57, 43 220 | orig: 57, 43 221 | offset: 0, 0 222 | index: -1 223 | bullet1 224 | rotate: false 225 | xy: 1004, 987 226 | size: 9, 21 227 | orig: 9, 21 228 | offset: 0, 0 229 | index: -1 230 | bullet2 231 | rotate: false 232 | xy: 69, 78 233 | size: 9, 21 234 | orig: 9, 21 235 | offset: 0, 0 236 | index: -1 237 | -------------------------------------------------------------------------------- /resources/image/shoot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sharpiless/Hand-gesture-recognition-for-game/aee3688fb8c1f9d3147760e7bf129c02c0eb65ef/resources/image/shoot.png -------------------------------------------------------------------------------- /resources/image/shoot_background.pack: -------------------------------------------------------------------------------- 1 | 2 | shoot_background.png 3 | format: RGBA8888 4 | filter: Nearest,Nearest 5 | repeat: none 6 | background 7 | rotate: false 8 | xy: 0, 75 9 | size: 480, 852 10 | orig: 480, 852 11 | offset: 0, 0 12 | index: -1 13 | shoot_copyright 14 | rotate: false 15 | xy: 480, 702 16 | size: 441, 225 17 | orig: 441, 225 18 | offset: 0, 0 19 | index: -1 20 | game_loading1 21 | rotate: false 22 | xy: 0, 37 23 | size: 186, 38 24 | orig: 186, 38 25 | offset: 0, 0 26 | index: -1 27 | game_loading3 28 | rotate: false 29 | xy: 480, 664 30 | size: 186, 38 31 | orig: 186, 38 32 | offset: 0, 0 33 | index: -1 34 | game_loading2 35 | rotate: false 36 | xy: 0, 0 37 | size: 186, 37 38 | orig: 186, 37 39 | offset: 0, 0 40 | index: -1 41 | btn_finish 42 | rotate: false 43 | xy: 186, 27 44 | size: 150, 48 45 | orig: 150, 48 46 | offset: 0, 0 47 | index: -1 48 | game_loading4 49 | rotate: false 50 | xy: 480, 636 51 | size: 114, 28 52 | orig: 114, 28 53 | offset: 0, 0 54 | index: -1 55 | -------------------------------------------------------------------------------- /resources/image/shoot_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sharpiless/Hand-gesture-recognition-for-game/aee3688fb8c1f9d3147760e7bf129c02c0eb65ef/resources/image/shoot_background.png --------------------------------------------------------------------------------