このリポジトリは2023-11-17にアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュ、イシューの作成、プルリクエストはできません。
brickbreaker/src/player.hh

26 行
411 B
C++

#ifndef PLAYER_H
#define PLAYER_H
#include <SDL2/SDL.h>
#include <iostream>
#include "render.hh"
class Player {
public:
SDL_Rect player, lives;
int score = 0;
int scoreMultiplier = 1;
int livesCount = 3;
Player(Render& r) {
player.h = 12;
player.y = r.height - player.h - 32;
player.w = r.width / 4;
player.x = (r.width / 2) - (player.w / 2);
}
};
#endif