master
ブランチ master
BrickBreaker / src / player.hh
411 B、25行 生 Blame 履歴
1#ifndef PLAYER_H
2#define PLAYER_H
3
4#include <SDL2/SDL.h>
5#include <iostream>
6
7#include "render.hh"
8
9class Player {
10 public:
11 SDL_Rect player, lives;
12
13 int score = 0;
14 int scoreMultiplier = 1;
15 int livesCount = 3;
16
17 Player(Render &r) {
18 player.h = 12;
19 player.y = r.height - player.h - 32;
20 player.w = r.width / 4;
21 player.x = (r.width / 2) - (player.w / 2);
22 }
23};
24
25#endif