J2ME

xiaoxiao2021-03-06  37

In J2ME, the background is a interesting stuff. I didn't have an application development. I found that this background development is a bit of application development. Several small pictures are synthesized. When the game is used, it will be separated and repeated. Its main common functions are: Constructor: Tiledlayer (int column, int in, image img, int width, int Height); // Don't clear why do he put the column number in front? It is possible to set the cell content setcell (int column, int ution) when developing; it is basically possible: 1. Prepare the background source material: The following is a small picture of Netease POPO, 2. After building Project and MIDlet and Displayable, you can write code GRAPHICS G = this.getgraphics (); image img = null; try {img = image.createImage ("/ popo.png");} catCH (Exception E) { } Tiledlayer TL = New TileDlayer (12, 5, IMG, 16, 16); // The reason why the simulator is 180/16 ~ 12 is just overwritten, int [] map = {1, 1, INT [] map = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4};

For (int i = 0; i

转载请注明原文地址:https://www.9cbs.com/read-61707.html

New Post(0)