MCPcopy Create free account
hub / github.com/RobLoach/raylib-cpp / Bunny

Method Bunny

examples/textures/textures_bunnymark.cpp:22–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20class 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;

Callers

nothing calls this directly

Calls 1

ColorFunction · 0.50

Tested by

no test coverage detected