Control the genie with the mouse and control the genie with the mouse
Control the genie with the mouse
We registered a user in the http://www.wooyoogame.com and then at http://www.feekood.com/you can access the development environment, personal recommendations use a Google browser.
To put it bluntly, how can we control the basic operations of an Genie With the mouse today.
The following is the script code I wrote. The comments are detailed. You can copy my script, click "new", and paste it in, click "execute" to see the effect,
I will answer this question if I don't know how to reply to the post.
// Title: control the genie with the mouse // Author: xiao'er Sprite ={// create an object Type: "Sprite"; // create it as Genie X: 10%; // set the X position Y: 10%; // set the Y position Height: 15%; // set the Height Width: 15%; // set the broadband CenterX: 50%; // set center X position CenterY: 50%; // set center Y position Rotation: 0; // set Rotation Degree Shader: // set special effect {Type: "color "; // Color effect Color: {, 1}; // Color attribute };}; create (Sprite); // create the Sprite object mouseInfo = {IsMouseDown: false; // press the left mouse button to press [built-in events] IsMouseUp: false; // the left mouse button pops up [built-in events] IsMouseMove: false; // move the mouse to [built-in events] IsWheelUp: false; // scroll up with the mouse wheel [built-in events] IsWheelDown: false; // scroll down with the mouse wheel [built-in events] MouseX: 0; // The x coordinate of the mouse screen [built-in attribute] MouseY: 0; // The y coordinate of the mouse screen [built-in attribute] IsMouseMove: => // trigger {Sprite. X = owner. mouseX; // change the Sprite position. Y = owner. mouseY ;}; IsMouseDown :=> // trigger {Sprite. shader. color = {rand (), rand (), rand ()}; // set a random color}; IsWheelDown: => // trigger {Sprite. rotation + = 10; // change the Rotation Degree of the genie}; IsWheelUp: => // trigger when the scroll wheel is scroll up {Sprite. rotation-= 10; // change the Rotation Degree of the genie}; MouseReceive (mouseInfo); // create a mouseInfo variable and accept it as a mouse event