diff options
Diffstat (limited to 'Artist.cpp')
-rw-r--r-- | Artist.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -12,6 +12,7 @@ Artist::Artist(Museum & museum, ArtistData data) : museum(museum) { void Artist::update() { this->update_edge_collision(); this->update_movement(); + this->update_color(); } void Artist::update_edge_collision() { @@ -27,6 +28,11 @@ void Artist::update_edge_collision() { } void Artist::update_movement() { + if (this->data.waiting > 0) { + this->data.waiting--; + return; + } + float last_x = this->data.x; float last_y = this->data.y; @@ -37,3 +43,22 @@ void Artist::update_movement() { if (abs(int(last_y) - int(this->data.y)) > 0) this->step = true; } +void Artist::update_color() { + // waiting color + if (this->data.waiting > 0) { + this->color = { + .red = 0xff, + .green = 0x00, + .blue = 0x00, + }; + return; + } + + // default color + this->color = { + .red = 0x00, + .green = 0x00, + .blue = 0x00, + }; +} + |