Javascript Simon说游戏拼贴号帮助 [英] Javascript Simon Says Game Tile Number Help

查看:84
本文介绍了Javascript Simon说游戏拼贴号帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好



我正在开发一款基于以下精彩代码的风格游戏:http://codeplanet.io/building-simon-says-javascript/ [ ]



虽然这段代码帮助我开始了我的工作想要稍微操纵它,以便在点击开始按钮后随机选择五个方格,并逐一动画它们的不透明度以表示用户的序列。此时,用户将在屏幕上被提示尝试复制刚才显示的模式。



我对JavaScript很了解,但我有一种感觉它与此代码有关:



Hello

I'm developing a little simon says style game based on the brilliant code provided from: http://codeplanet.io/building-simon-says-javascript/[]

Although this code has helped me to get me started I'm wanting manipulate it slightly so that after the start button is clicked five squares are chosen at random, and one by one animate their opacity slightly to denote a sequence to the user. At this point the user would then be prompted on-screen to attempt to copy the pattern just shown.

I'm pretty knew to JavaScript but I have a feeling that it has something to do with this code:

randomNumber: function() {
        // between 1 and 9
        return Math.floor((Math.random()*9)+1);
    }
};





我不太确定如何编辑它来解决问题。您可以在以下网址查看我的工作模式: http://www.edwardmanson.com/test-game/



任何帮助都会大量增加,因为我希望在星期六将其传递给客户。



谢谢



Edward



I'm just not too sure how to edit it to solve the issue. You can see my working model at : http://www.edwardmanson.com/test-game/

Any help would be massively appreicated as I would like to pass it on to the client on Saturday.

Thanks

Edward

推荐答案

这篇关于Javascript Simon说游戏拼贴号帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆