diff options
| author | raysan5 <raysan5@gmail.com> | 2016-08-06 19:29:58 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-08-06 19:29:58 +0200 |
| commit | 865b216ebef8e62a19f3a264001ddf17601f95c5 (patch) | |
| tree | f31468099c8d85cf8767161c3e9c4b16391276d1 /examples/audio_module_playing.lua | |
| parent | 7f9513fbf41e9d340307fc0f9aeed8e5f4293a96 (diff) | |
| download | raylib-865b216ebef8e62a19f3a264001ddf17601f95c5.tar.gz raylib-865b216ebef8e62a19f3a264001ddf17601f95c5.zip | |
Updated Lua examples
Most of the examples already working! Only some of them still fail,
mostly related to data arrays...
Diffstat (limited to 'examples/audio_module_playing.lua')
| -rw-r--r-- | examples/audio_module_playing.lua | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/examples/audio_module_playing.lua b/examples/audio_module_playing.lua index 38cf9afe..3c5ad641 100644 --- a/examples/audio_module_playing.lua +++ b/examples/audio_module_playing.lua @@ -11,16 +11,6 @@ MAX_CIRCLES = 64 ---[[ -typedef struct { -- TODO: Find a Lua alternative: TABLES? - Vector2 position - float radius - float alpha - float speed - Color color -} CircleWave ---]] - -- Initialization ------------------------------------------------------------------------------------------- local screenWidth = 800 @@ -78,7 +68,7 @@ while not WindowShouldClose() do -- Detect window close button or ESC key circles[i].radius = GetRandomValue(10, 40) circles[i].position.x = GetRandomValue(circles[i].radius, screenWidth - circles[i].radius) circles[i].position.y = GetRandomValue(circles[i].radius, screenHeight - circles[i].radius) - circles[i].color = colors[GetRandomValue(0, 13)] + circles[i].color = colors[GetRandomValue(1, 14)] circles[i].speed = GetRandomValue(1, 100)/20000.0 end end @@ -112,7 +102,7 @@ while not WindowShouldClose() do -- Detect window close button or ESC key -- Draw time bar DrawRectangle(20, screenHeight - 20 - 12, screenWidth - 40, 12, LIGHTGRAY) - DrawRectangle(20, screenHeight - 20 - 12, timePlayed, 12, MAROON) + DrawRectangle(20, screenHeight - 20 - 12, timePlayed//1, 12, MAROON) DrawRectangleLines(20, screenHeight - 20 - 12, screenWidth - 40, 12, WHITE) EndDrawing() |
