开发者

Javascript game: moving bar

I'm programing a penalty kick off game (javascrit + CSS3) and I need your help to figure开发者_运维技巧 out how to build the "pick up your shooting power" screen.

Like in those golf games I want it to have a bar that moves from left to right ascending and then descending non stop. The player has to click on the bar and the bar stops selecting the power with which the penalty will be shooted.

How can I do that?


Here is pseudocode for you:

on mousedown at bar
 start charging power
on mouseup at bar
 kick
if charge is > 100%
 kick
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜