Fixes for some Lua bugs

This commit is contained in:
ghassanpl 2016-08-06 16:58:48 +02:00
parent d5f5f0a930
commit 4960e6b6d7
20 changed files with 413 additions and 103 deletions

View file

@ -22,7 +22,7 @@ local camera = Camera(Vector3(5.0, 4.0, 5.0), Vector3(0.0, 2.0, 0.0), Vector3(0.
local bill = LoadTexture("resources/billboard.png") -- Our texture billboard
local billPosition = Vector3(0.0, 2.0, 0.0) -- Position where draw billboard
SetCameraMode(CAMERA.ORBITAL) -- Set an orbital camera mode
SetCameraMode(CameraMode.ORBITAL) -- Set an orbital camera mode
SetCameraPosition(camera.position) -- Set internal camera position to match our camera position
SetCameraTarget(camera.target) -- Set internal camera target to match our camera target
SetCameraFovy(camera.fovy) -- Set internal camera field-of-view Y
@ -34,7 +34,7 @@ SetTargetFPS(60) -- Set our game to run at 60 frames-per-secon
while not WindowShouldClose() do -- Detect window close button or ESC key
-- Update
---------------------------------------------------------------------------------------
UpdateCamera(&camera) -- Update internal camera and our camera
UpdateCamera(camera) -- Update internal camera and our camera
---------------------------------------------------------------------------------------
-- Draw
@ -45,9 +45,9 @@ while not WindowShouldClose() do -- Detect window close button or ESC
Begin3dMode(camera)
DrawBillboard(camera, bill, billPosition, 2.0f, WHITE)
DrawBillboard(camera, bill, billPosition, 2.0, WHITE)
DrawGrid(10, 1.0f) -- Draw a grid
DrawGrid(10, 1.0) -- Draw a grid
End3dMode()