aboutsummaryrefslogtreecommitdiff
path: root/examples/audio_module_playing.lua
diff options
context:
space:
mode:
authorghassanpl <kronikarz@gmail.com>2016-08-06 20:46:15 +0200
committerghassanpl <kronikarz@gmail.com>2016-08-06 20:46:15 +0200
commit1950085893f16d653f16ec0a0c991678e8c3cf53 (patch)
treee6f4ec40f983f50e427e19a49e7519fa1a51448c /examples/audio_module_playing.lua
parent82a0fae678a0f4b761bd5369222c956ffe173d31 (diff)
parent306945fe147ea7742880635e77a5c2656f6e1fdc (diff)
downloadraylib-1950085893f16d653f16ec0a0c991678e8c3cf53.tar.gz
raylib-1950085893f16d653f16ec0a0c991678e8c3cf53.zip
Merge branch 'develop' of https://github.com/raysan5/raylib into develop
Diffstat (limited to 'examples/audio_module_playing.lua')
-rw-r--r--examples/audio_module_playing.lua14
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()