-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoin.h
33 lines (28 loc) · 872 Bytes
/
coin.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include "raylib.h"
class Coin
{
public:
Coin();
Coin(Texture2D* _image);
void Update();
void Draw();
int GetPosition();
bool GetCollision(Rectangle bRect);
int GetAddValue();
protected:
Vector2 pos; // 코인 위치
Texture2D* coinImage; // Texture의 주소값
Rectangle frameRec; // 보여줄 프레임
int currentFrame = 0;
int framesCounter = 0;
int framesSpeed = 16; // Number of spritesheet frames shown by second
int SPRITE_NUMBERS ; // 스프라이트 개수
int speed; // 스피드
int addValue; // 넘겨줄 값
};
class Life : public Coin
{
public :
Life(Texture2D* _image, int _sprite_numbers, int _speed, int _addValue);
};