在游戏中每次跳跃后添加1

时间:2014-05-30 10:42:35

标签: javascript easeljs

我有一个游戏,我正在尝试实现每次跳转到平台后加分的分数。现在它只在第一个平台后添加一个,我无法弄清楚如何进行计数。任何帮助赞赏。我正在使用画架。

现在的功能代码:

update : function(){
    /* UPDATE LOGIC */
    this.velocity.x += this.acceleration;
    this.x += this.velocity.x;      

    if(this.x < this.outside){
        this.isOutsideLeft = true;
                   for (var counter =1; counter === 1; counter++){
                    document.getElementById('count').innerHTML = counter;

                    console.log('count');
    }
                }


},

0 个答案:

没有答案