| 20 | class Bunny { |
| 21 | public: |
| 22 | Bunny() { |
| 23 | position = GetMousePosition(); |
| 24 | speed.x = static_cast<float>(GetRandomValue(-250, 250)) / 60.0f; |
| 25 | speed.y = static_cast<float>(GetRandomValue(-250, 250)) / 60.0f; |
| 26 | color = raylib::Color( |
| 27 | GetRandomValue(50, 240), |
| 28 | GetRandomValue(80, 240), |
| 29 | GetRandomValue(100, 240)); |
| 30 | } |
| 31 | |
| 32 | void Update(const raylib::Texture2D& texBunny) { |
| 33 | position.x += speed.x; |