Section 2 of [v2.x Oge-Example] entity Parameters

Source: Internet
Author: User

Section 2 of [v2.x Oge-Example] entity Parameters

 

1. Location: drawing_example --> spriteparameters2. Class Name: spriteparameters

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/5E/wKioL1RQVrnw6RHfAAERTZKYz0g680.jpg "Title =" section II image 1.png "alt =" wkiol1rqvrnw6rhfaaertzkyz0g680.jpg "/>

 

(1) Rotation genie:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/5E/wKioL1RQVsuTuLHFAABnA9mWQOo743.jpg "Title =" section 2 image 2.png "style =" float: none; "alt =" wkiol1rqvsutulhfaabna9mwqoo743.jpg "/>

Sprite. setrotation (float protation) sets the Rotation Angle

Sprite. setrotationcenter (float protationcenterx, float protationcentery) // you can specify the center of the rotation, which is centered on a certain point)

Sprite. setrotationcenterx (float protationcenterx) sets the point of the X axis rotation

Sprite. setrotationcenterx (float protationcenterx) sets the point of the X axis rotation

 

 

(2) zoom in genie:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/5E/wKiom1RQVnSh1EcEAACsxBgmR7s317.jpg "Title =" section II image 3.png "style =" float: none; "alt =" wkiom1rqvnsh1eceaacsxbgmr7s317.jpg "/>

Sprite. setscale (pscale); // you can specify a scaling factor.

Sprite. setscale (pscalex, pscaley); // set the zooming factor of X and Y

Sprite. setscalecenter (pscalecenterx, pscalecentery); // you can specify the zoom center.

Sprite. setscalecenterx (pscalecenterx); // you can specify pscalecenterx as the center scale.

Sprite. setscalecentery (pscalecentery); // set the y-axis pscalecentery point to center zoom

Sprite. setscalex (pscalex); // sets X scaling.

Sprite. setscaley (pscaley); // sets y scaling.

 

(3) set the width:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/5E/wKioL1RQVsuw4of7AABbI_Rj3UE200.jpg "Title =" section II image 4.png "style =" float: none; "alt =" wkiol1rqvsuw4of7aabbi_%3ue200.jpg "/>

Sprite. setwidth (float pwidth) to set the width

 

(4) set the height:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/5E/wKiom1RQVnSwI_PmAAB-ZcLjELg719.jpg "Title =" section II image 5.png "style =" float: none; "alt =" wKiom1RQVnSwI_PmAAB-ZcLjELg719.jpg "/>

Sprite. setheight (pheight); set height

(5) set transparency:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/5E/wKioL1RQVsyyYR4OAABVB6rmob4123.jpg "Title =" section II image 6.png "style =" float: none; "alt =" wkiol1rqvsyyyr4oaabvb6rmob4123.jpg "/>

Sprite. setalpha (palpha); // sets the transparency range from 0 ~ 1

 

(6) invisible settings:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/5E/wKiom1RQVnWwhquoAABR-3KG5Io389.jpg "Title =" section II image 7.png "style =" float: none; "alt =" wKiom1RQVnWwhquoAABR-3KG5Io389.jpg "/>

Sprite. setvisible (pvisible); // you can specify whether the image is visible.

 

(7) settings cannot be touched:

Sprite. setignoretouch (pignoretouch); // you can set whether to touch true. Do not respond to touch; false.

 

(8) The settings are not updated:

Sprite. setignoreupdate (pignoreupdate); // set whether to update true. Update Is Not performed. Update is performed if false.

 

(9) set skew:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/5E/wKiom1RQVnXSuqEkAABW44Fnr7Y564.jpg "Title =" section 2 image 8.png "style =" float: none; "alt =" wkiom1rqvnxsuqekaabw44fnr7y564.jpg "/>

Sprite. setskew (pskew); // sets the slope.

Sprite. setskewy (pskewx); // you can specify the y skew.

Sprite. setskewx (pskewx); // sets the X skew.

Sprite. setskew (pskewx, pskewy); // you can specify the skew of X and Y.

Sprite. setskewcenterx (pskewcenterx); // you can specify pskewcenterx as the center.

Sprite. setskewcentery (pskewcenterx); // you can specify pskewcentery as the center.

Sprite. setskewcenter (sprite. getwidth ()/2, Sprite. getheight ()/2); // set to tilt the center point

(10) set vertical flip:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/5E/wKioL1RQVsyjJApRAABTD7lZMR0741.jpg "Title =" section 2 image 9.png "style =" float: none; "alt =" wkiol1rqvsyjjapraabtd7lzmr0741.jpg "/>

Sprite. setflippedhorizontal (pflippedhorizontal); // whether to flip horizontally. True indicates flip.

(11) set horizontal flip:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/5E/wKiom1RQVnbArF8VAABhtaKXQxg437.jpg "Title =" section II image 10.png "style =" float: none; "alt =" wkiom1rqvnbarf8vaabhtakxqxg437.jpg "/>

Sprite. setflippedvertical (pflippedvertical); // determines whether to flip vertically. True indicates whether to flip.

 

 

Oge_example project source code

 

 


Section 2 of [v2.x Oge-Example] entity Parameters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.