Anonymous avatar Anonymous committed 16aaf7f

added sample file

Comments (0)

Files changed (1)

tests/examplefiles/example.monkey

+Strict
+
+#rem
+this is a
+#rem
+nested
+#end
+comment
+even other preproc keywords are nested within!
+#If TARGET
+#End
+#end
+
+Import mojo
+
+Const ONECONST:Int = 1
+Const TWOCONST := 2
+Const THREECONST := 3, FOURCONST:Int = 4
+
+Class Game Extends App
+
+    ' radial sprial with axis aligned phase
+
+    Function DrawSpiral(clock)
+        Local w=DeviceWidth/2
+        For Local i#=0 Until w*1.5 Step .2
+            Local x#,y#
+            x=w+i*Sin(i*3+clock)
+            y=w+i*Cos(i*2+clock)
+            DrawRect  x,y,1,1
+        Next
+        hitbox.Collide(event.pos)
+    End
+
+    Field updateCount
+
+    Method OnCreate()
+        Print "spiral"
+
+        SetUpdateRate 60
+    End
+
+    Method OnUpdate()
+        updateCount+=1
+    End
+
+    Method OnRender()
+        Cls
+        DrawSpiral updateCount
+        DrawSpiral updateCount*1.1
+    End
+
+End
+
+Class VectorNode Extends Node<Vector2D>
+End
+
+Function Main()
+    New Game()
+End
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.