![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Javascript
南风11111
这个作者很懒,什么都没留下…
展开
-
Cocos creator对象池的使用
game.jscc.Class({ extends: cc.Component, properties: { // 背景1 bg_1: cc.Node, // 背景2 bg_2: cc.Node, // 游戏开始界面 gameReady: cc.Node, // 游戏进行界面 gamePlaying: cc.Node, // 游戏暂停 gamePause: cc.Node, // 飞机组件 hero:原创 2021-05-09 21:08:12 · 701 阅读 · 0 评论 -
foreach 迭代 遍历数组
<!DOCTYPE html><html><body><h1>My First Web Page</h1><script> // foreach迭代(遍历)数组 var arr = [1,2,3]; var sum = 0; arr.forEach(function(value,index,array) { console.log('数组元素'+value); console.log('原创 2020-10-18 00:36:11 · 218 阅读 · 1 评论 -
06 借用父构造函数 继承属性
<!DOCTYPE html><html><body><h1>My First Web Page</h1><script> //父构造函数function Father(uname,age){ //this 指向父亲构造函数的对象文件 this.uname = uname; this.age = age;}Father.prototype.money=function(){ console.l原创 2020-10-17 22:55:22 · 89 阅读 · 0 评论