欢迎来到程序小院
命悬一线
玩法:
点击鼠标人物摆动跳跃,松开鼠标跳到方格上面,每跳一次都会有对应的分数统计,不要让人物掉下哦^^。
开始游戏
html
<canvas id="jsGameScreen"></canvas>
css
.bandiv{
float:left;
width:100%;
background-color:#DBD1BB;
}
.bandiv div{
padding:10px;
text-align:left;
}
js
var s = {
x: (b.canvas.screen.getWidth() - 126) / 2,
y: 180,
w: 126,
h: 35,
isPressed: !1,
draw: D
},
u = {
x: (b.canvas.screen.getWidth() - 126) / 2,
y: 260,
w: 126,
h: 35,
isPressed: !1,
draw: D
},
p = {
x: (b.canvas.screen.getWidth() - 126) / 2,
y: 620,
w: 126,
h: 35,
isPressed: !1,
draw: D
},
q = {
x: (b.canvas.screen.getWidth() - 126) / 2,
y: 700,
w: 126,
h: 35,
isPressed: !1,
draw: D
},
I = {
x: 5,
y: b.canvas.screen.getHeight() - 50,
w: 49,
h: 22,
isPressed: !1,
draw: D
},
Aa = {
x: 165,
y: 300,
w: 75,
h: 70,
isPressed: !1,
draw: D
},
Ba = {
x: 240,
y: 300,
w: 75,
h: 70,
isPressed: !1,
draw: D
},
m = {
x: (b.canvas.screen.getWidth() - 126) / 2,
y: 620,
w: 126,
h: 35,
isPressed: !1,
draw: D
},
n = {
x: (b.canvas.screen.getWidth() - 126) / 2,
y: 700,
w: 126,
h: 35,
isPressed: !1,
draw: D
},
c = {
stateType: {
ready: 0,
start: 1,
over: 2
},
renStateType: {
standing: 0,
moving: 1,
throwing: 2,
startSwinging: 3,
swinging: 4,
flying: 5,
landing: 6,
anxiousLeft: 7,
anxiousRight: 8,
crashing: 9,
reactivating: 10
},
lineStateType: {
holding: 0,
shooting: 1,
startSwinging: 2,
swinging: 3,
flying: 4
}
},
l = {
frames: [{
i: 0,
sx: 12,
sy: 1,
width: 20,
height: 32,
dx: 0,
dy: 0,
ssx: 0,
ssy: 0
},
{
i: 1,
sx: 53,
sy: 0,
width: 20,
height: 33,
dx: 0,
dy: 0,
ssx: 0,
ssy: 0
},
{
i: 2,
sx: 94,
sy: 1,
width: 20,
height: 32,
dx: 0,
dy: 1,
ssx: 0,
ssy: 0
},
{
i: 3,
sx: 135,
sy: 3,
width: 20,
height: 30,
dx: 0,
dy: 2,
ssx: 0,
ssy: 0
},
{
i: 4,
sx: 177,
sy: 3,
width: 21,
height: 30,
dx: 0,
dy: 4,
ssx: 0,
ssy: 0
},
{
i: 5,
sx: 219,
sy: 3,
width: 22,
height: 30,
dx: 2,
dy: 4,
ssx: 0,
ssy: 0
},
{
i: 6,
sx: 14,
sy: 46,
width: 24,
height: 28,
dx: 3,
dy: 4,
ssx: 0,
ssy: 0
},
{
i: 7,
sx: 45,
sy: 49,
width: 23,
height: 25,
dx: -8,
dy: 7,
ssx: 0,
ssy: 0
},
{
i: 8,
sx: 86,
sy: 49,
width: 23,
height: 25,
dx: -8,
dy: 7,
ssx: 0,
ssy: 0
},
{
i: 9,
sx: 214,
sy: 46,
width: 20,
height: 28,
dx: 2,
dy: 5,
ssx: 6,
ssy: 14
},
{
i: 10,
sx: 173,
sy: 44,
width: 20,
height: 30,
dx: 2,
dy: 3,
ssx: 6,
ssy: 16
},
{
i: 11,
sx: 132,
sy: 42,
width: 20,
height: 32,
dx: 2,
dy: 1,
ssx: 8,
ssy: 16
},
{
i: 12,
sx: 12,
sy: 85,
width: 20,
height: 33,
dx: 0,
dy: 0,
ssx: 1,
ssy: 16
},
{
i: 13,
sx: 53,
sy: 81,
width: 20,
height: 36,
dx: 0,
dy: 0,
ssx: 1,
ssy: 18
},
{
i: 14,
sx: 95,
sy: 88,
width: 20,
height: 33,
dx: 0,
dy: 0,
ssx: 1,
ssy: 15
},
{
i: 15,
sx: 136,
sy: 90,
width: 21,
height: 32,
dx: -1,
dy: 0,
ssx: -1,
ssy: 15
},
{
i: 16,
sx: 176,
sy: 91,
width: 22,
height: 31,
dx: -1,
dy: -1,
ssx: 1,
ssy: 11
},
{
i: 17,
sx: 215,
sy: 92,
width: 24,
height: 31,
dx: -2,
dy: -1,
ssx: 1,
ssy: 10
},
{
i: 18,
sx: 5,
sy: 133,
width: 29,
height: 27,
dx: -5,
dy: -3,
ssx: 2,
ssy: 8
},
{
i: 19,
sx: 41,
sy: 133,
width: 34,
height: 22,
dx: -7,
dy: -5,
ssx: 5,
ssy: 5
},
{
i: 20,
sx: 85,
sy: 133,
width: 31,
height: 20,
dx: -6,
dy: -6,
ssx: 6,
ssy: 4
},
{
i: 21,
sx: 126,
sy: 133,
width: 31,
height: 20,
dx: -6,
dy: -6,
ssx: 7,
ssy: 4
},
{
i: 22,
sx: 164,
sy: 133,
width: 34,
height: 22,
dx: -7,
dy: -5,
ssx: 0,
ssy: 0
},
{
i: 23,
sx: 210,
sy: 133,
width: 29,
height: 27,
dx: -5,
dy: -3,
ssx: 0,
ssy: 0
},
{
i: 24,
sx: 7,
sy: 173,
width: 27,
height: 30,
dx: -4,
dy: -1,
ssx: 0,
ssy: 0
},
{
i: 25,
sx: 51,
sy: 170,
width: 23,
height: 34,
dx: -2,
dy: 1,
ssx: 0,
ssy: 0
},
{
i: 26,
sx: 95,
sy: 170,
width: 20,
height: 34,
dx: 0,
dy: 1,
ssx: 0,
ssy: 0
},
{
i: 27,
sx: 135,
sy: 168,
width: 20,
height: 34,
dx: 0,
dy: 1,
ssx: 0,
ssy: 0
},
{
i: 28,
sx: 178,
sy: 164,
width: 20,
height: 32,
dx: 0,
dy: 0,
ssx: 0,
ssy: 0
},
{
i: 29,
sx: 217,
sy: 167,
width: 20,
height: 30,
dx: 0,
dy: 1,
ssx: 0,
ssy: 0
},
{
i: 30,
sx: 12,
sy: 207,
width: 20,
height: 31,
dx: 0,
dy: 1,
ssx: 0,
ssy: 0
},
{
i: 31,
sx: 55,
sy: 207,
width: 20,
height: 31,
dx: 0,
dy: 2,
ssx: 0,
ssy: 0
},
{
i: 32,
sx: 94,
sy: 207,
width: 20,
height: 31,
dx: -2,
dy: 1,
ssx: 0,
ssy: 0
},
{
i: 33,
sx: 132,
sy: 209,
width: 20,
height: 29,
dx: 0,
dy: 2,
ssx: 0,
ssy: 0
},
{
i: 34,
sx: 175,
sy: 207,
width: 20,
height: 31,
dx: 2,
dy: 1,
ssx: 0,
ssy: 0
},
{
i: 35,
sx: 0,
sy: 0,
width: 1,
height: 1,
dx: 0,
dy: 0,
ssx: 0,
ssy: 0
}],
gSpeed: 0,
sSpeed: 0,
mapMovingPath: []
},
源码
需要源码请关注添加好友哦^ ^
转载:欢迎来到本站,转载请注明文章出处
https://ormcc.com/