Code for the first mbed for the drum hero project
Dependencies: 4DGL SDFileSystem mbed
Fork of drums2 by
note.h
00001 #ifndef NOTE_H__ 00002 #define NOTE_H__ 00003 00004 #define MIN_Y 130 00005 #define MAX_Y 430 00006 00007 class Note { 00008 public: 00009 00010 // Type of the note (1,2,3) - (left, center, right) 00011 int type; 00012 00013 // Position accros the fret 00014 float x,y; 00015 00016 // Sizes of the displayed note 00017 float w,h; 00018 00019 // Speed of the the note 00020 int speed; 00021 00022 // Color of the note 00023 int color; 00024 00025 // Flag showing if the note is already consumed 00026 int consumed; 00027 00028 // Constructor of the note, no args 00029 Note(); 00030 00031 // Constructor of the note, initiate with type 00032 Note(int t); 00033 00034 // Destructor for the note 00035 ~Note(); 00036 00037 // Update the position of the note based on its speed 00038 void updatePosition(); 00039 00040 // Draw the note with its current stats on the screen 00041 void drawNote(); 00042 00043 }; 00044 #endif
Generated on Wed Jul 13 2022 12:26:10 by 1.7.2