Import mojo
Class MyGame Extends App
Method OnCreate()
SetUpdateRate(60)
End Method
Method OnUpdate()
End Method
Method OnRender()
SetColor Rnd(255),0,0
SetAlpha(Rnd(1))
Local x:=Rnd(DeviceWidth)
Local y:=Rnd(DeviceHeight)
Local w:=Rnd(10,100)
Local h:=Rnd(10,100)
DrawRect(x,y,w,h)
End Method
End Class
Function Main()
New MyGame()
End function
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.
Thursday, December 15, 2016
Monkey-X - Beginners - SetAlpha and DrawRect - code example
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.