drum

Dependencies:   4DGL SDFileSystem mbed-rtos mbed

Fork of drums by Can Kabuloglu

Committer:
ykuris3
Date:
Mon May 01 00:31:47 2017 +0000
Revision:
4:d135d66c55e2
Parent:
3:54d4226a7d5e
drum;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ckabuloglu 3:54d4226a7d5e 1 #ifndef NOTE_H__
ckabuloglu 3:54d4226a7d5e 2 #define NOTE_H__
ckabuloglu 3:54d4226a7d5e 3
ckabuloglu 3:54d4226a7d5e 4 #define MIN_Y 130
ckabuloglu 3:54d4226a7d5e 5 #define MAX_Y 430
ckabuloglu 3:54d4226a7d5e 6
ckabuloglu 3:54d4226a7d5e 7 class Note {
ckabuloglu 3:54d4226a7d5e 8 public:
ckabuloglu 3:54d4226a7d5e 9
ckabuloglu 3:54d4226a7d5e 10 // Type of the note (1,2,3) - (left, center, right)
ckabuloglu 3:54d4226a7d5e 11 int type;
ckabuloglu 3:54d4226a7d5e 12
ckabuloglu 3:54d4226a7d5e 13 // Position accros the fret
ckabuloglu 3:54d4226a7d5e 14 float x,y;
ckabuloglu 3:54d4226a7d5e 15
ckabuloglu 3:54d4226a7d5e 16 // Sizes of the displayed note
ckabuloglu 3:54d4226a7d5e 17 float w,h;
ckabuloglu 3:54d4226a7d5e 18
ckabuloglu 3:54d4226a7d5e 19 // Speed of the the note
ckabuloglu 3:54d4226a7d5e 20 int speed;
ckabuloglu 3:54d4226a7d5e 21
ckabuloglu 3:54d4226a7d5e 22 // Color of the note
ckabuloglu 3:54d4226a7d5e 23 int color;
ckabuloglu 3:54d4226a7d5e 24
ckabuloglu 3:54d4226a7d5e 25 // Flag showing if the note is already consumed
ckabuloglu 3:54d4226a7d5e 26 int consumed;
ckabuloglu 3:54d4226a7d5e 27
ckabuloglu 3:54d4226a7d5e 28 // Constructor of the note, no args
ckabuloglu 3:54d4226a7d5e 29 Note();
ckabuloglu 3:54d4226a7d5e 30
ckabuloglu 3:54d4226a7d5e 31 // Constructor of the note, initiate with type
ckabuloglu 3:54d4226a7d5e 32 Note(int t);
ckabuloglu 3:54d4226a7d5e 33
ckabuloglu 3:54d4226a7d5e 34 // Destructor for the note
ckabuloglu 3:54d4226a7d5e 35 ~Note();
ckabuloglu 3:54d4226a7d5e 36
ckabuloglu 3:54d4226a7d5e 37 // Update the position of the note based on its speed
ckabuloglu 3:54d4226a7d5e 38 void updatePosition();
ckabuloglu 3:54d4226a7d5e 39
ckabuloglu 3:54d4226a7d5e 40 // Draw the note with its current stats on the screen
ckabuloglu 3:54d4226a7d5e 41 void drawNote();
ckabuloglu 3:54d4226a7d5e 42
ckabuloglu 3:54d4226a7d5e 43 };
ckabuloglu 3:54d4226a7d5e 44 #endif