Artificial intelligence/templates/examples/rts/rpg/strategy ect. in MonkeyX/CerberusX language. You can download the free version of MonkeyX from itch.io or Cerberus-x.com The Flash applets will stop working in around 2020.
Here code that shows how to use the Count command.
Code below :
Import mojo Global mylist:List<Int> = New List<Int> Class MyGame Extends App Method OnCreate() SetUpdateRate(60) mylist.AddLast(10) mylist.AddLast(20) End Method Method OnUpdate() If Rnd(100)<2 Then mylist.AddLast(Rnd(0,100)) End Method Method OnRender() Cls 0,0,0 SetColor 255,255,255 DrawText "List Count example.",0,0 DrawText "Number of items in list : " + mylist.Count,0,15 End Method End Class Function Main() New MyGame() End Function
Note: Only a member of this blog may post a comment.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.