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.
The code below shows you how to draw a rectangle below the mouse. MouseX and MouseY is used for this.
Code below :
Import mojo Class MyGame Extends App Method OnCreate() SetUpdateRate(60) End Method OnUpdate() End Method OnRender() Cls(0,0,0) SetColor(255,255,255) DrawRect(MouseX(),MouseY(),16,16) DrawText("Move the mouse across the window.",10,10) End End Function Main() New MyGame() End
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.