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

Method Update

examples/multiple/Player.cpp:18–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18void Player::Update() {
19 if (IsKeyDown(KEY_UP)) {
20 position.y -= speed;
21 }
22 if (IsKeyDown(KEY_DOWN)) {
23 position.y += speed;
24 }
25 if (IsKeyDown(KEY_RIGHT)) {
26 position.x += speed;
27 }
28 if (IsKeyDown(KEY_LEFT)) {
29 position.x -= speed;
30 }
31}

Callers 8

UpdateFrameFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 1

IsKeyDownFunction · 0.85

Tested by

no test coverage detected