当前位置: 首页 > news >正文

公司网站设计案例/软文世界平台

公司网站设计案例,软文世界平台,wordpress首行缩进,做网站文字大小分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!Android千好万好,唯独模拟器不是…

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

Android千好万好,唯独模拟器不是太好,在不更换旧有硬件的前提下,使用Android模拟器通常会遭遇效率问题,况且在logcat下面调试,也始终不如开发桌面游戏时那么直观。有没有什么办法,能够解决这一问题呢?

 

其实很容易做到。

 

Android首先是一个精简的Linux平台,其次才是一个手机系统,Java在PC上可以做到的事情,Android不但可以做到,而且能以近乎一致的手段做到。事实上,如果有人故意通过封装抹杀Android与PC上Java应用差异性的话,任何Java游戏,都可以在很少更改代码(或者完全不更改代码)的情况下移植到Android之上。

 

比如,笔者下面提供的这个拼图游戏示例,就可以在几乎不改变程序结构(部分相关类需要替换,不过可以利用正则自动完成)的前提下,运行在Android上。

 

PC版源码(框架为LGame-Simple-0.2.0):

 

[java] view plaincopyprint?
  1. package org.loon.game.simple.test;  
  2. import java.awt.Graphics;  
  3. import java.awt.Graphics2D;  
  4. import java.awt.Image;  
  5. import java.awt.event.KeyEvent;  
  6. import java.awt.event.MouseEvent;  
  7. import org.loon.framework.game.simple.GameScene;  
  8. import org.loon.framework.game.simple.core.Deploy;  
  9. import org.loon.framework.game.simple.core.Screen;  
  10. import org.loon.framework.game.simple.utils.GraphicsUtils;  
  11. /** 
  12.  *  
  13.  * Copyright 2008  
  14.  * 
  15.  * Licensed under the Apache License, Version 2.0 (the "License"); 
  16.  * you may not use this file except in compliance with the License. 
  17.  * You may obtain a copy of the License at 
  18.  * 
  19.  * http://www.apache.org/licenses/LICENSE-2.0 
  20.  * 
  21.  * Unless required by applicable law or agreed to in writing, software 
  22.  * distributed under the License is distributed on an "AS IS" BASIS, 
  23.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
  24.  * either express or implied. See the License for the specific language 
  25.  * governing permissions and limitations under the License. 
  26.  * 
  27.  * @project loonframework 
  28.  * @author chenpeng   
  29.  * @email:ceponline@yahoo.com.cn  
  30.  * @version 0.1 
  31.  */  
  32. public class ScreenTest1 extends Screen {  
  33.     private Image imageBack, tmp_imageBack, imageForward;  
  34.     private Graphics tmp_graphics;  
  35.     private int blocks[];  
  36.     private boolean isEvent;  
  37.     private int count, rs, cs, row, col, width, height;  
  38.     public ScreenTest1(String file1, String file2, int row, int col) {  
  39.         this.col = col;  
  40.         this.row = row;  
  41.         this.imageBack = GraphicsUtils.loadImage(file1);  
  42.         this.width = imageBack.getWidth(null);  
  43.         this.height = imageBack.getHeight(null);  
  44.         this.rs = width / row;  
  45.         this.cs = height / col;  
  46.         this.tmp_imageBack = GraphicsUtils  
  47.                 .createImage(width, height + cs, true);  
  48.         this.tmp_graphics = tmp_imageBack.getGraphics();  
  49.         this.count = col * row;  
  50.         this.blocks = new int[count];  
  51.         this.imageForward = GraphicsUtils.loadImage(file2);  
  52.         for (int i = 0; i < count; i++) {  
  53.             blocks[i] = i;  
  54.         }  
  55.         rndBlocks();  
  56.     }  
  57.     /** 
  58.      * 复制拼图中图片块 
  59.      *  
  60.      * @param x1 
  61.      * @param y1 
  62.      * @param x2 
  63.      * @param y2 
  64.      */  
  65.     private void copy(int x1, int y1, int x2, int y2) {  
  66.         tmp_graphics.copyArea(x1 * rs, y1 * cs, rs, cs, (x2 - x1) * rs,  
  67.                 (y2 - y1) * cs);  
  68.     }  
  69.     /** 
  70.      * 随机生成拼图内容 
  71.      *  
  72.      */  
  73.     private void rndBlocks() {  
  74.         tmp_graphics.drawImage(imageBack, 00null);  
  75.         for (int i = 0; i < (count * row); i++) {  
  76.             int x1 = (int) ((double) row * Math.random());  
  77.             int y1 = (int) ((double) col * Math.random());  
  78.             int x2 = (int) ((double) row * Math.random());  
  79.             int y2 = (int) ((double) col * Math.random());  
  80.             copy(x1, y1, 0, col);  
  81.             copy(x2, y2, x1, y1);  
  82.             copy(0, col, x2, y2);  
  83.             int j1 = blocks[y1 * row + x1];  
  84.             blocks[y1 * row + x1] = blocks[y2 * row + x2];  
  85.             blocks[y2 * row + x2] = j1;  
  86.         }  
  87.     }  
  88.     /** 
  89.      * 点击鼠标 
  90.      */  
  91.     public void leftClick(MouseEvent e) {  
  92.         if (isEvent) {  
  93.             return;  
  94.         }  
  95.         int x = e.getX() / rs;  
  96.         int y = e.getY() / cs;  
  97.         copy(000, col);  
  98.         copy(x, y, 00);  
  99.         copy(0, col, x, y);  
  100.         int no = blocks[0];  
  101.         blocks[0] = blocks[y * row + x];  
  102.         blocks[y * row + x] = no;  
  103.         int index;  
  104.         for (index = 0; index < count; index++) {  
  105.             if (blocks[index] != index) {  
  106.                 break;  
  107.             }  
  108.         }  
  109.         if (index == count) {  
  110.             isEvent = true;  
  111.         }  
  112.         return;  
  113.     }  
  114.     public void draw(Graphics2D g) {  
  115.         if (!isEvent) {  
  116.             g.drawImage(tmp_imageBack, 00null);  
  117.             for (int i = 0; i < row; i++) {  
  118.                 for (int j = 0; j < col; j++)  
  119.                     g.drawRect(i * rs, j * cs, rs, cs);  
  120.             }  
  121.         }  
  122.         if (isEvent && imageForward != null) {  
  123.             g.drawImage(imageBack, 00null);  
  124.             g.drawImage(imageForward, 00null);  
  125.             tmp_graphics.dispose();  
  126.         }  
  127.     }  
  128.     public boolean isEvent() {  
  129.         return isEvent;  
  130.     }  
  131.     public void setEvent(boolean isEvent) {  
  132.         this.isEvent = isEvent;  
  133.     }  
  134.     public void middleClick(MouseEvent e) {  
  135.     }  
  136.     public void onKey(KeyEvent e) {  
  137.     }  
  138.     public void onKeyUp(KeyEvent e) {  
  139.     }  
  140.     public void rightClick(MouseEvent e) {  
  141.     }  
  142.     public static void main(String[] args) {  
  143.         GameScene frame = new GameScene("拼图"320480);  
  144.         Deploy deploy = frame.getDeploy();  
  145.         deploy.setScreen(new ScreenTest1("images/backimage1.jpg",  
  146.                 "images/over.png"44));  
  147.         deploy.setShowFPS(true);  
  148.         deploy.setLogo(false);  
  149.         deploy.setFPS(100);  
  150.         deploy.mainLoop();  
  151.         frame.showFrame();  
  152.     }  
  153. }  
package org.loon.game.simple.test;import java.awt.Graphics;import java.awt.Graphics2D;import java.awt.Image;import java.awt.event.KeyEvent;import java.awt.event.MouseEvent;import org.loon.framework.game.simple.GameScene;import org.loon.framework.game.simple.core.Deploy;import org.loon.framework.game.simple.core.Screen;import org.loon.framework.game.simple.utils.GraphicsUtils;/** *  * Copyright 2008  * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. * * @project loonframework * @author chenpeng   * @email:ceponline@yahoo.com.cn  * @version 0.1 */public class ScreenTest1 extends Screen { private Image imageBack, tmp_imageBack, imageForward; private Graphics tmp_graphics; private int blocks[]; private boolean isEvent; private int count, rs, cs, row, col, width, height; public ScreenTest1(String file1, String file2, int row, int col) {  this.col = col;  this.row = row;  this.imageBack = GraphicsUtils.loadImage(file1);  this.width = imageBack.getWidth(null);  this.height = imageBack.getHeight(null);  this.rs = width / row;  this.cs = height / col;  this.tmp_imageBack = GraphicsUtils    .createImage(width, height + cs, true);  this.tmp_graphics = tmp_imageBack.getGraphics();  this.count = col * row;  this.blocks = new int[count];  this.imageForward = GraphicsUtils.loadImage(file2);  for (int i = 0; i < count; i++) {   blocks[i] = i;  }  rndBlocks(); } /**  * 复制拼图中图片块  *   * @param x1  * @param y1  * @param x2  * @param y2  */ private void copy(int x1, int y1, int x2, int y2) {  tmp_graphics.copyArea(x1 * rs, y1 * cs, rs, cs, (x2 - x1) * rs,    (y2 - y1) * cs); } /**  * 随机生成拼图内容  *   */ private void rndBlocks() {  tmp_graphics.drawImage(imageBack, 0, 0, null);  for (int i = 0; i < (count * row); i++) {   int x1 = (int) ((double) row * Math.random());   int y1 = (int) ((double) col * Math.random());   int x2 = (int) ((double) row * Math.random());   int y2 = (int) ((double) col * Math.random());   copy(x1, y1, 0, col);   copy(x2, y2, x1, y1);   copy(0, col, x2, y2);   int j1 = blocks[y1 * row + x1];   blocks[y1 * row + x1] = blocks[y2 * row + x2];   blocks[y2 * row + x2] = j1;  } } /**  * 点击鼠标  */ public void leftClick(MouseEvent e) {  if (isEvent) {   return;  }  int x = e.getX() / rs;  int y = e.getY() / cs;  copy(0, 0, 0, col);  copy(x, y, 0, 0);  copy(0, col, x, y);  int no = blocks[0];  blocks[0] = blocks[y * row + x];  blocks[y * row + x] = no;  int index;  for (index = 0; index < count; index++) {   if (blocks[index] != index) {    break;   }  }  if (index == count) {   isEvent = true;  }  return; } public void draw(Graphics2D g) {  if (!isEvent) {   g.drawImage(tmp_imageBack, 0, 0, null);   for (int i = 0; i < row; i++) {    for (int j = 0; j < col; j++)     g.drawRect(i * rs, j * cs, rs, cs);   }  }  if (isEvent && imageForward != null) {   g.drawImage(imageBack, 0, 0, null);   g.drawImage(imageForward, 0, 0, null);   tmp_graphics.dispose();  } } public boolean isEvent() {  return isEvent; } public void setEvent(boolean isEvent) {  this.isEvent = isEvent; } public void middleClick(MouseEvent e) { } public void onKey(KeyEvent e) { } public void onKeyUp(KeyEvent e) { } public void rightClick(MouseEvent e) { } public static void main(String[] args) {  GameScene frame = new GameScene("拼图", 320, 480);  Deploy deploy = frame.getDeploy();  deploy.setScreen(new ScreenTest1("images/backimage1.jpg",    "images/over.png", 4, 4));  deploy.setShowFPS(true);  deploy.setLogo(false);  deploy.setFPS(100);  deploy.mainLoop();  frame.showFrame(); }} 

 

 

02

 

 

Android版源码(框架为LAGame-Simple-prototype):

 

示例源码下载地址:http://code.google.com/p/loon-simple/downloads/list

 

[java] view plaincopyprint?
  1. package org.loon.framework.android.game;  
  2. import android.view.KeyEvent;  
  3. import android.view.MotionEvent;  
  4. /** 
  5.  *  
  6.  * Copyright 2008 - 2009 
  7.  *  
  8.  * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
  9.  * use this file except in compliance with the License. You may obtain a copy of 
  10.  * the License at 
  11.  *  
  12.  * http://www.apache.org/licenses/LICENSE-2.0 
  13.  *  
  14.  * Unless required by applicable law or agreed to in writing, software 
  15.  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
  16.  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
  17.  * License for the specific language governing permissions and limitations under 
  18.  * the License. 
  19.  *  
  20.  * @project loonframework 
  21.  * @author chenpeng 
  22.  * @email <a title="" href="http://hi.baidu.com/ceponline" mce_href="http://hi.baidu.com/ceponline" target="_blank">ceponline</a>@yahoo.com.cn 
  23.  * @version 0.1.0 
  24.  */  
  25. public class ScreenTest1 extends LAScreen {  
  26.     private LAImage imageBack, tmp_imageBack, imageForward;  
  27.     private LAGraphics tmp_graphics;  
  28.     private int blocks[];  
  29.     private boolean isEvent;  
  30.     private int count, rs, cs, row, col, width, height;  
  31.     public ScreenTest1(String file1, String file2, int row, int col) {  
  32.         this.col = col;  
  33.         this.row = row;  
  34.         this.imageBack = getLAImage(file1);  
  35.         this.width = imageBack.getWidth();  
  36.         this.height = imageBack.getHeight();  
  37.         this.rs = width / row;  
  38.         this.cs = height / col;  
  39.         this.tmp_imageBack = new LAImage(width, height + cs);  
  40.         this.tmp_graphics = tmp_imageBack.getLAGraphics();  
  41.         this.count = col * row;  
  42.         this.blocks = new int[count];  
  43.         this.imageForward = getLAImage(file2);  
  44.         for (int i = 0; i < count; i++) {  
  45.             blocks[i] = i;  
  46.         }  
  47.         rndBlocks();  
  48.     }  
  49.     /** 
  50.      * 复制拼图中图片块 
  51.      *  
  52.      * @param x1 
  53.      * @param y1 
  54.      * @param x2 
  55.      * @param y2 
  56.      */  
  57.     private void copy(int x1, int y1, int x2, int y2) {  
  58.         tmp_graphics.copyArea(x1 * rs, y1 * cs, rs, cs, (x2 - x1) * rs,  
  59.                 (y2 - y1) * cs);  
  60.     }  
  61.     /** 
  62.      * 随机生成拼图内容 
  63.      *  
  64.      */  
  65.     private void rndBlocks() {  
  66.         tmp_graphics.drawImage(imageBack, 00);  
  67.         for (int i = 0; i < (count * row); i++) {  
  68.             int x1 = (int) ((double) row * Math.random());  
  69.             int y1 = (int) ((double) col * Math.random());  
  70.             int x2 = (int) ((double) row * Math.random());  
  71.             int y2 = (int) ((double) col * Math.random());  
  72.             copy(x1, y1, 0, col);  
  73.             copy(x2, y2, x1, y1);  
  74.             copy(0, col, x2, y2);  
  75.             int j1 = blocks[y1 * row + x1];  
  76.             blocks[y1 * row + x1] = blocks[y2 * row + x2];  
  77.             blocks[y2 * row + x2] = j1;  
  78.         }  
  79.     }  
  80.     /** 
  81.      * 点击触摸屏 
  82.      */  
  83.     public boolean onTouchDown(MotionEvent e) {  
  84.         if (isEvent) {  
  85.             return isEvent;  
  86.         }  
  87.         int x = (int) (e.getX() / rs);  
  88.         int y = (int) (e.getY() / cs);  
  89.         copy(000, col);  
  90.         copy(x, y, 00);  
  91.         copy(0, col, x, y);  
  92.         int no = blocks[0];  
  93.         blocks[0] = blocks[y * row + x];  
  94.         blocks[y * row + x] = no;  
  95.         int index;  
  96.         for (index = 0; index < count; index++) {  
  97.             if (blocks[index] != index) {  
  98.                 break;  
  99.             }  
  100.         }  
  101.         if (index == count) {  
  102.             isEvent = true;  
  103.         }  
  104.         return isEvent;  
  105.     }  
  106.     /** 
  107.      * 绘制拼图 
  108.      */  
  109.     public void draw(LAGraphics g) {  
  110.         if (!isEvent) {  
  111.             g.drawImage(tmp_imageBack, 00);  
  112.             for (int i = 0; i < row; i++) {  
  113.                 for (int j = 0; j < col; j++)  
  114.                     g.drawRect(i * rs, j * cs, rs, cs);  
  115.             }  
  116.         }  
  117.         if (isEvent && imageForward != null) {  
  118.             g.drawImage(imageBack, 00);  
  119.             g.drawImage(imageForward, 00);  
  120.             tmp_graphics.dispose();  
  121.         }  
  122.     }  
  123.     public boolean isEvent() {  
  124.         return isEvent;  
  125.     }  
  126.     public void setEvent(boolean isEvent) {  
  127.         this.isEvent = isEvent;  
  128.     }  
  129.     public boolean onKeyDown(int keyCode, KeyEvent e) {  
  130.         return false;  
  131.     }  
  132.     public boolean onKeyUp(int keyCode, KeyEvent e) {  
  133.         return false;  
  134.     }  
  135.     public boolean onTouchMove(MotionEvent e) {  
  136.         return false;  
  137.     }  
  138.     public boolean onTouchUp(MotionEvent e) {  
  139.         return false;  
  140.     }  
  141. }  
package org.loon.framework.android.game;import android.view.KeyEvent;import android.view.MotionEvent;/** *  * Copyright 2008 - 2009 *  * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at *  * http://www.apache.org/licenses/LICENSE-2.0 *  * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. *  * @project loonframework * @author chenpeng * @email <a title="" href="http://hi.baidu.com/ceponline" mce_href="http://hi.baidu.com/ceponline" target="_blank">ceponline</a>@yahoo.com.cn * @version 0.1.0 */public class ScreenTest1 extends LAScreen { private LAImage imageBack, tmp_imageBack, imageForward; private LAGraphics tmp_graphics; private int blocks[]; private boolean isEvent; private int count, rs, cs, row, col, width, height; public ScreenTest1(String file1, String file2, int row, int col) {  this.col = col;  this.row = row;  this.imageBack = getLAImage(file1);  this.width = imageBack.getWidth();  this.height = imageBack.getHeight();  this.rs = width / row;  this.cs = height / col;  this.tmp_imageBack = new LAImage(width, height + cs);  this.tmp_graphics = tmp_imageBack.getLAGraphics();  this.count = col * row;  this.blocks = new int[count];  this.imageForward = getLAImage(file2);  for (int i = 0; i < count; i++) {   blocks[i] = i;  }  rndBlocks(); } /**  * 复制拼图中图片块  *   * @param x1  * @param y1  * @param x2  * @param y2  */ private void copy(int x1, int y1, int x2, int y2) {  tmp_graphics.copyArea(x1 * rs, y1 * cs, rs, cs, (x2 - x1) * rs,    (y2 - y1) * cs); } /**  * 随机生成拼图内容  *   */ private void rndBlocks() {  tmp_graphics.drawImage(imageBack, 0, 0);  for (int i = 0; i < (count * row); i++) {   int x1 = (int) ((double) row * Math.random());   int y1 = (int) ((double) col * Math.random());   int x2 = (int) ((double) row * Math.random());   int y2 = (int) ((double) col * Math.random());   copy(x1, y1, 0, col);   copy(x2, y2, x1, y1);   copy(0, col, x2, y2);   int j1 = blocks[y1 * row + x1];   blocks[y1 * row + x1] = blocks[y2 * row + x2];   blocks[y2 * row + x2] = j1;  } } /**  * 点击触摸屏  */ public boolean onTouchDown(MotionEvent e) {  if (isEvent) {   return isEvent;  }  int x = (int) (e.getX() / rs);  int y = (int) (e.getY() / cs);  copy(0, 0, 0, col);  copy(x, y, 0, 0);  copy(0, col, x, y);  int no = blocks[0];  blocks[0] = blocks[y * row + x];  blocks[y * row + x] = no;  int index;  for (index = 0; index < count; index++) {   if (blocks[index] != index) {    break;   }  }  if (index == count) {   isEvent = true;  }  return isEvent; } /**  * 绘制拼图  */ public void draw(LAGraphics g) {  if (!isEvent) {   g.drawImage(tmp_imageBack, 0, 0);   for (int i = 0; i < row; i++) {    for (int j = 0; j < col; j++)     g.drawRect(i * rs, j * cs, rs, cs);   }  }  if (isEvent && imageForward != null) {   g.drawImage(imageBack, 0, 0);   g.drawImage(imageForward, 0, 0);   tmp_graphics.dispose();  } } public boolean isEvent() {  return isEvent; } public void setEvent(boolean isEvent) {  this.isEvent = isEvent; } public boolean onKeyDown(int keyCode, KeyEvent e) {  return false; } public boolean onKeyUp(int keyCode, KeyEvent e) {  return false; } public boolean onTouchMove(MotionEvent e) {  return false; } public boolean onTouchUp(MotionEvent e) {  return false; }}

 

[java] view plaincopyprint?
  1. package org.loon.framework.android.game;  
  2. import android.app.Activity;  
  3. import android.os.Bundle;  
  4. /** 
  5.  *  
  6.  * Copyright 2008 - 2009 
  7.  *  
  8.  * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
  9.  * use this file except in compliance with the License. You may obtain a copy of 
  10.  * the License at 
  11.  *  
  12.  * http://www.apache.org/licenses/LICENSE-2.0 
  13.  *  
  14.  * Unless required by applicable law or agreed to in writing, software 
  15.  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
  16.  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
  17.  * License for the specific language governing permissions and limitations under 
  18.  * the License. 
  19.  *  
  20.  * @project loonframework 
  21.  * @author chenpeng 
  22.  * @email <a title="" href="http://hi.baidu.com/ceponline" mce_href="http://hi.baidu.com/ceponline" target="_blank">ceponline</a>@yahoo.com.cn 
  23.  * @version 0.1.0 
  24.  */  
  25. public class Main extends Activity {  
  26.     private LAGameView view;  
  27.     public void onCreate(Bundle icicle) {  
  28.         super.onCreate(icicle);  
  29.         view = new LAGameView(this);  
  30.         view.setScreen(new ScreenTest1("backimage1.jpg",  
  31.                 "over.png"44));  
  32.         view.setShowFPS(true);  
  33.         view.mainLoop();  
  34.     }  
  35.     protected void onPause() {  
  36.         if (view != null) {  
  37.             view.setRunning(false);  
  38.         }  
  39.         super.onPause();  
  40.     }  
  41.     protected void onStop() {  
  42.         if (view != null) {  
  43.             view.setRunning(false);  
  44.         }  
  45.         super.onStop();  
  46.     }  
  47. }  
package org.loon.framework.android.game;import android.app.Activity;import android.os.Bundle;/** *  * Copyright 2008 - 2009 *  * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at *  * http://www.apache.org/licenses/LICENSE-2.0 *  * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. *  * @project loonframework * @author chenpeng * @email <a title="" href="http://hi.baidu.com/ceponline" mce_href="http://hi.baidu.com/ceponline" target="_blank">ceponline</a>@yahoo.com.cn * @version 0.1.0 */public class Main extends Activity { private LAGameView view; public void onCreate(Bundle icicle) {  super.onCreate(icicle);  view = new LAGameView(this);  view.setScreen(new ScreenTest1("backimage1.jpg",    "over.png", 4, 4));  view.setShowFPS(true);  view.mainLoop(); } protected void onPause() {  if (view != null) {   view.setRunning(false);  }  super.onPause(); } protected void onStop() {  if (view != null) {   view.setRunning(false);  }  super.onStop(); }} 

 

00

 

01

 

示例源码下载地址:http://code.google.com/p/loon-simple/downloads/list

 

Android游戏与Java桌面游戏在本质上不存在任何区别,逻辑实现更可以完全一致。通过示例我们看到,把一个以LGame-Simple框架开发的Java桌面游戏移植到Android上居然是如此简单。

 

事实上,未来的Android版LGame-Simple,函数实现将与PC版保持一致,对于差异性代码,笔者也将提供相互转换的辅助工具。

 

如果您正在以LGame-Simple开发Java游戏,那么恭喜您,至多到今年12月底,它也将可以同时运行在Android上了。

 

 

 

 

 

 

           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow

这里写图片描述
http://www.jmfq.cn/news/4802257.html

相关文章:

  • 网站建设 域名 数据库/互联网销售
  • 修复WordPress图片上传错误/seo推广编辑
  • 成都高端网站制作/网站广告调词软件
  • 珠海九洲旅游开发公司/天津关键词优化网站
  • 网站开发用什么语言最好/四川餐饮培训学校排名
  • 广州营销型网站建设哪家好/seo网站整站优化
  • 番禺做网站的/怎么推广网页
  • 12306网站开发多少钱/常德网站建设制作
  • 在猪八戒网站如何做兼职/吉林网站seo
  • 想制作自己的网站/seo优化顾问服务
  • 上海新闻网最新新闻事件/河南seo推广
  • 诸暨网站建设公司/手机seo关键词优化
  • 热卖平台网站怎么做/青岛网站快速排名提升
  • 手机网站制作天强科技/网络广告营销方案策划
  • 建立一个网站的英文/百度竞价网站
  • 中卫网站定制开发设计/网站系统开发
  • 在线做ppt的网站有哪些问题/南宁网站制作
  • 南宁建站系统模板/竞价培训班
  • 东阳实惠营销型网站建设厂家/seo教程视频
  • wordpress怎么选主题/兰州网络seo公司
  • 招远网站建设价格/怎样搭建网站
  • 关键词排名优化易下拉技巧/东莞网络优化调查公司
  • 晋中住房与城乡建设厅网站/seo推广优化培训
  • 给企业做网站的好处/百度一下首页版
  • 知名品牌形象设计公司/优化关键词具体要怎么做
  • 做网站为什么图片上传不了/免费平台
  • 网站建设怎么报价/津seo快速排名
  • 用什么软件做网站设计/天津seo公司
  • 专业的上海网站建设公司排名/企业网站页面设计
  • 网站网站制作怎么样/河南自助建站seo公司