- 博客(107)
- 资源 (5)
- 收藏
- 关注
原创 Brainiac Designer
http://blog.youkuaiyun.com/l_jinxiong/article/details/45767383 http://blog.youkuaiyun.com/l_jinxiong/article/details/45767731 http://www.ithao123.cn/content-8157442.html
2015-12-30 20:17:55
663
原创 书-Programming Game AI by Example
http://edu.gamfe.com/tutor/d/10141.html http://download.youkuaiyun.com/detail/yinfei1224/1212908
2015-12-30 20:15:17
1067
原创 js模拟php的shuffle函数,用来打乱一维数组
Array.prototype.shuffle = function() { var len = this.length; var i = len; while (i--) { var p = parseInt(Math.random() * len); var t = this[i]; this[i] = this[p]; this[p] = t; }
2015-12-30 20:08:54
465
原创 getEntitiesByType( EntityPlayer )[0];
update: function() { // Update all entities and BackgroundMaps this.parent(); // screen follows the player var player = this.getEntitiesByType( EntityPlayer )[0]; if( player ) {
2015-12-30 20:01:01
389
原创 随机选择出口
var exit_spawns = this.getEntitiesByType(EntityExitSpawn).shuffle(); for (var j = 0; j if (j === 0) this.exit = this.spawnEntity(EntityExit, exit_spawns[j].pos.x, exit_spawns[j].pos.y);
2015-12-30 19:58:23
365
原创 get by name
this.spawnEntity(EntityButton, 20, 170, { img: "credits.png", name: "creditsButton", size: { x: 77, y: 32 } }); var continueButton = this
2015-12-30 19:53:08
438
原创 .sortEntities()is called this array is sorted by the entities.zIndex.
.sortEntities() is called this array is sorted by the entities .zIndex.
2015-12-30 19:45:15
418
原创 挤死collideWith: function(other, axis) { if (other.touches(this)) { other.kill(); } }
collideWith: function(other, axis) { if (other.touches(this)) { other.kill(); } }
2015-12-30 19:25:50
248
原创 line
http://www.open-open.com/lib/view/open1402479198587.html使用Node.js+Socket.IO搭建WebSocket实时应用 到blog nodejs https://cnodejs.org
2015-12-30 19:17:54
271
原创 错误
如果'replace' of null就是因为有东西entities或者level复制了副本,但是没有使用 index注意 button之类没有资源引入 容易出不来 地形没有指定图片 有声音文件引入和play全部删除 浏览器缓存清除了为毛也没报错换浏览器 少写个.png
2015-12-30 19:06:20
215
原创 .alpha debris
this.currentAnim.alpha = this.timer.delta().map( -4, 0, 1, 0);
2015-12-30 18:58:25
237
原创 if (this.getEntitiesByType('EntityPlayer').length < 1)
if (this.getEntitiesByType('EntityPlayer').length
2015-12-30 18:50:31
255
原创 屏幕晃动
this.screen.y +=this.fuhao ; this.screen.x +=this.fuhao ; if(this.shaketimer.delta()>0) { this.fuhao=0-this.fuhao; this.shaketimer.reset() }
2015-12-30 18:47:53
334
原创 handleMovementTrace
handleMovementTrace: function(res) { this.parent(res); if (res.collision.x || res.collision.y) { this.timer = this.timer || new ig.Timer(3); } }
2015-12-30 18:45:16
213
原创 currentAnim.frame === 3) this.kill();
if (this.currentAnim.frame === 3) this.kill();
2015-12-30 18:41:34
245
原创 var player = ig.game.getEntitiesByType( EntityPlayer )[0];
var player = ig.game.getEntitiesByType( EntityPlayer )[0];
2015-12-30 18:38:56
241
原创 scrollScreen
// scrollScreen: function() { // if (this.player.pos.x > (ig.game.collisionMap.width * ig.game.collisionMap.tilesize - ig.system.width / 2)) { // this.screen.x = ig.game.collisionMap
2015-12-30 18:36:18
428
原创 if( !ig.global.wm )只产生一次就够了
/* Add Health Bar */ if( !ig.global.wm ) { ig.game.spawnEntity(EntityHealthBar,this.pos.x , this.pos.y,{ Unit: this }); }
2015-12-30 18:28:23
226
常用反三角函数公式
2012-11-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人