Texture in andengine development, that is, texture

Source: Internet
Author: User

1. texture is the basis for andengine development. In the rewriting of oncreateresources (){......} to create a new texture map object (buildablebitmaptextureatlas), for example: (this. mbitmaptextureatlas = new buildablebitmaptextureatlas (this. gettexturemanager (), 512,256,
Textureoptions. Nearest );)

2. after creating a texture map object, you can create a texture area object (itextureregion, tiledtextureregion, and so on), for example: this. mfacetextureregion = bitmaptextureatlastextureregionfactory. createtiledfromasset (this. mbitmaptextureatlas, this, "face_box_tiled.png", 2, 1 );

 

This. mfacetextureregion = bitmaptextureatlastextureregionfactory. createfromasset (this. mbitmaptextureatlas, this, "face_box.png", 0, 0 );

3. After the texture area object is created, it can be placed in the texture map, and then loaded into the memory, that is, this. mbitmaptextureatlas. Load ();

4. rewrite scene oncreatescene (){.....} method, final scene = new scene () to create a scene object. In this scenario object, you can reference the texture region object you created, you can also add inaccessible animations.

 

 

 

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.