摘要: View Code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; ch 阅读全文
posted @ 2012-06-05 16:57 时生 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 创建父类//公用 定义一个游戏物体戏对象 function GameObject() { this.x = 0;//x 坐标 this.y = 0;//y 坐标 this.image = null; //图片 } 创建一个子类//定义公用蘑菇Mushroom 继承游戏对象GameObject function Mushroom() {}; Mushroom.prototype = new GameObject();//游戏对象GameObject //蘑菇实例 var... 阅读全文
posted @ 2012-06-05 12:24 时生 阅读(517) 评论(0) 推荐(0) 编辑