Update samples/UsingRayLib/more/ex8_Aiming_at_3D_moving_targets.ring - Better Format
- #=====================#
+#================================#
# Aiming at 3d moving targets
-#=====================#
+#================================#
#--------- 08-02-2021
# Author : Azzeddine Remmal
-#=====================#
-load "raylib.ring"
-
+#================================#
+load "raylib.ring"
screenWidth = 640
screenHeight = 360
@@ -31,9 +30,6 @@ Func calcInc start,ond,velocity
Func main
-
-
-
// Initialization
//--------------------------------------------------------------------------------------
InitWindow(screenWidth, screenHeight, "raylib - Aiming at 3d moving targets")
@@ -44,9 +40,6 @@ Func main
0.0, 1.0, 0.0,
45.0, CAMERA_PERSPECTIVE )
-
-
-
frame = 0 // frame counter
ang = 0 // camera rotation
@@ -126,7 +119,6 @@ Func main
shotPos = Vector3Add(shotPos, shotInc)
ok
-
if !shotActive
if shootWait>0
shootWait--
@@ -149,7 +141,6 @@ Func main
p = -b / (2.0 * a)
q = sqrt((b * b) - 4.0 * a * c) / (2.0 * a)
-
t = p - q
// target velocity t + target pos = aim point (t = time or steps till hit)
@@ -184,9 +175,6 @@ Func main
EndMode3D()
-
-
-
DrawFPS(10, 10)
DrawText("Frame %i"+ frame, 8, screenHeight-24, 20, WHITE)
