forked from Oyaki122/musicGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposition.h
34 lines (31 loc) · 877 Bytes
/
position.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
34
#include <vector>
#include "common.h"
#include "draw.h"
namespace Position {
int speed;
std::vector<note> ¬es; // type,time,lane,id
int index;
std::vector<note> drawing;
std::vector<note> specials;
int top_to_judge,
lights_num; //上から判定まで届くのにかかる時間、上から判定までの球の数
void init(int _speed, std::vector<note> &_notes) {
notes = _notes;
speed = _speed;
index = 0;
drawing.clear();
specials.clear();
top_to_judge = speed * lights_num; //計算式あってるか不確か
}
void update(unsigned long nowTick) {
updateDrawingList(nowTick);
Draw::draw(drawing, specials);
}
void deleteNote(const int ID) {}
void updateDrawingList(unsigned long nowTick) {
if(notes[index].time - top_to_judge >= nowTick) {
drawing.push_back(notes[index]);
}
//伊藤
}
} // namespace Position