18 lines
346 B
C++
18 lines
346 B
C++
#include "entities/rainbow.h"
|
|
|
|
#include <iostream>
|
|
|
|
namespace entity {
|
|
|
|
void Rainbow::update(double dt) {
|
|
m_time += dt;
|
|
|
|
if(m_time - m_prev_time > 0.1) {
|
|
std::cout << "Entity tick 1 second" << std::endl;
|
|
m_prev_time = m_time;
|
|
m_color = Color::from_hsv(rand() % 255, 255, 255);
|
|
}
|
|
}
|
|
|
|
} // End namespace entity
|
|
|