Commit cf8cb875 authored by 任建锋's avatar 任建锋

爹爹高2添加配置项

parent a098420b
{
"name": "叠叠高(新)",
"desc": "叠叠高模块",
"props": {
"guideText": {
"alias": "引导文本",
"type": "string",
"default": "点击屏幕跳跃躲避飞来的钞票"
},
"guideFlagKey": {
"alias": "引导标识名",
"type": "string",
"default": "test"
},
"scoreWeights": {
"alias": "分值权重(完美,仅中央,正常,边缘,福袋)",
"type": "array<number>",
"default": "4,2,1,1,5"
},
"jumpTips": {
"alias": "跳动提示文案",
"type": "array<string>",
"default": "勤洗手,早睡早起,均衡饮食,定时活动,多喝开水,多看书,少熬夜,坚持午觉,多思考,常微笑,少喝咖啡,听听音乐,坚持刷牙,注意防晒,远离烟草,定期体检,重视早餐,保护肩颈,常吃水果,平衡心理"
},
"goldBagScoreMultiple": {
"alias": "出现钱袋的分数倍数",
"type": "number",
"default": 30
},
"goldBagScoreSubtraction": {
"alias": "出现钱袋的分数补偿",
"type": "number",
"default": 5
},
"goldBagDistance": {
"alias": "出现钱袋的距离",
"type": "number",
"default": 10
},
"goldBagJumpSubtraction": {
"alias": "跳起触碰钱袋高度偏差",
"type": "number",
"default": 5
},
"blockAssets": {
"alias": "方块素材组",
"type": "array<string>",
"default": "方块素材0"
},
"blockHitAssets": {
"alias": "方块素材组撞击状态",
"type": "array<string>",
"default": "方块素材0_hit"
},
"blockHitOffsetY": {
"alias": "方块素材组撞击状态Y轴锚点",
"type": "number",
"default": 75
},
"blockProfectOffset": {
"alias": "方块素材组完美状态锚点",
"type": "vector2",
"default": "-100,35"
},
"blockBaseOffset": {
"alias": "初始方块偏移",
"type": "number",
"default": -40
},
"blockShadowOffset": {
"alias": "初始方块阴影偏移",
"type": "number",
"default": 100
},
"blockDurationRange": {
"alias": "方块进入时间范围",
"type": "array<number>",
"default": "500,1500"
},
"blockDurationRandom": {
"alias": "方块进入时间随机系数",
"type": "number",
"default": 0.2
},
"blockDurationStep": {
"alias": "方块进入时间递减",
"type": "number",
"default": 20
},
"gravity": {
"alias": "下落加速度",
"type": "number",
"default": 1.8
},
"scoreThreshold": {
"alias": "分数阈值数组",
"type": "number",
"default": 130
},
"blockWidth": {
"alias": "方块宽度",
"type": "number",
"default": 396
},
"blockHitWidth": {
"alias": "方块碰撞宽度",
"type": "number",
"default": 312
},
"blockHitHeight": {
"alias": "方块碰撞高度",
"type": "number",
"default": 66
},
"blockPaddingTop": {
"alias": "方块上边距",
"type": "number",
"default": 100
},
"blockPaddingBottom": {
"alias": "方块下边距",
"type": "number",
"default": 64
},
"minScale": {
"alias": "最小缩放比例",
"type": "number",
"default": 0.4
},
"maxScale": {
"alias": "最大缩放比例",
"type": "number",
"default": 0.7
},
"baseOffset": {
"alias": "底座偏移",
"type": "number",
"default": 500
},
"playerOffset": {
"alias": "角色偏移",
"type": "number",
"default": 120
},
"initBlockCount": {
"alias": "初始方块数量",
"type": "number",
"default": 1
},
"playerWidth": {
"alias": "角色宽度",
"type": "number",
"default": 100
},
"playerShadowOffset": {
"alias": "初始角色阴影偏移",
"type": "number",
"default": 45
},
"scoreAddTipsOffset": {
"alias": "加分提示偏移",
"type": "number",
"default": -130
},
"jumpTipsOffset": {
"alias": "跳跃文案偏移",
"type": "vector2",
"default": "-130,-200"
},
"parachuteDistance": {
"alias": "降落距离",
"type": "number",
"default": 250
},
"jumpSpeed": {
"alias": "挑起速度",
"type": "number",
"default": 30
},
"parachuteDuration": {
"alias": "降落时间",
"type": "number",
"default": 3000
},
"hitAwayDistance": {
"alias": "撞开距离",
"type": "vector2",
"default": "250,50"
},
"hitAwayDuration": {
"alias": "撞开时间",
"type": "number",
"default": 1000
},
"playerReadyAnchor": {
"alias": "角色准备锚点",
"type": "vector2",
"default": "150,210"
},
"playerReady2Anchor": {
"alias": "角色准备2锚点",
"type": "vector2",
"default": "150,210"
},
"playerJumpAnchor": {
"alias": "角色跳起锚点",
"type": "vector2",
"default": "150,210"
},
"playerFallAnchor": {
"alias": "角色下落锚点",
"type": "vector2",
"default": "150,210"
},
"playerHitAnchor": {
"alias": "角色撞开锚点",
"type": "vector2",
"default": "150,210"
},
"playerParachuteAnchor": {
"alias": "角色降落锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandNormalAnchor": {
"alias": "角色正常落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandPerfectAnchor": {
"alias": "角色完美落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandEffectAnchor": {
"alias": "角色落地特效锚点",
"type": "vector2",
"default": "310,100"
},
"playerLandSideAnchor": {
"alias": "角色边缘落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandPrefectAnchor": {
"alias": "角色完美落地锚点",
"type": "vector2",
"default": "160,900"
},
"hitEffectAnchor": {
"alias": "被撞烟雾锚点",
"type": "vector2",
"default": "150,150"
},
"goldPackAnchor": {
"alias": "钱袋锚点",
"type": "vector2",
"default": "375,300"
},
"goldPackAvatarAnchor": {
"alias": "静态钱袋锚点",
"type": "vector2",
"default": "850,598"
}
},
"assets": [
{
"name": "跳跃提示背景",
"url": "//yun.duiba.com.cn/aurora/assets/93646ba4e8e57adc64350c7ef78a9bff1f8c1aa9.png",
"uuid": "ff98fa3d-f37d-4be4-aa4f-0f1322cbd676",
"ext": ".png"
},
{
"name": "完美方块素材",
"url": "//yun.duiba.com.cn/aurora/assets/e2150383e8391a2972bc43fd888e4c1250e1933a.svga",
"uuid": "7499df87-4155-406b-8c2b-fea972719f39",
"ext": ".svga"
},
{
"name": "方块阴影",
"url": "//yun.duiba.com.cn/aurora/assets/c8ba94dcc9d10d4e0469ce79caed4e767b64f7e2.png",
"uuid": "c0d03a20-24aa-4886-b83b-9c1149591921",
"ext": ".png"
},
{
"name": "玩家阴影",
"url": "//yun.duiba.com.cn/aurora/assets/165612a992e4b469052d9becf1120670e7b0a307.png",
"uuid": "b4c18858-c43d-49a0-99d1-7b48fd2f24ba",
"ext": ".png"
},
{
"name": "背景图",
"url": "//yun.duiba.com.cn/aurora/assets/6bbdb3fc12e4015fd60485c9add4ee102e2d1ce2.jpg",
"uuid": "43618417-f27f-429c-bba3-e0715e552ca2",
"ext": ".jpg"
},
{
"name": "底座",
"url": "//yun.duiba.com.cn/aurora/assets/762e12b14dbdcda1a6a9dc09e79c1d0da08e60a6.png",
"uuid": "a6b3f654-2c26-434a-a873-aabc12cd1d80",
"ext": ".png"
},
{
"name": "引导遮罩",
"url": "//yun.duiba.com.cn/aurora/assets/75cc4ea91654fd1e9900d071cac5ca5296b1bd19.png",
"uuid": "6879e370-59c1-453c-8d61-cd3d724ea650",
"ext": ".png"
},
{
"name": "准备立正",
"url": "//yun.duiba.com.cn/aurora/assets/d940438c2f7b4a931d1e81df1a096a829e43d3be.svga",
"uuid": "25dc07d0-b223-4bab-8ea6-2f3282d4eb44",
"ext": ".svga"
},
{
"name": "跳上升",
"url": "//yun.duiba.com.cn/aurora/assets/99511df167598a8941dae2eccc774e793e3f3259.svga",
"uuid": "2604a92a-4ea4-4ae3-80fb-c0f8b0e34bb5",
"ext": ".svga"
},
{
"name": "跳下落",
"url": "//yun.duiba.com.cn/aurora/assets/9b05e37a4a269403b7ae996373c6a9346b6708f5.svga",
"uuid": "001a634e-5aa7-41de-aa35-0a7ce4bab6a2",
"ext": ".svga"
},
{
"name": "普通着地",
"url": "//yun.duiba.com.cn/aurora/assets/8547b977dcdad544ecac899ecc0374d136f0b3e9.svga",
"uuid": "99054cf7-9aee-4b90-a5c6-ef25787f46e5",
"ext": ".svga"
},
{
"name": "完美着地_笑",
"url": "//yun.duiba.com.cn/aurora/assets/ded47e8a1381e2c44cca4f717d320809197cae07.svga",
"uuid": "9ce4bfd2-bb67-4f74-a384-64be878c4396",
"ext": ".svga"
},
{
"name": "着地特效",
"url": "//yun.duiba.com.cn/aurora/assets/f5a28ac3ef8acb9adc1ea59faf93213b56a797a0.svga",
"uuid": "cc3f6f1b-1dad-4023-a040-0c7c2ef0ca41",
"ext": ".svga"
},
{
"name": "完美着地特效",
"url": "//yun.duiba.com.cn/aurora/assets/38c1dd059b7d6818fedbadc9c9bbc043fdb2abfa.svga",
"uuid": "30d98a94-8f12-4060-9b57-f63e316f0810",
"ext": ".svga"
},
{
"name": "边缘着地",
"url": "//yun.duiba.com.cn/aurora/assets/c3232de2bac56e88f34967890e8e513fd235bf82.svga",
"uuid": "aec9d063-c95c-40ae-b0b5-bd7140fc70b4",
"ext": ".svga"
},
{
"name": "被撞开",
"url": "//yun.duiba.com.cn/aurora/assets/4f7a39fdc470bde9dbf1c43e1fa591ecc31aa326.svga",
"uuid": "67daf7c4-158b-4ec5-8383-00e3525d2714",
"ext": ".svga"
},
{
"name": "被撞烟雾",
"url": "//yun.duiba.com.cn/aurora/assets/877bb5204007ee57f14b647326c7de5c418ecc8d.svga",
"uuid": "93ccd75b-d690-4b8a-b071-2b9565be5c7a",
"ext": ".svga"
},
{
"name": "降落",
"url": "//yun.duiba.com.cn/aurora/assets/8615c022ce4068983a74a680849f426a5df98290.svga",
"uuid": "82b514a9-69c4-425c-a77d-f34efeef1997",
"ext": ".svga"
},
{
"name": "钱袋-静态",
"url": "//yun.duiba.com.cn/aurora/assets/c5d04d5caf2dc812baeebdd34ea1abb17d183f44.png",
"uuid": "80a6f0f2-7934-4b2b-a1af-c566dae1040f",
"ext": ".png"
},
{
"name": "钱袋",
"url": "//yun.duiba.com.cn/aurora/assets/54b77086943a59fd84cc00f0b88e7396724df95d.svga",
"uuid": "3b7feeae-ebb5-49cf-b838-64f46c585978",
"ext": ".svga"
},
{
"name": "跳起音效",
"url": "//yun.duiba.com.cn/aurora/assets/8e3c6af83c20daff6ad34ff198413f0be4903039.mp3",
"uuid": "f9826065-0815-4b6d-be7f-b28478975c68",
"ext": ".mp3"
},
{
"name": "普通落地音效",
"url": "//yun.duiba.com.cn/aurora/assets/b83729366abd4c6aed590bf40bb3ad15e806c8d5.mp3",
"uuid": "dd2a8a0b-18ea-49a7-841d-221e1a3d2d50",
"ext": ".mp3"
},
{
"name": "边缘落地音效",
"url": "//yun.duiba.com.cn/aurora/assets/069079dea1901151594684de3ef294925556c1c3.mp3",
"uuid": "44bfc5ac-0093-4b40-8c8f-cef3000fb436",
"ext": ".mp3"
},
{
"name": "被撞开音效",
"url": "//yun.duiba.com.cn/aurora/assets/6f19e09e8a5300d59b069ed55b82ab8f8b876dc6.mp3",
"uuid": "f7cbf9ef-76b5-4ae8-9e05-680a3b0d223f",
"ext": ".mp3"
},
{
"name": "完美落地音效1",
"url": "//yun.duiba.com.cn/aurora/assets/c492aa71c3f385ae179977b328ec3d93c4c085e2.mp3",
"uuid": "8f5fea1d-d11f-4fd1-a27a-85b0145d54e5",
"ext": ".mp3"
},
{
"name": "完美落地音效2",
"url": "//yun.duiba.com.cn/aurora/assets/317e268d07cefddc69309941e38dbcf7d48f8ebc.mp3",
"uuid": "7452d198-9ab2-46e2-99e2-877fdce9fbe1",
"ext": ".mp3"
},
{
"name": "完美落地音效3",
"url": "//yun.duiba.com.cn/aurora/assets/5e7795c318bdf5357441085d0c681221274a72a9.mp3",
"uuid": "81209b74-d23a-4250-8695-284e9d9a6c00",
"ext": ".mp3"
},
{
"name": "完美落地音效4",
"url": "//yun.duiba.com.cn/aurora/assets/7a62f51f550ea3968fe080ee56abf28be8a92f8c.mp3",
"uuid": "ff87ce4f-c3bd-49ec-b890-4215bedb921d",
"ext": ".mp3"
},
{
"name": "降落伞下落音效",
"url": "//yun.duiba.com.cn/aurora/assets/eb4246b47a8fc2c5707d764bee2cd6a710bdc13e.mp3",
"uuid": "adb5d3ab-143f-4648-a2c4-ff794aceb2fd",
"ext": ".mp3"
},
{
"name": "撞击钱袋音效",
"url": "//yun.duiba.com.cn/aurora/assets/a6e1c99e49f258a42d65ac00b81c5a2b103aa172.mp3",
"uuid": "f06fb9b4-ef76-43ff-80ad-0f920e2ce69c",
"ext": ".mp3"
}
],
"events": {
"in": {
"jump-high-reset": {
"alias": "重置"
},
"jump-high-start": {
"alias": "开始"
},
"jump-high-revive": {
"alias": "复活"
},
"jump-high-pause": {
"alias": "暂停"
},
"jump-high-resume": {
"alias": "恢复"
}
},
"out": {
"jump-high-game-start": {
"alias": "游戏开始",
"data": {
}
},
"jump-high-game-end": {
"alias": "游戏结束",
"data": {
}
},
"jump-high-score": {
"alias": "分数变化",
"data": {
"type": "类型(0:完美,1:仅中央,2:正常,3:边缘,4:钱袋)",
"score": "分数",
"scoreAdd": "增值分数"
}
}
}
}
}
\ No newline at end of file
{
"name": "叠叠高(新)",
"desc": "叠叠高模块",
"props": {
"guideText": {
"alias": "引导文本",
"type": "string",
"default": "点击屏幕跳跃躲避飞来的钞票"
},
"guideFlagKey": {
"alias": "引导标识名",
"type": "string",
"default": "test"
},
"scoreWeights": {
"alias": "分值权重(完美,仅中央,正常,边缘,福袋)",
"type": "array<number>",
"default": "4,2,1,1,5"
},
"jumpTips": {
"alias": "跳动提示文案",
"type": "array<string>",
"default": "勤洗手,早睡早起,均衡饮食,定时活动,多喝开水,多看书,少熬夜,坚持午觉,多思考,常微笑,少喝咖啡,听听音乐,坚持刷牙,注意防晒,远离烟草,定期体检,重视早餐,保护肩颈,常吃水果,平衡心理"
},
"goldBagScoreMultiple": {
"alias": "出现钱袋的分数倍数",
"type": "number",
"default": 30
},
"goldBagScoreSubtraction": {
"alias": "出现钱袋的分数补偿",
"type": "number",
"default": 5
},
"goldBagDistance": {
"alias": "出现钱袋的距离",
"type": "number",
"default": 10
},
"goldBagJumpSubtraction": {
"alias": "跳起触碰钱袋高度偏差",
"type": "number",
"default": 5
},
"blockAssets": {
"alias": "方块素材组",
"type": "array<string>",
"default": "方块素材0"
},
"blockHitAssets": {
"alias": "方块素材组撞击状态",
"type": "array<string>",
"default": "方块素材0_hit"
},
"blockHitOffsetY": {
"alias": "方块素材组撞击状态Y轴锚点",
"type": "number",
"default": 75
},
"blockProfectOffset": {
"alias": "方块素材组完美状态锚点",
"type": "vector2",
"default": "-100,35"
},
"blockBaseOffset": {
"alias": "初始方块偏移",
"type": "number",
"default": -40
},
"blockShadowOffset": {
"alias": "初始方块阴影偏移",
"type": "number",
"default": 100
},
"blockDurationRange": {
"alias": "方块进入时间范围",
"type": "array<number>",
"default": "500,1500"
},
"blockDurationRandom": {
"alias": "方块进入时间随机系数",
"type": "number",
"default": 0.2
},
"blockDurationStep": {
"alias": "方块进入时间递减",
"type": "number",
"default": 20
},
"gravity": {
"alias": "下落加速度",
"type": "number",
"default": 1.8
},
"scoreThreshold": {
"alias": "分数阈值数组",
"type": "number",
"default": 130
},
"blockWidth": {
"alias": "方块宽度",
"type": "number",
"default": 396
},
"blockHitWidth": {
"alias": "方块碰撞宽度",
"type": "number",
"default": 312
},
"blockHitHeight": {
"alias": "方块碰撞高度",
"type": "number",
"default": 66
},
"blockPaddingTop": {
"alias": "方块上边距",
"type": "number",
"default": 100
},
"blockPaddingBottom": {
"alias": "方块下边距",
"type": "number",
"default": 64
},
"minScale": {
"alias": "最小缩放比例",
"type": "number",
"default": 0.4
},
"maxScale": {
"alias": "最大缩放比例",
"type": "number",
"default": 0.7
},
"baseOffset": {
"alias": "底座偏移",
"type": "number",
"default": 500
},
"playerOffset": {
"alias": "角色偏移",
"type": "number",
"default": 120
},
"initBlockCount": {
"alias": "初始方块数量",
"type": "number",
"default": 1
},
"playerWidth": {
"alias": "角色宽度",
"type": "number",
"default": 100
},
"playerShadowOffset": {
"alias": "初始角色阴影偏移",
"type": "number",
"default": 45
},
"scoreAddTipsOffset": {
"alias": "加分提示偏移",
"type": "number",
"default": -130
},
"scoreAddFontColor": {
"alias": "加分提示字体颜色",
"type": "string",
"default": "#fc4454"
},
"scoreAddFontSize": {
"alias": "加分提示字体颜色",
"type": "number",
"default": 50
},
"jumpTipsOffset": {
"alias": "跳跃文案偏移",
"type": "vector2",
"default": "-130,-200"
},
"parachuteDistance": {
"alias": "降落距离",
"type": "number",
"default": 250
},
"jumpSpeed": {
"alias": "挑起速度",
"type": "number",
"default": 30
},
"parachuteDuration": {
"alias": "降落时间",
"type": "number",
"default": 3000
},
"hitAwayDistance": {
"alias": "撞开距离",
"type": "vector2",
"default": "250,50"
},
"hitAwayDuration": {
"alias": "撞开时间",
"type": "number",
"default": 1000
},
"playerReadyAnchor": {
"alias": "角色准备锚点",
"type": "vector2",
"default": "150,210"
},
"playerReady2Anchor": {
"alias": "角色准备2锚点",
"type": "vector2",
"default": "150,210"
},
"playerJumpAnchor": {
"alias": "角色跳起锚点",
"type": "vector2",
"default": "150,210"
},
"playerFallAnchor": {
"alias": "角色下落锚点",
"type": "vector2",
"default": "150,210"
},
"playerHitAnchor": {
"alias": "角色撞开锚点",
"type": "vector2",
"default": "150,210"
},
"playerParachuteAnchor": {
"alias": "角色降落锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandNormalAnchor": {
"alias": "角色正常落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandPerfectAnchor": {
"alias": "角色完美落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandEffectAnchor": {
"alias": "角色落地特效锚点",
"type": "vector2",
"default": "310,100"
},
"playerLandSideAnchor": {
"alias": "角色边缘落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandPrefectAnchor": {
"alias": "角色完美落地锚点",
"type": "vector2",
"default": "160,900"
},
"hitEffectAnchor": {
"alias": "被撞烟雾锚点",
"type": "vector2",
"default": "150,150"
},
"goldPackAnchor": {
"alias": "钱袋锚点",
"type": "vector2",
"default": "375,300"
},
"goldPackAvatarAnchor": {
"alias": "静态钱袋锚点",
"type": "vector2",
"default": "850,598"
}
},
"assets": [
{
"name": "跳跃提示背景",
"url": "//yun.duiba.com.cn/aurora/assets/93646ba4e8e57adc64350c7ef78a9bff1f8c1aa9.png",
"uuid": "ff98fa3d-f37d-4be4-aa4f-0f1322cbd676",
"ext": ".png"
},
{
"name": "完美方块素材",
"url": "//yun.duiba.com.cn/aurora/assets/e2150383e8391a2972bc43fd888e4c1250e1933a.svga",
"uuid": "7499df87-4155-406b-8c2b-fea972719f39",
"ext": ".svga"
},
{
"name": "方块阴影",
"url": "//yun.duiba.com.cn/aurora/assets/c8ba94dcc9d10d4e0469ce79caed4e767b64f7e2.png",
"uuid": "c0d03a20-24aa-4886-b83b-9c1149591921",
"ext": ".png"
},
{
"name": "玩家阴影",
"url": "//yun.duiba.com.cn/aurora/assets/165612a992e4b469052d9becf1120670e7b0a307.png",
"uuid": "b4c18858-c43d-49a0-99d1-7b48fd2f24ba",
"ext": ".png"
},
{
"name": "背景图",
"url": "//yun.duiba.com.cn/aurora/assets/6bbdb3fc12e4015fd60485c9add4ee102e2d1ce2.jpg",
"uuid": "43618417-f27f-429c-bba3-e0715e552ca2",
"ext": ".jpg"
},
{
"name": "底座",
"url": "//yun.duiba.com.cn/aurora/assets/762e12b14dbdcda1a6a9dc09e79c1d0da08e60a6.png",
"uuid": "a6b3f654-2c26-434a-a873-aabc12cd1d80",
"ext": ".png"
},
{
"name": "引导遮罩",
"url": "//yun.duiba.com.cn/aurora/assets/75cc4ea91654fd1e9900d071cac5ca5296b1bd19.png",
"uuid": "6879e370-59c1-453c-8d61-cd3d724ea650",
"ext": ".png"
},
{
"name": "准备立正",
"url": "//yun.duiba.com.cn/aurora/assets/d940438c2f7b4a931d1e81df1a096a829e43d3be.svga",
"uuid": "25dc07d0-b223-4bab-8ea6-2f3282d4eb44",
"ext": ".svga"
},
{
"name": "跳上升",
"url": "//yun.duiba.com.cn/aurora/assets/99511df167598a8941dae2eccc774e793e3f3259.svga",
"uuid": "2604a92a-4ea4-4ae3-80fb-c0f8b0e34bb5",
"ext": ".svga"
},
{
"name": "跳下落",
"url": "//yun.duiba.com.cn/aurora/assets/9b05e37a4a269403b7ae996373c6a9346b6708f5.svga",
"uuid": "001a634e-5aa7-41de-aa35-0a7ce4bab6a2",
"ext": ".svga"
},
{
"name": "普通着地",
"url": "//yun.duiba.com.cn/aurora/assets/8547b977dcdad544ecac899ecc0374d136f0b3e9.svga",
"uuid": "99054cf7-9aee-4b90-a5c6-ef25787f46e5",
"ext": ".svga"
},
{
"name": "完美着地_笑",
"url": "//yun.duiba.com.cn/aurora/assets/ded47e8a1381e2c44cca4f717d320809197cae07.svga",
"uuid": "9ce4bfd2-bb67-4f74-a384-64be878c4396",
"ext": ".svga"
},
{
"name": "着地特效",
"url": "//yun.duiba.com.cn/aurora/assets/f5a28ac3ef8acb9adc1ea59faf93213b56a797a0.svga",
"uuid": "cc3f6f1b-1dad-4023-a040-0c7c2ef0ca41",
"ext": ".svga"
},
{
"name": "完美着地特效",
"url": "//yun.duiba.com.cn/aurora/assets/38c1dd059b7d6818fedbadc9c9bbc043fdb2abfa.svga",
"uuid": "30d98a94-8f12-4060-9b57-f63e316f0810",
"ext": ".svga"
},
{
"name": "边缘着地",
"url": "//yun.duiba.com.cn/aurora/assets/c3232de2bac56e88f34967890e8e513fd235bf82.svga",
"uuid": "aec9d063-c95c-40ae-b0b5-bd7140fc70b4",
"ext": ".svga"
},
{
"name": "被撞开",
"url": "//yun.duiba.com.cn/aurora/assets/4f7a39fdc470bde9dbf1c43e1fa591ecc31aa326.svga",
"uuid": "67daf7c4-158b-4ec5-8383-00e3525d2714",
"ext": ".svga"
},
{
"name": "被撞烟雾",
"url": "//yun.duiba.com.cn/aurora/assets/877bb5204007ee57f14b647326c7de5c418ecc8d.svga",
"uuid": "93ccd75b-d690-4b8a-b071-2b9565be5c7a",
"ext": ".svga"
},
{
"name": "降落",
"url": "//yun.duiba.com.cn/aurora/assets/8615c022ce4068983a74a680849f426a5df98290.svga",
"uuid": "82b514a9-69c4-425c-a77d-f34efeef1997",
"ext": ".svga"
},
{
"name": "钱袋-静态",
"url": "//yun.duiba.com.cn/aurora/assets/c5d04d5caf2dc812baeebdd34ea1abb17d183f44.png",
"uuid": "80a6f0f2-7934-4b2b-a1af-c566dae1040f",
"ext": ".png"
},
{
"name": "钱袋",
"url": "//yun.duiba.com.cn/aurora/assets/54b77086943a59fd84cc00f0b88e7396724df95d.svga",
"uuid": "3b7feeae-ebb5-49cf-b838-64f46c585978",
"ext": ".svga"
},
{
"name": "跳起音效",
"url": "//yun.duiba.com.cn/aurora/assets/8e3c6af83c20daff6ad34ff198413f0be4903039.mp3",
"uuid": "f9826065-0815-4b6d-be7f-b28478975c68",
"ext": ".mp3"
},
{
"name": "普通落地音效",
"url": "//yun.duiba.com.cn/aurora/assets/b83729366abd4c6aed590bf40bb3ad15e806c8d5.mp3",
"uuid": "dd2a8a0b-18ea-49a7-841d-221e1a3d2d50",
"ext": ".mp3"
},
{
"name": "边缘落地音效",
"url": "//yun.duiba.com.cn/aurora/assets/069079dea1901151594684de3ef294925556c1c3.mp3",
"uuid": "44bfc5ac-0093-4b40-8c8f-cef3000fb436",
"ext": ".mp3"
},
{
"name": "被撞开音效",
"url": "//yun.duiba.com.cn/aurora/assets/6f19e09e8a5300d59b069ed55b82ab8f8b876dc6.mp3",
"uuid": "f7cbf9ef-76b5-4ae8-9e05-680a3b0d223f",
"ext": ".mp3"
},
{
"name": "完美落地音效1",
"url": "//yun.duiba.com.cn/aurora/assets/c492aa71c3f385ae179977b328ec3d93c4c085e2.mp3",
"uuid": "8f5fea1d-d11f-4fd1-a27a-85b0145d54e5",
"ext": ".mp3"
},
{
"name": "完美落地音效2",
"url": "//yun.duiba.com.cn/aurora/assets/317e268d07cefddc69309941e38dbcf7d48f8ebc.mp3",
"uuid": "7452d198-9ab2-46e2-99e2-877fdce9fbe1",
"ext": ".mp3"
},
{
"name": "完美落地音效3",
"url": "//yun.duiba.com.cn/aurora/assets/5e7795c318bdf5357441085d0c681221274a72a9.mp3",
"uuid": "81209b74-d23a-4250-8695-284e9d9a6c00",
"ext": ".mp3"
},
{
"name": "完美落地音效4",
"url": "//yun.duiba.com.cn/aurora/assets/7a62f51f550ea3968fe080ee56abf28be8a92f8c.mp3",
"uuid": "ff87ce4f-c3bd-49ec-b890-4215bedb921d",
"ext": ".mp3"
},
{
"name": "降落伞下落音效",
"url": "//yun.duiba.com.cn/aurora/assets/eb4246b47a8fc2c5707d764bee2cd6a710bdc13e.mp3",
"uuid": "adb5d3ab-143f-4648-a2c4-ff794aceb2fd",
"ext": ".mp3"
},
{
"name": "撞击钱袋音效",
"url": "//yun.duiba.com.cn/aurora/assets/a6e1c99e49f258a42d65ac00b81c5a2b103aa172.mp3",
"uuid": "f06fb9b4-ef76-43ff-80ad-0f920e2ce69c",
"ext": ".mp3"
}
],
"events": {
"in": {
"jump-high-reset": {
"alias": "重置"
},
"jump-high-start": {
"alias": "开始"
},
"jump-high-revive": {
"alias": "复活"
},
"jump-high-pause": {
"alias": "暂停"
},
"jump-high-resume": {
"alias": "恢复"
}
},
"out": {
"jump-high-game-start": {
"alias": "游戏开始",
"data": {
}
},
"jump-high-game-end": {
"alias": "游戏结束",
"data": {
}
},
"jump-high-score": {
"alias": "分数变化",
"data": {
"type": "类型(0:完美,1:仅中央,2:正常,3:边缘,4:钱袋)",
"score": "分数",
"scoreAdd": "增值分数"
}
}
}
}
}
\ No newline at end of file
{
"name": "叠叠高(新)",
"desc": "叠叠高模块",
"props": {
"guideText": {
"alias": "引导文本",
"type": "string",
"default": "点击屏幕跳跃躲避飞来的钞票"
},
"guideFlagKey": {
"alias": "引导标识名",
"type": "string",
"default": "test"
},
"scoreWeights": {
"alias": "分值权重(完美,仅中央,正常,边缘,福袋)",
"type": "array<number>",
"default": "4,2,1,1,5"
},
"jumpTips": {
"alias": "跳动提示文案",
"type": "array<string>",
"default": "勤洗手,早睡早起,均衡饮食,定时活动,多喝开水,多看书,少熬夜,坚持午觉,多思考,常微笑,少喝咖啡,听听音乐,坚持刷牙,注意防晒,远离烟草,定期体检,重视早餐,保护肩颈,常吃水果,平衡心理"
},
"goldBagScoreMultiple": {
"alias": "出现钱袋的分数倍数",
"type": "number",
"default": 30
},
"goldBagScoreSubtraction": {
"alias": "出现钱袋的分数补偿",
"type": "number",
"default": 5
},
"goldBagDistance": {
"alias": "出现钱袋的距离",
"type": "number",
"default": 10
},
"goldBagJumpSubtraction": {
"alias": "跳起触碰钱袋高度偏差",
"type": "number",
"default": 5
},
"blockAssets": {
"alias": "方块素材组",
"type": "array<string>",
"default": "方块素材0"
},
"blockHitAssets": {
"alias": "方块素材组撞击状态",
"type": "array<string>",
"default": "方块素材0_hit"
},
"blockHitOffsetY": {
"alias": "方块素材组撞击状态Y轴锚点",
"type": "number",
"default": 75
},
"blockProfectOffset": {
"alias": "方块素材组完美状态锚点",
"type": "vector2",
"default": "-100,35"
},
"blockBaseOffset": {
"alias": "初始方块偏移",
"type": "number",
"default": -40
},
"blockShadowOffset": {
"alias": "初始方块阴影偏移",
"type": "number",
"default": 100
},
"blockDurationRange": {
"alias": "方块进入时间范围",
"type": "array<number>",
"default": "500,1500"
},
"blockDurationRandom": {
"alias": "方块进入时间随机系数",
"type": "number",
"default": 0.2
},
"blockDurationStep": {
"alias": "方块进入时间递减",
"type": "number",
"default": 20
},
"gravity": {
"alias": "下落加速度",
"type": "number",
"default": 1.8
},
"scoreThreshold": {
"alias": "分数阈值数组",
"type": "number",
"default": 130
},
"blockWidth": {
"alias": "方块宽度",
"type": "number",
"default": 396
},
"blockHitWidth": {
"alias": "方块碰撞宽度",
"type": "number",
"default": 312
},
"blockHitHeight": {
"alias": "方块碰撞高度",
"type": "number",
"default": 66
},
"blockPaddingTop": {
"alias": "方块上边距",
"type": "number",
"default": 100
},
"blockPaddingBottom": {
"alias": "方块下边距",
"type": "number",
"default": 64
},
"minScale": {
"alias": "最小缩放比例",
"type": "number",
"default": 0.4
},
"maxScale": {
"alias": "最大缩放比例",
"type": "number",
"default": 0.7
},
"baseOffset": {
"alias": "底座偏移",
"type": "number",
"default": 500
},
"playerOffset": {
"alias": "角色偏移",
"type": "number",
"default": 120
},
"initBlockCount": {
"alias": "初始方块数量",
"type": "number",
"default": 1
},
"playerWidth": {
"alias": "角色宽度",
"type": "number",
"default": 100
},
"playerShadowOffset": {
"alias": "初始角色阴影偏移",
"type": "number",
"default": 45
},
"scoreAddTipsOffset": {
"alias": "加分提示偏移",
"type": "number",
"default": -130
},
"scoreAddFontColor": {
"alias": "加分提示字体颜色",
"type": "string",
"default": "#fc4454"
},
"scoreAddFontSize": {
"alias": "加分提示字体颜色",
"type": "number",
"default": 500
},
"jumpTipsOffset": {
"alias": "跳跃文案偏移",
"type": "vector2",
"default": "-130,-200"
},
"parachuteDistance": {
"alias": "降落距离",
"type": "number",
"default": 250
},
"jumpSpeed": {
"alias": "挑起速度",
"type": "number",
"default": 30
},
"parachuteDuration": {
"alias": "降落时间",
"type": "number",
"default": 3000
},
"hitAwayDistance": {
"alias": "撞开距离",
"type": "vector2",
"default": "250,50"
},
"hitAwayDuration": {
"alias": "撞开时间",
"type": "number",
"default": 1000
},
"playerReadyAnchor": {
"alias": "角色准备锚点",
"type": "vector2",
"default": "150,210"
},
"playerReady2Anchor": {
"alias": "角色准备2锚点",
"type": "vector2",
"default": "150,210"
},
"playerJumpAnchor": {
"alias": "角色跳起锚点",
"type": "vector2",
"default": "150,210"
},
"playerFallAnchor": {
"alias": "角色下落锚点",
"type": "vector2",
"default": "150,210"
},
"playerHitAnchor": {
"alias": "角色撞开锚点",
"type": "vector2",
"default": "150,210"
},
"playerParachuteAnchor": {
"alias": "角色降落锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandNormalAnchor": {
"alias": "角色正常落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandPerfectAnchor": {
"alias": "角色完美落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandEffectAnchor": {
"alias": "角色落地特效锚点",
"type": "vector2",
"default": "310,100"
},
"playerLandSideAnchor": {
"alias": "角色边缘落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandPrefectAnchor": {
"alias": "角色完美落地锚点",
"type": "vector2",
"default": "160,900"
},
"hitEffectAnchor": {
"alias": "被撞烟雾锚点",
"type": "vector2",
"default": "150,150"
},
"goldPackAnchor": {
"alias": "钱袋锚点",
"type": "vector2",
"default": "375,300"
},
"goldPackAvatarAnchor": {
"alias": "静态钱袋锚点",
"type": "vector2",
"default": "850,598"
}
},
"assets": [
{
"name": "跳跃提示背景",
"url": "//yun.duiba.com.cn/aurora/assets/93646ba4e8e57adc64350c7ef78a9bff1f8c1aa9.png",
"uuid": "ff98fa3d-f37d-4be4-aa4f-0f1322cbd676",
"ext": ".png"
},
{
"name": "完美方块素材",
"url": "//yun.duiba.com.cn/aurora/assets/e2150383e8391a2972bc43fd888e4c1250e1933a.svga",
"uuid": "7499df87-4155-406b-8c2b-fea972719f39",
"ext": ".svga"
},
{
"name": "方块阴影",
"url": "//yun.duiba.com.cn/aurora/assets/c8ba94dcc9d10d4e0469ce79caed4e767b64f7e2.png",
"uuid": "c0d03a20-24aa-4886-b83b-9c1149591921",
"ext": ".png"
},
{
"name": "玩家阴影",
"url": "//yun.duiba.com.cn/aurora/assets/165612a992e4b469052d9becf1120670e7b0a307.png",
"uuid": "b4c18858-c43d-49a0-99d1-7b48fd2f24ba",
"ext": ".png"
},
{
"name": "背景图",
"url": "//yun.duiba.com.cn/aurora/assets/6bbdb3fc12e4015fd60485c9add4ee102e2d1ce2.jpg",
"uuid": "43618417-f27f-429c-bba3-e0715e552ca2",
"ext": ".jpg"
},
{
"name": "底座",
"url": "//yun.duiba.com.cn/aurora/assets/762e12b14dbdcda1a6a9dc09e79c1d0da08e60a6.png",
"uuid": "a6b3f654-2c26-434a-a873-aabc12cd1d80",
"ext": ".png"
},
{
"name": "引导遮罩",
"url": "//yun.duiba.com.cn/aurora/assets/75cc4ea91654fd1e9900d071cac5ca5296b1bd19.png",
"uuid": "6879e370-59c1-453c-8d61-cd3d724ea650",
"ext": ".png"
},
{
"name": "准备立正",
"url": "//yun.duiba.com.cn/aurora/assets/d940438c2f7b4a931d1e81df1a096a829e43d3be.svga",
"uuid": "25dc07d0-b223-4bab-8ea6-2f3282d4eb44",
"ext": ".svga"
},
{
"name": "跳上升",
"url": "//yun.duiba.com.cn/aurora/assets/99511df167598a8941dae2eccc774e793e3f3259.svga",
"uuid": "2604a92a-4ea4-4ae3-80fb-c0f8b0e34bb5",
"ext": ".svga"
},
{
"name": "跳下落",
"url": "//yun.duiba.com.cn/aurora/assets/9b05e37a4a269403b7ae996373c6a9346b6708f5.svga",
"uuid": "001a634e-5aa7-41de-aa35-0a7ce4bab6a2",
"ext": ".svga"
},
{
"name": "普通着地",
"url": "//yun.duiba.com.cn/aurora/assets/8547b977dcdad544ecac899ecc0374d136f0b3e9.svga",
"uuid": "99054cf7-9aee-4b90-a5c6-ef25787f46e5",
"ext": ".svga"
},
{
"name": "完美着地_笑",
"url": "//yun.duiba.com.cn/aurora/assets/ded47e8a1381e2c44cca4f717d320809197cae07.svga",
"uuid": "9ce4bfd2-bb67-4f74-a384-64be878c4396",
"ext": ".svga"
},
{
"name": "着地特效",
"url": "//yun.duiba.com.cn/aurora/assets/f5a28ac3ef8acb9adc1ea59faf93213b56a797a0.svga",
"uuid": "cc3f6f1b-1dad-4023-a040-0c7c2ef0ca41",
"ext": ".svga"
},
{
"name": "完美着地特效",
"url": "//yun.duiba.com.cn/aurora/assets/38c1dd059b7d6818fedbadc9c9bbc043fdb2abfa.svga",
"uuid": "30d98a94-8f12-4060-9b57-f63e316f0810",
"ext": ".svga"
},
{
"name": "边缘着地",
"url": "//yun.duiba.com.cn/aurora/assets/c3232de2bac56e88f34967890e8e513fd235bf82.svga",
"uuid": "aec9d063-c95c-40ae-b0b5-bd7140fc70b4",
"ext": ".svga"
},
{
"name": "被撞开",
"url": "//yun.duiba.com.cn/aurora/assets/4f7a39fdc470bde9dbf1c43e1fa591ecc31aa326.svga",
"uuid": "67daf7c4-158b-4ec5-8383-00e3525d2714",
"ext": ".svga"
},
{
"name": "被撞烟雾",
"url": "//yun.duiba.com.cn/aurora/assets/877bb5204007ee57f14b647326c7de5c418ecc8d.svga",
"uuid": "93ccd75b-d690-4b8a-b071-2b9565be5c7a",
"ext": ".svga"
},
{
"name": "降落",
"url": "//yun.duiba.com.cn/aurora/assets/8615c022ce4068983a74a680849f426a5df98290.svga",
"uuid": "82b514a9-69c4-425c-a77d-f34efeef1997",
"ext": ".svga"
},
{
"name": "钱袋-静态",
"url": "//yun.duiba.com.cn/aurora/assets/c5d04d5caf2dc812baeebdd34ea1abb17d183f44.png",
"uuid": "80a6f0f2-7934-4b2b-a1af-c566dae1040f",
"ext": ".png"
},
{
"name": "钱袋",
"url": "//yun.duiba.com.cn/aurora/assets/54b77086943a59fd84cc00f0b88e7396724df95d.svga",
"uuid": "3b7feeae-ebb5-49cf-b838-64f46c585978",
"ext": ".svga"
},
{
"name": "跳起音效",
"url": "//yun.duiba.com.cn/aurora/assets/8e3c6af83c20daff6ad34ff198413f0be4903039.mp3",
"uuid": "f9826065-0815-4b6d-be7f-b28478975c68",
"ext": ".mp3"
},
{
"name": "普通落地音效",
"url": "//yun.duiba.com.cn/aurora/assets/b83729366abd4c6aed590bf40bb3ad15e806c8d5.mp3",
"uuid": "dd2a8a0b-18ea-49a7-841d-221e1a3d2d50",
"ext": ".mp3"
},
{
"name": "边缘落地音效",
"url": "//yun.duiba.com.cn/aurora/assets/069079dea1901151594684de3ef294925556c1c3.mp3",
"uuid": "44bfc5ac-0093-4b40-8c8f-cef3000fb436",
"ext": ".mp3"
},
{
"name": "被撞开音效",
"url": "//yun.duiba.com.cn/aurora/assets/6f19e09e8a5300d59b069ed55b82ab8f8b876dc6.mp3",
"uuid": "f7cbf9ef-76b5-4ae8-9e05-680a3b0d223f",
"ext": ".mp3"
},
{
"name": "完美落地音效1",
"url": "//yun.duiba.com.cn/aurora/assets/c492aa71c3f385ae179977b328ec3d93c4c085e2.mp3",
"uuid": "8f5fea1d-d11f-4fd1-a27a-85b0145d54e5",
"ext": ".mp3"
},
{
"name": "完美落地音效2",
"url": "//yun.duiba.com.cn/aurora/assets/317e268d07cefddc69309941e38dbcf7d48f8ebc.mp3",
"uuid": "7452d198-9ab2-46e2-99e2-877fdce9fbe1",
"ext": ".mp3"
},
{
"name": "完美落地音效3",
"url": "//yun.duiba.com.cn/aurora/assets/5e7795c318bdf5357441085d0c681221274a72a9.mp3",
"uuid": "81209b74-d23a-4250-8695-284e9d9a6c00",
"ext": ".mp3"
},
{
"name": "完美落地音效4",
"url": "//yun.duiba.com.cn/aurora/assets/7a62f51f550ea3968fe080ee56abf28be8a92f8c.mp3",
"uuid": "ff87ce4f-c3bd-49ec-b890-4215bedb921d",
"ext": ".mp3"
},
{
"name": "降落伞下落音效",
"url": "//yun.duiba.com.cn/aurora/assets/eb4246b47a8fc2c5707d764bee2cd6a710bdc13e.mp3",
"uuid": "adb5d3ab-143f-4648-a2c4-ff794aceb2fd",
"ext": ".mp3"
},
{
"name": "撞击钱袋音效",
"url": "//yun.duiba.com.cn/aurora/assets/a6e1c99e49f258a42d65ac00b81c5a2b103aa172.mp3",
"uuid": "f06fb9b4-ef76-43ff-80ad-0f920e2ce69c",
"ext": ".mp3"
}
],
"events": {
"in": {
"jump-high-reset": {
"alias": "重置"
},
"jump-high-start": {
"alias": "开始"
},
"jump-high-revive": {
"alias": "复活"
},
"jump-high-pause": {
"alias": "暂停"
},
"jump-high-resume": {
"alias": "恢复"
}
},
"out": {
"jump-high-game-start": {
"alias": "游戏开始",
"data": {
}
},
"jump-high-game-end": {
"alias": "游戏结束",
"data": {
}
},
"jump-high-score": {
"alias": "分数变化",
"data": {
"type": "类型(0:完美,1:仅中央,2:正常,3:边缘,4:钱袋)",
"score": "分数",
"scoreAdd": "增值分数"
}
}
}
}
}
\ No newline at end of file
{
"name": "叠叠高(新)",
"desc": "叠叠高模块",
"props": {
"guideText": {
"alias": "引导文本",
"type": "string",
"default": "点击屏幕跳跃躲避飞来的钞票"
},
"guideFlagKey": {
"alias": "引导标识名",
"type": "string",
"default": "test"
},
"scoreWeights": {
"alias": "分值权重(完美,仅中央,正常,边缘,福袋)",
"type": "array<number>",
"default": "4,2,1,1,5"
},
"jumpTips": {
"alias": "跳动提示文案",
"type": "array<string>",
"default": "勤洗手,早睡早起,均衡饮食,定时活动,多喝开水,多看书,少熬夜,坚持午觉,多思考,常微笑,少喝咖啡,听听音乐,坚持刷牙,注意防晒,远离烟草,定期体检,重视早餐,保护肩颈,常吃水果,平衡心理"
},
"goldBagScoreMultiple": {
"alias": "出现钱袋的分数倍数",
"type": "number",
"default": 30
},
"goldBagScoreSubtraction": {
"alias": "出现钱袋的分数补偿",
"type": "number",
"default": 5
},
"goldBagDistance": {
"alias": "出现钱袋的距离",
"type": "number",
"default": 10
},
"goldBagJumpSubtraction": {
"alias": "跳起触碰钱袋高度偏差",
"type": "number",
"default": 5
},
"blockAssets": {
"alias": "方块素材组",
"type": "array<string>",
"default": "方块素材0"
},
"blockHitAssets": {
"alias": "方块素材组撞击状态",
"type": "array<string>",
"default": "方块素材0_hit"
},
"blockHitOffsetY": {
"alias": "方块素材组撞击状态Y轴锚点",
"type": "number",
"default": 75
},
"blockProfectOffset": {
"alias": "方块素材组完美状态锚点",
"type": "vector2",
"default": "-100,35"
},
"blockBaseOffset": {
"alias": "初始方块偏移",
"type": "number",
"default": -40
},
"blockShadowOffset": {
"alias": "初始方块阴影偏移",
"type": "number",
"default": 100
},
"blockDurationRange": {
"alias": "方块进入时间范围",
"type": "array<number>",
"default": "500,1500"
},
"blockDurationRandom": {
"alias": "方块进入时间随机系数",
"type": "number",
"default": 0.2
},
"blockDurationStep": {
"alias": "方块进入时间递减",
"type": "number",
"default": 20
},
"gravity": {
"alias": "下落加速度",
"type": "number",
"default": 1.8
},
"scoreThreshold": {
"alias": "分数阈值数组",
"type": "number",
"default": 130
},
"blockWidth": {
"alias": "方块宽度",
"type": "number",
"default": 396
},
"blockHitWidth": {
"alias": "方块碰撞宽度",
"type": "number",
"default": 312
},
"blockHitHeight": {
"alias": "方块碰撞高度",
"type": "number",
"default": 66
},
"blockPaddingTop": {
"alias": "方块上边距",
"type": "number",
"default": 100
},
"blockPaddingBottom": {
"alias": "方块下边距",
"type": "number",
"default": 64
},
"minScale": {
"alias": "最小缩放比例",
"type": "number",
"default": 0.4
},
"maxScale": {
"alias": "最大缩放比例",
"type": "number",
"default": 0.7
},
"baseOffset": {
"alias": "底座偏移",
"type": "number",
"default": 500
},
"playerOffset": {
"alias": "角色偏移",
"type": "number",
"default": 120
},
"initBlockCount": {
"alias": "初始方块数量",
"type": "number",
"default": 1
},
"playerWidth": {
"alias": "角色宽度",
"type": "number",
"default": 100
},
"playerShadowOffset": {
"alias": "初始角色阴影偏移",
"type": "number",
"default": 45
},
"scoreAddTipsOffset": {
"alias": "加分提示偏移",
"type": "number",
"default": -130
},
"scoreAddFontColor": {
"alias": "加分提示字体颜色",
"type": "string",
"default": "#fc4454"
},
"scoreAddFontSize": {
"alias": "加分提示字体颜色",
"type": "number",
"default": 50
},
"jumpTipsOffset": {
"alias": "跳跃文案偏移",
"type": "vector2",
"default": "-130,-200"
},
"parachuteDistance": {
"alias": "降落距离",
"type": "number",
"default": 250
},
"jumpSpeed": {
"alias": "挑起速度",
"type": "number",
"default": 30
},
"parachuteDuration": {
"alias": "降落时间",
"type": "number",
"default": 3000
},
"hitAwayDistance": {
"alias": "撞开距离",
"type": "vector2",
"default": "250,50"
},
"hitAwayDuration": {
"alias": "撞开时间",
"type": "number",
"default": 1000
},
"playerReadyAnchor": {
"alias": "角色准备锚点",
"type": "vector2",
"default": "150,210"
},
"playerReady2Anchor": {
"alias": "角色准备2锚点",
"type": "vector2",
"default": "150,210"
},
"playerJumpAnchor": {
"alias": "角色跳起锚点",
"type": "vector2",
"default": "150,210"
},
"playerFallAnchor": {
"alias": "角色下落锚点",
"type": "vector2",
"default": "150,210"
},
"playerHitAnchor": {
"alias": "角色撞开锚点",
"type": "vector2",
"default": "150,210"
},
"playerParachuteAnchor": {
"alias": "角色降落锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandNormalAnchor": {
"alias": "角色正常落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandPerfectAnchor": {
"alias": "角色完美落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandEffectAnchor": {
"alias": "角色落地特效锚点",
"type": "vector2",
"default": "310,100"
},
"playerLandSideAnchor": {
"alias": "角色边缘落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandPrefectAnchor": {
"alias": "角色完美落地锚点",
"type": "vector2",
"default": "160,900"
},
"hitEffectAnchor": {
"alias": "被撞烟雾锚点",
"type": "vector2",
"default": "150,150"
},
"goldPackAnchor": {
"alias": "钱袋锚点",
"type": "vector2",
"default": "375,300"
},
"goldPackAvatarAnchor": {
"alias": "静态钱袋锚点",
"type": "vector2",
"default": "850,598"
}
},
"assets": [
{
"name": "跳跃提示背景",
"url": "//yun.duiba.com.cn/aurora/assets/93646ba4e8e57adc64350c7ef78a9bff1f8c1aa9.png",
"uuid": "ff98fa3d-f37d-4be4-aa4f-0f1322cbd676",
"ext": ".png"
},
{
"name": "完美方块素材",
"url": "//yun.duiba.com.cn/aurora/assets/e2150383e8391a2972bc43fd888e4c1250e1933a.svga",
"uuid": "7499df87-4155-406b-8c2b-fea972719f39",
"ext": ".svga"
},
{
"name": "方块阴影",
"url": "//yun.duiba.com.cn/aurora/assets/c8ba94dcc9d10d4e0469ce79caed4e767b64f7e2.png",
"uuid": "c0d03a20-24aa-4886-b83b-9c1149591921",
"ext": ".png"
},
{
"name": "玩家阴影",
"url": "//yun.duiba.com.cn/aurora/assets/165612a992e4b469052d9becf1120670e7b0a307.png",
"uuid": "b4c18858-c43d-49a0-99d1-7b48fd2f24ba",
"ext": ".png"
},
{
"name": "背景图",
"url": "//yun.duiba.com.cn/aurora/assets/6bbdb3fc12e4015fd60485c9add4ee102e2d1ce2.jpg",
"uuid": "43618417-f27f-429c-bba3-e0715e552ca2",
"ext": ".jpg"
},
{
"name": "底座",
"url": "//yun.duiba.com.cn/aurora/assets/762e12b14dbdcda1a6a9dc09e79c1d0da08e60a6.png",
"uuid": "a6b3f654-2c26-434a-a873-aabc12cd1d80",
"ext": ".png"
},
{
"name": "引导遮罩",
"url": "//yun.duiba.com.cn/aurora/assets/75cc4ea91654fd1e9900d071cac5ca5296b1bd19.png",
"uuid": "6879e370-59c1-453c-8d61-cd3d724ea650",
"ext": ".png"
},
{
"name": "准备立正",
"url": "//yun.duiba.com.cn/aurora/assets/d940438c2f7b4a931d1e81df1a096a829e43d3be.svga",
"uuid": "25dc07d0-b223-4bab-8ea6-2f3282d4eb44",
"ext": ".svga"
},
{
"name": "跳上升",
"url": "//yun.duiba.com.cn/aurora/assets/99511df167598a8941dae2eccc774e793e3f3259.svga",
"uuid": "2604a92a-4ea4-4ae3-80fb-c0f8b0e34bb5",
"ext": ".svga"
},
{
"name": "跳下落",
"url": "//yun.duiba.com.cn/aurora/assets/9b05e37a4a269403b7ae996373c6a9346b6708f5.svga",
"uuid": "001a634e-5aa7-41de-aa35-0a7ce4bab6a2",
"ext": ".svga"
},
{
"name": "普通着地",
"url": "//yun.duiba.com.cn/aurora/assets/8547b977dcdad544ecac899ecc0374d136f0b3e9.svga",
"uuid": "99054cf7-9aee-4b90-a5c6-ef25787f46e5",
"ext": ".svga"
},
{
"name": "完美着地_笑",
"url": "//yun.duiba.com.cn/aurora/assets/ded47e8a1381e2c44cca4f717d320809197cae07.svga",
"uuid": "9ce4bfd2-bb67-4f74-a384-64be878c4396",
"ext": ".svga"
},
{
"name": "着地特效",
"url": "//yun.duiba.com.cn/aurora/assets/f5a28ac3ef8acb9adc1ea59faf93213b56a797a0.svga",
"uuid": "cc3f6f1b-1dad-4023-a040-0c7c2ef0ca41",
"ext": ".svga"
},
{
"name": "完美着地特效",
"url": "//yun.duiba.com.cn/aurora/assets/38c1dd059b7d6818fedbadc9c9bbc043fdb2abfa.svga",
"uuid": "30d98a94-8f12-4060-9b57-f63e316f0810",
"ext": ".svga"
},
{
"name": "边缘着地",
"url": "//yun.duiba.com.cn/aurora/assets/c3232de2bac56e88f34967890e8e513fd235bf82.svga",
"uuid": "aec9d063-c95c-40ae-b0b5-bd7140fc70b4",
"ext": ".svga"
},
{
"name": "被撞开",
"url": "//yun.duiba.com.cn/aurora/assets/4f7a39fdc470bde9dbf1c43e1fa591ecc31aa326.svga",
"uuid": "67daf7c4-158b-4ec5-8383-00e3525d2714",
"ext": ".svga"
},
{
"name": "被撞烟雾",
"url": "//yun.duiba.com.cn/aurora/assets/877bb5204007ee57f14b647326c7de5c418ecc8d.svga",
"uuid": "93ccd75b-d690-4b8a-b071-2b9565be5c7a",
"ext": ".svga"
},
{
"name": "降落",
"url": "//yun.duiba.com.cn/aurora/assets/8615c022ce4068983a74a680849f426a5df98290.svga",
"uuid": "82b514a9-69c4-425c-a77d-f34efeef1997",
"ext": ".svga"
},
{
"name": "钱袋-静态",
"url": "//yun.duiba.com.cn/aurora/assets/c5d04d5caf2dc812baeebdd34ea1abb17d183f44.png",
"uuid": "80a6f0f2-7934-4b2b-a1af-c566dae1040f",
"ext": ".png"
},
{
"name": "钱袋",
"url": "//yun.duiba.com.cn/aurora/assets/54b77086943a59fd84cc00f0b88e7396724df95d.svga",
"uuid": "3b7feeae-ebb5-49cf-b838-64f46c585978",
"ext": ".svga"
},
{
"name": "跳起音效",
"url": "//yun.duiba.com.cn/aurora/assets/8e3c6af83c20daff6ad34ff198413f0be4903039.mp3",
"uuid": "f9826065-0815-4b6d-be7f-b28478975c68",
"ext": ".mp3"
},
{
"name": "普通落地音效",
"url": "//yun.duiba.com.cn/aurora/assets/b83729366abd4c6aed590bf40bb3ad15e806c8d5.mp3",
"uuid": "dd2a8a0b-18ea-49a7-841d-221e1a3d2d50",
"ext": ".mp3"
},
{
"name": "边缘落地音效",
"url": "//yun.duiba.com.cn/aurora/assets/069079dea1901151594684de3ef294925556c1c3.mp3",
"uuid": "44bfc5ac-0093-4b40-8c8f-cef3000fb436",
"ext": ".mp3"
},
{
"name": "被撞开音效",
"url": "//yun.duiba.com.cn/aurora/assets/6f19e09e8a5300d59b069ed55b82ab8f8b876dc6.mp3",
"uuid": "f7cbf9ef-76b5-4ae8-9e05-680a3b0d223f",
"ext": ".mp3"
},
{
"name": "完美落地音效1",
"url": "//yun.duiba.com.cn/aurora/assets/c492aa71c3f385ae179977b328ec3d93c4c085e2.mp3",
"uuid": "8f5fea1d-d11f-4fd1-a27a-85b0145d54e5",
"ext": ".mp3"
},
{
"name": "完美落地音效2",
"url": "//yun.duiba.com.cn/aurora/assets/317e268d07cefddc69309941e38dbcf7d48f8ebc.mp3",
"uuid": "7452d198-9ab2-46e2-99e2-877fdce9fbe1",
"ext": ".mp3"
},
{
"name": "完美落地音效3",
"url": "//yun.duiba.com.cn/aurora/assets/5e7795c318bdf5357441085d0c681221274a72a9.mp3",
"uuid": "81209b74-d23a-4250-8695-284e9d9a6c00",
"ext": ".mp3"
},
{
"name": "完美落地音效4",
"url": "//yun.duiba.com.cn/aurora/assets/7a62f51f550ea3968fe080ee56abf28be8a92f8c.mp3",
"uuid": "ff87ce4f-c3bd-49ec-b890-4215bedb921d",
"ext": ".mp3"
},
{
"name": "降落伞下落音效",
"url": "//yun.duiba.com.cn/aurora/assets/eb4246b47a8fc2c5707d764bee2cd6a710bdc13e.mp3",
"uuid": "adb5d3ab-143f-4648-a2c4-ff794aceb2fd",
"ext": ".mp3"
},
{
"name": "撞击钱袋音效",
"url": "//yun.duiba.com.cn/aurora/assets/a6e1c99e49f258a42d65ac00b81c5a2b103aa172.mp3",
"uuid": "f06fb9b4-ef76-43ff-80ad-0f920e2ce69c",
"ext": ".mp3"
}
],
"events": {
"in": {
"jump-high-reset": {
"alias": "重置"
},
"jump-high-start": {
"alias": "开始"
},
"jump-high-revive": {
"alias": "复活"
},
"jump-high-pause": {
"alias": "暂停"
},
"jump-high-resume": {
"alias": "恢复"
}
},
"out": {
"jump-high-game-start": {
"alias": "游戏开始",
"data": {
}
},
"jump-high-game-end": {
"alias": "游戏结束",
"data": {
}
},
"jump-high-score": {
"alias": "分数变化",
"data": {
"type": "类型(0:完美,1:仅中央,2:正常,3:边缘,4:钱袋)",
"score": "分数",
"scoreAdd": "增值分数"
}
}
}
}
}
\ No newline at end of file
{
"name": "叠叠高(新)",
"desc": "叠叠高模块",
"props": {
"guideText": {
"alias": "引导文本",
"type": "string",
"default": "点击屏幕跳跃躲避飞来的钞票"
},
"guideFlagKey": {
"alias": "引导标识名",
"type": "string",
"default": "test"
},
"scoreWeights": {
"alias": "分值权重(完美,仅中央,正常,边缘,福袋)",
"type": "array<number>",
"default": "4,2,1,1,5"
},
"jumpTips": {
"alias": "跳动提示文案",
"type": "array<string>",
"default": "勤洗手,早睡早起,均衡饮食,定时活动,多喝开水,多看书,少熬夜,坚持午觉,多思考,常微笑,少喝咖啡,听听音乐,坚持刷牙,注意防晒,远离烟草,定期体检,重视早餐,保护肩颈,常吃水果,平衡心理"
},
"goldBagScoreMultiple": {
"alias": "出现钱袋的分数倍数",
"type": "number",
"default": 30
},
"goldBagScoreSubtraction": {
"alias": "出现钱袋的分数补偿",
"type": "number",
"default": 5
},
"goldBagDistance": {
"alias": "出现钱袋的距离",
"type": "number",
"default": 10
},
"goldBagJumpSubtraction": {
"alias": "跳起触碰钱袋高度偏差",
"type": "number",
"default": 5
},
"blockAssets": {
"alias": "方块素材组",
"type": "array<string>",
"default": "方块素材0"
},
"blockHitAssets": {
"alias": "方块素材组撞击状态",
"type": "array<string>",
"default": "方块素材0_hit"
},
"blockHitOffsetY": {
"alias": "方块素材组撞击状态Y轴锚点",
"type": "number",
"default": 75
},
"blockProfectOffset": {
"alias": "方块素材组完美状态锚点",
"type": "vector2",
"default": "-100,35"
},
"blockBaseOffset": {
"alias": "初始方块偏移",
"type": "number",
"default": -40
},
"blockShadowOffset": {
"alias": "初始方块阴影偏移",
"type": "number",
"default": 100
},
"blockDurationRange": {
"alias": "方块进入时间范围",
"type": "array<number>",
"default": "500,1500"
},
"blockDurationRandom": {
"alias": "方块进入时间随机系数",
"type": "number",
"default": 0.2
},
"blockDurationStep": {
"alias": "方块进入时间递减",
"type": "number",
"default": 20
},
"gravity": {
"alias": "下落加速度",
"type": "number",
"default": 1.8
},
"scoreThreshold": {
"alias": "分数阈值数组",
"type": "number",
"default": 130
},
"blockWidth": {
"alias": "方块宽度",
"type": "number",
"default": 396
},
"blockHitWidth": {
"alias": "方块碰撞宽度",
"type": "number",
"default": 312
},
"blockHitHeight": {
"alias": "方块碰撞高度",
"type": "number",
"default": 66
},
"blockPaddingTop": {
"alias": "方块上边距",
"type": "number",
"default": 100
},
"blockPaddingBottom": {
"alias": "方块下边距",
"type": "number",
"default": 64
},
"minScale": {
"alias": "最小缩放比例",
"type": "number",
"default": 0.4
},
"maxScale": {
"alias": "最大缩放比例",
"type": "number",
"default": 0.7
},
"baseOffset": {
"alias": "底座偏移",
"type": "number",
"default": 500
},
"playerOffset": {
"alias": "角色偏移",
"type": "number",
"default": 120
},
"initBlockCount": {
"alias": "初始方块数量",
"type": "number",
"default": 1
},
"playerWidth": {
"alias": "角色宽度",
"type": "number",
"default": 100
},
"playerShadowOffset": {
"alias": "初始角色阴影偏移",
"type": "number",
"default": 45
},
"scoreAddTipsOffset": {
"alias": "加分提示偏移",
"type": "number",
"default": -130
},
"scoreAddFontColor": {
"alias": "加分提示字体颜色",
"type": "string",
"default": "blue"
},
"scoreAddFontSize": {
"alias": "加分提示字体颜色",
"type": "number",
"default": 50
},
"jumpTipsOffset": {
"alias": "跳跃文案偏移",
"type": "vector2",
"default": "-130,-200"
},
"parachuteDistance": {
"alias": "降落距离",
"type": "number",
"default": 250
},
"jumpSpeed": {
"alias": "挑起速度",
"type": "number",
"default": 30
},
"parachuteDuration": {
"alias": "降落时间",
"type": "number",
"default": 3000
},
"hitAwayDistance": {
"alias": "撞开距离",
"type": "vector2",
"default": "250,50"
},
"hitAwayDuration": {
"alias": "撞开时间",
"type": "number",
"default": 1000
},
"playerReadyAnchor": {
"alias": "角色准备锚点",
"type": "vector2",
"default": "150,210"
},
"playerReady2Anchor": {
"alias": "角色准备2锚点",
"type": "vector2",
"default": "150,210"
},
"playerJumpAnchor": {
"alias": "角色跳起锚点",
"type": "vector2",
"default": "150,210"
},
"playerFallAnchor": {
"alias": "角色下落锚点",
"type": "vector2",
"default": "150,210"
},
"playerHitAnchor": {
"alias": "角色撞开锚点",
"type": "vector2",
"default": "150,210"
},
"playerParachuteAnchor": {
"alias": "角色降落锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandNormalAnchor": {
"alias": "角色正常落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandPerfectAnchor": {
"alias": "角色完美落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandEffectAnchor": {
"alias": "角色落地特效锚点",
"type": "vector2",
"default": "310,100"
},
"playerLandSideAnchor": {
"alias": "角色边缘落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandPrefectAnchor": {
"alias": "角色完美落地锚点",
"type": "vector2",
"default": "160,900"
},
"hitEffectAnchor": {
"alias": "被撞烟雾锚点",
"type": "vector2",
"default": "150,150"
},
"goldPackAnchor": {
"alias": "钱袋锚点",
"type": "vector2",
"default": "375,300"
},
"goldPackAvatarAnchor": {
"alias": "静态钱袋锚点",
"type": "vector2",
"default": "850,598"
}
},
"assets": [
{
"name": "跳跃提示背景",
"url": "//yun.duiba.com.cn/aurora/assets/93646ba4e8e57adc64350c7ef78a9bff1f8c1aa9.png",
"uuid": "ff98fa3d-f37d-4be4-aa4f-0f1322cbd676",
"ext": ".png"
},
{
"name": "完美方块素材",
"url": "//yun.duiba.com.cn/aurora/assets/e2150383e8391a2972bc43fd888e4c1250e1933a.svga",
"uuid": "7499df87-4155-406b-8c2b-fea972719f39",
"ext": ".svga"
},
{
"name": "方块阴影",
"url": "//yun.duiba.com.cn/aurora/assets/c8ba94dcc9d10d4e0469ce79caed4e767b64f7e2.png",
"uuid": "c0d03a20-24aa-4886-b83b-9c1149591921",
"ext": ".png"
},
{
"name": "玩家阴影",
"url": "//yun.duiba.com.cn/aurora/assets/165612a992e4b469052d9becf1120670e7b0a307.png",
"uuid": "b4c18858-c43d-49a0-99d1-7b48fd2f24ba",
"ext": ".png"
},
{
"name": "背景图",
"url": "//yun.duiba.com.cn/aurora/assets/6bbdb3fc12e4015fd60485c9add4ee102e2d1ce2.jpg",
"uuid": "43618417-f27f-429c-bba3-e0715e552ca2",
"ext": ".jpg"
},
{
"name": "底座",
"url": "//yun.duiba.com.cn/aurora/assets/762e12b14dbdcda1a6a9dc09e79c1d0da08e60a6.png",
"uuid": "a6b3f654-2c26-434a-a873-aabc12cd1d80",
"ext": ".png"
},
{
"name": "引导遮罩",
"url": "//yun.duiba.com.cn/aurora/assets/75cc4ea91654fd1e9900d071cac5ca5296b1bd19.png",
"uuid": "6879e370-59c1-453c-8d61-cd3d724ea650",
"ext": ".png"
},
{
"name": "准备立正",
"url": "//yun.duiba.com.cn/aurora/assets/d940438c2f7b4a931d1e81df1a096a829e43d3be.svga",
"uuid": "25dc07d0-b223-4bab-8ea6-2f3282d4eb44",
"ext": ".svga"
},
{
"name": "跳上升",
"url": "//yun.duiba.com.cn/aurora/assets/99511df167598a8941dae2eccc774e793e3f3259.svga",
"uuid": "2604a92a-4ea4-4ae3-80fb-c0f8b0e34bb5",
"ext": ".svga"
},
{
"name": "跳下落",
"url": "//yun.duiba.com.cn/aurora/assets/9b05e37a4a269403b7ae996373c6a9346b6708f5.svga",
"uuid": "001a634e-5aa7-41de-aa35-0a7ce4bab6a2",
"ext": ".svga"
},
{
"name": "普通着地",
"url": "//yun.duiba.com.cn/aurora/assets/8547b977dcdad544ecac899ecc0374d136f0b3e9.svga",
"uuid": "99054cf7-9aee-4b90-a5c6-ef25787f46e5",
"ext": ".svga"
},
{
"name": "完美着地_笑",
"url": "//yun.duiba.com.cn/aurora/assets/ded47e8a1381e2c44cca4f717d320809197cae07.svga",
"uuid": "9ce4bfd2-bb67-4f74-a384-64be878c4396",
"ext": ".svga"
},
{
"name": "着地特效",
"url": "//yun.duiba.com.cn/aurora/assets/f5a28ac3ef8acb9adc1ea59faf93213b56a797a0.svga",
"uuid": "cc3f6f1b-1dad-4023-a040-0c7c2ef0ca41",
"ext": ".svga"
},
{
"name": "完美着地特效",
"url": "//yun.duiba.com.cn/aurora/assets/38c1dd059b7d6818fedbadc9c9bbc043fdb2abfa.svga",
"uuid": "30d98a94-8f12-4060-9b57-f63e316f0810",
"ext": ".svga"
},
{
"name": "边缘着地",
"url": "//yun.duiba.com.cn/aurora/assets/c3232de2bac56e88f34967890e8e513fd235bf82.svga",
"uuid": "aec9d063-c95c-40ae-b0b5-bd7140fc70b4",
"ext": ".svga"
},
{
"name": "被撞开",
"url": "//yun.duiba.com.cn/aurora/assets/4f7a39fdc470bde9dbf1c43e1fa591ecc31aa326.svga",
"uuid": "67daf7c4-158b-4ec5-8383-00e3525d2714",
"ext": ".svga"
},
{
"name": "被撞烟雾",
"url": "//yun.duiba.com.cn/aurora/assets/877bb5204007ee57f14b647326c7de5c418ecc8d.svga",
"uuid": "93ccd75b-d690-4b8a-b071-2b9565be5c7a",
"ext": ".svga"
},
{
"name": "降落",
"url": "//yun.duiba.com.cn/aurora/assets/8615c022ce4068983a74a680849f426a5df98290.svga",
"uuid": "82b514a9-69c4-425c-a77d-f34efeef1997",
"ext": ".svga"
},
{
"name": "钱袋-静态",
"url": "//yun.duiba.com.cn/aurora/assets/c5d04d5caf2dc812baeebdd34ea1abb17d183f44.png",
"uuid": "80a6f0f2-7934-4b2b-a1af-c566dae1040f",
"ext": ".png"
},
{
"name": "钱袋",
"url": "//yun.duiba.com.cn/aurora/assets/54b77086943a59fd84cc00f0b88e7396724df95d.svga",
"uuid": "3b7feeae-ebb5-49cf-b838-64f46c585978",
"ext": ".svga"
},
{
"name": "跳起音效",
"url": "//yun.duiba.com.cn/aurora/assets/8e3c6af83c20daff6ad34ff198413f0be4903039.mp3",
"uuid": "f9826065-0815-4b6d-be7f-b28478975c68",
"ext": ".mp3"
},
{
"name": "普通落地音效",
"url": "//yun.duiba.com.cn/aurora/assets/b83729366abd4c6aed590bf40bb3ad15e806c8d5.mp3",
"uuid": "dd2a8a0b-18ea-49a7-841d-221e1a3d2d50",
"ext": ".mp3"
},
{
"name": "边缘落地音效",
"url": "//yun.duiba.com.cn/aurora/assets/069079dea1901151594684de3ef294925556c1c3.mp3",
"uuid": "44bfc5ac-0093-4b40-8c8f-cef3000fb436",
"ext": ".mp3"
},
{
"name": "被撞开音效",
"url": "//yun.duiba.com.cn/aurora/assets/6f19e09e8a5300d59b069ed55b82ab8f8b876dc6.mp3",
"uuid": "f7cbf9ef-76b5-4ae8-9e05-680a3b0d223f",
"ext": ".mp3"
},
{
"name": "完美落地音效1",
"url": "//yun.duiba.com.cn/aurora/assets/c492aa71c3f385ae179977b328ec3d93c4c085e2.mp3",
"uuid": "8f5fea1d-d11f-4fd1-a27a-85b0145d54e5",
"ext": ".mp3"
},
{
"name": "完美落地音效2",
"url": "//yun.duiba.com.cn/aurora/assets/317e268d07cefddc69309941e38dbcf7d48f8ebc.mp3",
"uuid": "7452d198-9ab2-46e2-99e2-877fdce9fbe1",
"ext": ".mp3"
},
{
"name": "完美落地音效3",
"url": "//yun.duiba.com.cn/aurora/assets/5e7795c318bdf5357441085d0c681221274a72a9.mp3",
"uuid": "81209b74-d23a-4250-8695-284e9d9a6c00",
"ext": ".mp3"
},
{
"name": "完美落地音效4",
"url": "//yun.duiba.com.cn/aurora/assets/7a62f51f550ea3968fe080ee56abf28be8a92f8c.mp3",
"uuid": "ff87ce4f-c3bd-49ec-b890-4215bedb921d",
"ext": ".mp3"
},
{
"name": "降落伞下落音效",
"url": "//yun.duiba.com.cn/aurora/assets/eb4246b47a8fc2c5707d764bee2cd6a710bdc13e.mp3",
"uuid": "adb5d3ab-143f-4648-a2c4-ff794aceb2fd",
"ext": ".mp3"
},
{
"name": "撞击钱袋音效",
"url": "//yun.duiba.com.cn/aurora/assets/a6e1c99e49f258a42d65ac00b81c5a2b103aa172.mp3",
"uuid": "f06fb9b4-ef76-43ff-80ad-0f920e2ce69c",
"ext": ".mp3"
}
],
"events": {
"in": {
"jump-high-reset": {
"alias": "重置"
},
"jump-high-start": {
"alias": "开始"
},
"jump-high-revive": {
"alias": "复活"
},
"jump-high-pause": {
"alias": "暂停"
},
"jump-high-resume": {
"alias": "恢复"
}
},
"out": {
"jump-high-game-start": {
"alias": "游戏开始",
"data": {
}
},
"jump-high-game-end": {
"alias": "游戏结束",
"data": {
}
},
"jump-high-score": {
"alias": "分数变化",
"data": {
"type": "类型(0:完美,1:仅中央,2:正常,3:边缘,4:钱袋)",
"score": "分数",
"scoreAdd": "增值分数"
}
}
}
}
}
\ No newline at end of file
{
"name": "叠叠高(新)",
"desc": "叠叠高模块",
"props": {
"guideText": {
"alias": "引导文本",
"type": "string",
"default": "点击屏幕跳跃躲避飞来的钞票"
},
"guideFlagKey": {
"alias": "引导标识名",
"type": "string",
"default": "test"
},
"scoreWeights": {
"alias": "分值权重(完美,仅中央,正常,边缘,福袋)",
"type": "array<number>",
"default": "4,2,1,1,5"
},
"jumpTips": {
"alias": "跳动提示文案",
"type": "array<string>",
"default": "勤洗手,早睡早起,均衡饮食,定时活动,多喝开水,多看书,少熬夜,坚持午觉,多思考,常微笑,少喝咖啡,听听音乐,坚持刷牙,注意防晒,远离烟草,定期体检,重视早餐,保护肩颈,常吃水果,平衡心理"
},
"goldBagScoreMultiple": {
"alias": "出现钱袋的分数倍数",
"type": "number",
"default": 30
},
"goldBagScoreSubtraction": {
"alias": "出现钱袋的分数补偿",
"type": "number",
"default": 5
},
"goldBagDistance": {
"alias": "出现钱袋的距离",
"type": "number",
"default": 10
},
"goldBagJumpSubtraction": {
"alias": "跳起触碰钱袋高度偏差",
"type": "number",
"default": 5
},
"blockAssets": {
"alias": "方块素材组",
"type": "array<string>",
"default": "方块素材0"
},
"blockHitAssets": {
"alias": "方块素材组撞击状态",
"type": "array<string>",
"default": "方块素材0_hit"
},
"blockHitOffsetY": {
"alias": "方块素材组撞击状态Y轴锚点",
"type": "number",
"default": 75
},
"blockProfectOffset": {
"alias": "方块素材组完美状态锚点",
"type": "vector2",
"default": "-100,35"
},
"blockBaseOffset": {
"alias": "初始方块偏移",
"type": "number",
"default": -40
},
"blockShadowOffset": {
"alias": "初始方块阴影偏移",
"type": "number",
"default": 100
},
"blockDurationRange": {
"alias": "方块进入时间范围",
"type": "array<number>",
"default": "500,1500"
},
"blockDurationRandom": {
"alias": "方块进入时间随机系数",
"type": "number",
"default": 0.2
},
"blockDurationStep": {
"alias": "方块进入时间递减",
"type": "number",
"default": 20
},
"gravity": {
"alias": "下落加速度",
"type": "number",
"default": 1.8
},
"scoreThreshold": {
"alias": "分数阈值数组",
"type": "number",
"default": 130
},
"blockWidth": {
"alias": "方块宽度",
"type": "number",
"default": 396
},
"blockHitWidth": {
"alias": "方块碰撞宽度",
"type": "number",
"default": 312
},
"blockHitHeight": {
"alias": "方块碰撞高度",
"type": "number",
"default": 66
},
"blockPaddingTop": {
"alias": "方块上边距",
"type": "number",
"default": 100
},
"blockPaddingBottom": {
"alias": "方块下边距",
"type": "number",
"default": 64
},
"minScale": {
"alias": "最小缩放比例",
"type": "number",
"default": 0.4
},
"maxScale": {
"alias": "最大缩放比例",
"type": "number",
"default": 0.7
},
"baseOffset": {
"alias": "底座偏移",
"type": "number",
"default": 500
},
"playerOffset": {
"alias": "角色偏移",
"type": "number",
"default": 120
},
"initBlockCount": {
"alias": "初始方块数量",
"type": "number",
"default": 1
},
"playerWidth": {
"alias": "角色宽度",
"type": "number",
"default": 100
},
"playerShadowOffset": {
"alias": "初始角色阴影偏移",
"type": "number",
"default": 45
},
"scoreAddTipsOffset": {
"alias": "加分提示偏移",
"type": "number",
"default": -130
},
"scoreAddFontColor": {
"alias": "加分提示字体颜色",
"type": "string",
"default": "#fc4454"
},
"scoreAddFontSize": {
"alias": "加分提示字体颜色",
"type": "number",
"default": 50
},
"jumpTipsOffset": {
"alias": "跳跃文案偏移",
"type": "vector2",
"default": "-130,-200"
},
"parachuteDistance": {
"alias": "降落距离",
"type": "number",
"default": 250
},
"jumpSpeed": {
"alias": "挑起速度",
"type": "number",
"default": 30
},
"parachuteDuration": {
"alias": "降落时间",
"type": "number",
"default": 3000
},
"hitAwayDistance": {
"alias": "撞开距离",
"type": "vector2",
"default": "250,50"
},
"hitAwayDuration": {
"alias": "撞开时间",
"type": "number",
"default": 1000
},
"playerReadyAnchor": {
"alias": "角色准备锚点",
"type": "vector2",
"default": "150,210"
},
"playerReady2Anchor": {
"alias": "角色准备2锚点",
"type": "vector2",
"default": "150,210"
},
"playerJumpAnchor": {
"alias": "角色跳起锚点",
"type": "vector2",
"default": "150,210"
},
"playerFallAnchor": {
"alias": "角色下落锚点",
"type": "vector2",
"default": "150,210"
},
"playerHitAnchor": {
"alias": "角色撞开锚点",
"type": "vector2",
"default": "150,210"
},
"playerParachuteAnchor": {
"alias": "角色降落锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandNormalAnchor": {
"alias": "角色正常落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandPerfectAnchor": {
"alias": "角色完美落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandEffectAnchor": {
"alias": "角色落地特效锚点",
"type": "vector2",
"default": "310,100"
},
"playerLandSideAnchor": {
"alias": "角色边缘落地锚点",
"type": "vector2",
"default": "150,210"
},
"playerLandPrefectAnchor": {
"alias": "角色完美落地锚点",
"type": "vector2",
"default": "160,900"
},
"hitEffectAnchor": {
"alias": "被撞烟雾锚点",
"type": "vector2",
"default": "150,150"
},
"goldPackAnchor": {
"alias": "钱袋锚点",
"type": "vector2",
"default": "375,300"
},
"goldPackAvatarAnchor": {
"alias": "静态钱袋锚点",
"type": "vector2",
"default": "850,598"
}
},
"assets": [
{
"name": "跳跃提示背景",
"url": "//yun.duiba.com.cn/aurora/assets/93646ba4e8e57adc64350c7ef78a9bff1f8c1aa9.png",
"uuid": "ff98fa3d-f37d-4be4-aa4f-0f1322cbd676",
"ext": ".png"
},
{
"name": "完美方块素材",
"url": "//yun.duiba.com.cn/aurora/assets/e2150383e8391a2972bc43fd888e4c1250e1933a.svga",
"uuid": "7499df87-4155-406b-8c2b-fea972719f39",
"ext": ".svga"
},
{
"name": "方块阴影",
"url": "//yun.duiba.com.cn/aurora/assets/c8ba94dcc9d10d4e0469ce79caed4e767b64f7e2.png",
"uuid": "c0d03a20-24aa-4886-b83b-9c1149591921",
"ext": ".png"
},
{
"name": "玩家阴影",
"url": "//yun.duiba.com.cn/aurora/assets/165612a992e4b469052d9becf1120670e7b0a307.png",
"uuid": "b4c18858-c43d-49a0-99d1-7b48fd2f24ba",
"ext": ".png"
},
{
"name": "背景图",
"url": "//yun.duiba.com.cn/aurora/assets/6bbdb3fc12e4015fd60485c9add4ee102e2d1ce2.jpg",
"uuid": "43618417-f27f-429c-bba3-e0715e552ca2",
"ext": ".jpg"
},
{
"name": "底座",
"url": "//yun.duiba.com.cn/aurora/assets/762e12b14dbdcda1a6a9dc09e79c1d0da08e60a6.png",
"uuid": "a6b3f654-2c26-434a-a873-aabc12cd1d80",
"ext": ".png"
},
{
"name": "引导遮罩",
"url": "//yun.duiba.com.cn/aurora/assets/75cc4ea91654fd1e9900d071cac5ca5296b1bd19.png",
"uuid": "6879e370-59c1-453c-8d61-cd3d724ea650",
"ext": ".png"
},
{
"name": "准备立正",
"url": "//yun.duiba.com.cn/aurora/assets/d940438c2f7b4a931d1e81df1a096a829e43d3be.svga",
"uuid": "25dc07d0-b223-4bab-8ea6-2f3282d4eb44",
"ext": ".svga"
},
{
"name": "跳上升",
"url": "//yun.duiba.com.cn/aurora/assets/99511df167598a8941dae2eccc774e793e3f3259.svga",
"uuid": "2604a92a-4ea4-4ae3-80fb-c0f8b0e34bb5",
"ext": ".svga"
},
{
"name": "跳下落",
"url": "//yun.duiba.com.cn/aurora/assets/9b05e37a4a269403b7ae996373c6a9346b6708f5.svga",
"uuid": "001a634e-5aa7-41de-aa35-0a7ce4bab6a2",
"ext": ".svga"
},
{
"name": "普通着地",
"url": "//yun.duiba.com.cn/aurora/assets/8547b977dcdad544ecac899ecc0374d136f0b3e9.svga",
"uuid": "99054cf7-9aee-4b90-a5c6-ef25787f46e5",
"ext": ".svga"
},
{
"name": "完美着地_笑",
"url": "//yun.duiba.com.cn/aurora/assets/ded47e8a1381e2c44cca4f717d320809197cae07.svga",
"uuid": "9ce4bfd2-bb67-4f74-a384-64be878c4396",
"ext": ".svga"
},
{
"name": "着地特效",
"url": "//yun.duiba.com.cn/aurora/assets/f5a28ac3ef8acb9adc1ea59faf93213b56a797a0.svga",
"uuid": "cc3f6f1b-1dad-4023-a040-0c7c2ef0ca41",
"ext": ".svga"
},
{
"name": "完美着地特效",
"url": "//yun.duiba.com.cn/aurora/assets/38c1dd059b7d6818fedbadc9c9bbc043fdb2abfa.svga",
"uuid": "30d98a94-8f12-4060-9b57-f63e316f0810",
"ext": ".svga"
},
{
"name": "边缘着地",
"url": "//yun.duiba.com.cn/aurora/assets/c3232de2bac56e88f34967890e8e513fd235bf82.svga",
"uuid": "aec9d063-c95c-40ae-b0b5-bd7140fc70b4",
"ext": ".svga"
},
{
"name": "被撞开",
"url": "//yun.duiba.com.cn/aurora/assets/4f7a39fdc470bde9dbf1c43e1fa591ecc31aa326.svga",
"uuid": "67daf7c4-158b-4ec5-8383-00e3525d2714",
"ext": ".svga"
},
{
"name": "被撞烟雾",
"url": "//yun.duiba.com.cn/aurora/assets/877bb5204007ee57f14b647326c7de5c418ecc8d.svga",
"uuid": "93ccd75b-d690-4b8a-b071-2b9565be5c7a",
"ext": ".svga"
},
{
"name": "降落",
"url": "//yun.duiba.com.cn/aurora/assets/8615c022ce4068983a74a680849f426a5df98290.svga",
"uuid": "82b514a9-69c4-425c-a77d-f34efeef1997",
"ext": ".svga"
},
{
"name": "钱袋-静态",
"url": "//yun.duiba.com.cn/aurora/assets/c5d04d5caf2dc812baeebdd34ea1abb17d183f44.png",
"uuid": "80a6f0f2-7934-4b2b-a1af-c566dae1040f",
"ext": ".png"
},
{
"name": "钱袋",
"url": "//yun.duiba.com.cn/aurora/assets/54b77086943a59fd84cc00f0b88e7396724df95d.svga",
"uuid": "3b7feeae-ebb5-49cf-b838-64f46c585978",
"ext": ".svga"
},
{
"name": "跳起音效",
"url": "//yun.duiba.com.cn/aurora/assets/8e3c6af83c20daff6ad34ff198413f0be4903039.mp3",
"uuid": "f9826065-0815-4b6d-be7f-b28478975c68",
"ext": ".mp3"
},
{
"name": "普通落地音效",
"url": "//yun.duiba.com.cn/aurora/assets/b83729366abd4c6aed590bf40bb3ad15e806c8d5.mp3",
"uuid": "dd2a8a0b-18ea-49a7-841d-221e1a3d2d50",
"ext": ".mp3"
},
{
"name": "边缘落地音效",
"url": "//yun.duiba.com.cn/aurora/assets/069079dea1901151594684de3ef294925556c1c3.mp3",
"uuid": "44bfc5ac-0093-4b40-8c8f-cef3000fb436",
"ext": ".mp3"
},
{
"name": "被撞开音效",
"url": "//yun.duiba.com.cn/aurora/assets/6f19e09e8a5300d59b069ed55b82ab8f8b876dc6.mp3",
"uuid": "f7cbf9ef-76b5-4ae8-9e05-680a3b0d223f",
"ext": ".mp3"
},
{
"name": "完美落地音效1",
"url": "//yun.duiba.com.cn/aurora/assets/c492aa71c3f385ae179977b328ec3d93c4c085e2.mp3",
"uuid": "8f5fea1d-d11f-4fd1-a27a-85b0145d54e5",
"ext": ".mp3"
},
{
"name": "完美落地音效2",
"url": "//yun.duiba.com.cn/aurora/assets/317e268d07cefddc69309941e38dbcf7d48f8ebc.mp3",
"uuid": "7452d198-9ab2-46e2-99e2-877fdce9fbe1",
"ext": ".mp3"
},
{
"name": "完美落地音效3",
"url": "//yun.duiba.com.cn/aurora/assets/5e7795c318bdf5357441085d0c681221274a72a9.mp3",
"uuid": "81209b74-d23a-4250-8695-284e9d9a6c00",
"ext": ".mp3"
},
{
"name": "完美落地音效4",
"url": "//yun.duiba.com.cn/aurora/assets/7a62f51f550ea3968fe080ee56abf28be8a92f8c.mp3",
"uuid": "ff87ce4f-c3bd-49ec-b890-4215bedb921d",
"ext": ".mp3"
},
{
"name": "降落伞下落音效",
"url": "//yun.duiba.com.cn/aurora/assets/eb4246b47a8fc2c5707d764bee2cd6a710bdc13e.mp3",
"uuid": "adb5d3ab-143f-4648-a2c4-ff794aceb2fd",
"ext": ".mp3"
},
{
"name": "撞击钱袋音效",
"url": "//yun.duiba.com.cn/aurora/assets/a6e1c99e49f258a42d65ac00b81c5a2b103aa172.mp3",
"uuid": "f06fb9b4-ef76-43ff-80ad-0f920e2ce69c",
"ext": ".mp3"
}
],
"events": {
"in": {
"jump-high-reset": {
"alias": "重置"
},
"jump-high-start": {
"alias": "开始"
},
"jump-high-revive": {
"alias": "复活"
},
"jump-high-pause": {
"alias": "暂停"
},
"jump-high-resume": {
"alias": "恢复"
}
},
"out": {
"jump-high-game-start": {
"alias": "游戏开始",
"data": {
}
},
"jump-high-game-end": {
"alias": "游戏结束",
"data": {
}
},
"jump-high-score": {
"alias": "分数变化",
"data": {
"type": "类型(0:完美,1:仅中央,2:正常,3:边缘,4:钱袋)",
"score": "分数",
"scoreAdd": "增值分数"
}
}
}
}
}
\ No newline at end of file
/**
* Created by rockyl on 2018/8/16.
*/
import Block from "./Block";
import {Background} from "./Background";
import Player from "./Player";
import {props} from "../props";
import {createSvga, getTextureByName, playSound} from "./utils";
import {Base} from "./Base";
import {GuideLayer} from "./GuideLayer";
import {GoldBag} from "./GoldBag";
import ObjectPool = engine.ObjectPool;
import { JumpTips } from "./JumpTips";
const PoolName: string = 'gold-bag';
ObjectPool.registerPool(PoolName, function () {
return new GoldBag();
}, function (item: GoldBag, data) {
item.reset(data);
});
export default class GameView extends engine.Container {
background: Background;
base: Base;
frontContainer: engine.Container;
blockContainer: engine.Container;
guideLayer: GuideLayer;
player: Player;
hitEffect: svga.Svga;
currentBlock: Block;
needHitTest;
index = -1;
blockComplete;
baseOffset: number;
scoreAddTipsContainer;
jumpTips
timer;
_pos;
_score;
_remainToShowGoldBag;
_blockShadow
_playerShadow
lastLandType;
scoreAddTips
_touchEnabled;
private _hasSetup;
constructor() {
super();
this.baseOffset = -props.baseOffset + props.playerOffset;
this.once(engine.Event.ADDED_TO_STAGE, this.setup, this);
}
setup() {
if (this._hasSetup) {
return;
}
this._hasSetup = true;
const {width, height} = this.stage;
const background = this.background = new Background();
this.addChild(background);
background.setup();
const frontContainer = this.frontContainer = new engine.Container();
frontContainer.x = width / 2;
this.addChild(frontContainer);
const guideLayer = this.guideLayer = new GuideLayer();
this.addChild(guideLayer);
const base = this.base = new Base();
frontContainer.addChild(base);
base.setup();
let blockShadow = this._blockShadow = new engine.Image(getTextureByName('方块阴影'));
blockShadow.anchorX = blockShadow.width / 2;
blockShadow.anchorY = blockShadow.height / 2;
blockShadow.x = -(blockShadow.width - base.width) / 2;
blockShadow.y =props.blockShadowOffset;
base.addChild(blockShadow);
const blockContainer = this.blockContainer = new engine.Container();
frontContainer.addChild(blockContainer);
const player = this.player = new Player();
frontContainer.addChild(player);
player.setup();
player.addEventListener('jump-on-top', this.onPlayerJumpOnTop, this);
let playerShadow = this._playerShadow = new engine.Image(getTextureByName('玩家阴影'));
playerShadow.anchorX = playerShadow.width / 2;
playerShadow.anchorY = playerShadow.height / 2;
//playerShadow.x = frontContainer.width / 2;
playerShadow.x =this.player.x-playerShadow.width / 2;
let scoreAddTipsContainer = this.scoreAddTipsContainer = new engine.Container();
scoreAddTipsContainer.width=750;
scoreAddTipsContainer.anchorX = scoreAddTipsContainer.width / 2;
scoreAddTipsContainer.anchorY = scoreAddTipsContainer.height / 2;
let scoreAddTips = this.scoreAddTips = new engine.Label();
scoreAddTips.width=750;
scoreAddTips.fillColor = "#fc4454";
scoreAddTips.textAlign=engine.TEXT_ALIGN.CENTER;
scoreAddTips.size = 50;
scoreAddTips.alpha=0;
scoreAddTips.text = "+0";
scoreAddTips.x = this.player.x-scoreAddTips.width / 2;
scoreAddTipsContainer.addChild(scoreAddTips);
let jumpTips = this.jumpTips =new JumpTips()
jumpTips.setup()
jumpTips.x=props.jumpTipsOffset.x
frontContainer.addChild(playerShadow);
frontContainer.addChild(player);
frontContainer.addChild(scoreAddTipsContainer);
frontContainer.addChild(jumpTips);
ObjectPool.recycleObject(PoolName, ObjectPool.getObject(PoolName, {
y: 0,
remain: 0,
}));
this.hitEffect = createSvga('被撞烟雾', 'hitEffectAnchor');
this.pos = 0;
this.background.setup();
this.addEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this);
this.reset();
}
async setScoreText(score){
return new Promise(resolve => {
this.scoreAddTips.text=score
this.scoreAddTips.y=0
this.scoreAddTips.alpha=1
engine.Tween.get(this.scoreAddTips, null, null, true)
.to({y: -100,alpha:0}, 500, engine.Ease.cubicInOut)
.call(resolve);
})
}
async reset(revive = false) {
this.base.reset();
this.index = -1;
this._score = 0;
if (revive) {
} else {
this.pos = 0;
const blockContainer = this.blockContainer;
for (let i = 0, li = blockContainer.children.length; i < li; i++) {
const block = <Block>blockContainer.getChildAt(i);
block.playLeave();
}
}
for (let i = 0; i < props.initBlockCount; i++) {
this.addBlock(false);
}
for (let i = 0, li = this.goldBags.length; i < li; i++) {
const goldBag = this.goldBags[i];
this.frontContainer.removeChild(goldBag);
ObjectPool.recycleObject(PoolName, goldBag);
}
this.goldBags.splice(0);
//this.addGoldBag();
this.playZoom('in');
await this.resetPlayer(revive);
}
async resetPlayer(revive = false) {
this.player.reset(revive);
this.player.y = this.baseOffset - (this.index + 1) * props.blockHitHeight+props.blockBaseOffset;
}
async start(revive = false) {
this._playerShadow.y =this.player.y+props.playerShadowOffset;
this.scoreAddTipsContainer.y =this.player.y+props.scoreAddTipsOffset;
this.jumpTips.y =this.player.y+props.jumpTipsOffset.y;
//this.setScoreText("+100")
if (!revive) {
await this.player.playReady();
}
console.log("开始")
let guideFlagKey = 'jump-high-guide_' + props.guideFlagKey;
let guideFlag = localStorage.getItem(guideFlagKey);
if (!guideFlag) {
localStorage.setItem(guideFlagKey, '1');
await this.guideLayer.show('', {y: this.stage.height + this.player.y - 280});
}
this.lastLandType = 0;
this._remainToShowGoldBag = props.goldBagScoreMultiple - props.goldBagScoreSubtraction;
this._touchEnabled = true;
setTimeout(() => {
this.addBlock();
}, 100);
engine.globalEvent.dispatchEvent('jump-high-game-start');
}
pause() {
if (this.currentBlock) {
engine.Tween.pauseTweens(this.currentBlock);
}
engine.Tween.pauseTweens(this.player);
}
resume() {
if (this.currentBlock) {
engine.Tween.resumeTweens(this.currentBlock);
}
engine.Tween.resumeTweens(this.player);
}
async revive() {
this.blockContainer.getChildAt(this.index).visible = false;
this.index--;
await this.resetPlayer(true);
await this.playZoom('in');
this.start(true);
}
addBlock(animation = true) {
this.index++;
const blockContainer = this.blockContainer;
let block: Block;
if (blockContainer.children.length > this.index) {
block = <Block>blockContainer.getChildAt(this.index);
block.visible = true;
} else {
block = new Block();
blockContainer.addChild(block);
}
block.reset({
type: Math.floor(Math.random() * props.blockAssets.length),
});
block.y = this.baseOffset - this.index * props.blockHitHeight+props.blockBaseOffset;
this.blockComplete = false;
block.playEnter(this.index, animation).then(
(data) => {
this.blockComplete = true;
}
);
if (animation) {
this.needHitTest = true;
}
this.currentBlock = block;
/*if (this.blockCount > 0 && this.blockCount % props.goldBagMultiple === 0) {
this.addGoldBag();
}*/
}
private goldBags: GoldBag[] = [];
addGoldBag() {
let goldBag = <GoldBag>ObjectPool.getObject(PoolName, {
y: this.baseOffset - (this.blockCount + props.goldBagDistance + props.goldBagJumpSubtraction) * props.blockHitHeight,
remain: props.goldBagDistance,
});
this.frontContainer.addChild(goldBag);
this.goldBags.push(goldBag);
}
private nextToUpdateScore;
async playOpenGoldBag() {
for (let i = 0, li = this.goldBags.length; i < li; i++) {
const goldBag = this.goldBags[i];
goldBag.remain--;
if (goldBag.remain <= 0) {
this.goldBags.splice(i, 1);
i--;
li--;
this.nextToUpdateScore = true;
await goldBag.playOpen();
this.frontContainer.removeChild(goldBag);
ObjectPool.recycleObject(PoolName, goldBag);
}
}
}
onPlayerJumpOnTop() {
if (this.nextToUpdateScore) {
this.nextToUpdateScore = false;
this.scoreChange(4);
playSound('撞击钱袋音效');
}
}
get blockCount() {
return this.index - props.initBlockCount + 1;
}
get pos() {
return this._pos;
}
set pos(v) {
this._pos = v;
this.updatePos();
}
updatePos() {
this.frontContainer.y = this.stage.height + this._pos;
}
private onEnterFrame(event) {
if (this.needHitTest) {
if (this.currentBlock) {
const {x: bx, y: by, dir} = this.currentBlock;
const {x: px, y: py} = this.player;
const {blockHitWidth, blockHitHeight, playerWidth} = props;
let hitOn = false;
if (Math.abs(px - bx) < (blockHitWidth + playerWidth) / 2) {
this.player.changeBaseY(by - blockHitHeight);
if (py > by - blockHitHeight) {
hitOn = true;
}
}
if (hitOn) {
this.onHitOn(dir);
}
}
}
}
async onHitOn(dir) {
this._touchEnabled = false;
this.needHitTest = false;
clearInterval(this.timer);
this.currentBlock.playHit();
this._playerShadow.visible=false;
// this.currentBlock.stop();
this.playHitEffect(dir);
await this.player.hitAway(dir);
this.playZoom('out');
await this.player.parachute(dir);
engine.globalEvent.dispatchEvent('jump-high-game-end');
}
async jump() {
if (!this._touchEnabled) {
return;
}
this._playerShadow.visible=false;
this._touchEnabled = false;
this.playOpenGoldBag();
const result: any = await this.player.jump();
if (result) {
if (result.aboveBlock) {
let pos = Math.abs(this.currentBlock.x);
let type = 0;
if (pos > 0) {
type = pos > 0 && pos < props.scoreThreshold ? 2 : 3;
}
let lastLandType = this.lastLandType;
this.lastLandType = type;
if (type === 0) {
if (lastLandType !== type) { //如果前一次不是完美落地说明block没到正中间,所以没有重叠
type = 1;
}
}
if (type < 3) {
this.currentBlock.playEffect();
}
if(type===0){
this.currentBlock.playProFect();
}
if(type!=3){
this._playerShadow.visible=true;
}
this._playerShadow.y=this.player.y+props.playerShadowOffset;
this.player.playLand(type, this.currentBlock.dir);
this.currentBlock.stop();
this.scoreChange(type);
await this.playShake();
await new Promise(resolve => {
engine.Tween.get(this, null, null, true)
.to({pos: props.blockHitHeight * this.index}, 300, engine.Ease.cubicOut)
.call(resolve)
});
this.addBlock();
// this.frontContainer.addChild(this._playerShadow);
//this._playerShadow.y=this.player.y+props.playerShadowOffset;
}
this._touchEnabled = true;
}
}
private scoreChange(type) {
let scoreAdd = props.scoreWeights[type];
this._score += scoreAdd;
this._remainToShowGoldBag -= scoreAdd;
let score = this._score;
engine.globalEvent.dispatchEvent('jump-high-score', {
type,
score,
scoreAdd,
});
this.scoreAddTipsContainer.y =this.player.y+props.scoreAddTipsOffset;
this.setScoreText(`+${scoreAdd}`)
this.jumpTips.y =this.player.y+props.jumpTipsOffset.y;
this.jumpTips.show()
console.log(score, this._remainToShowGoldBag);
if (this._remainToShowGoldBag <= 0) {
this._remainToShowGoldBag += props.goldBagScoreMultiple;
this.addGoldBag();
console.log('addGoldBag');
}
}
playHitEffect(dir) {
let hitEffect = this.hitEffect;
hitEffect.scaleX = dir;
hitEffect.y = this.player.y - props.hitEffectAnchor.y;
hitEffect.play(true, false);
hitEffect.once(engine.Event.END_FRAME, function () {
this.frontContainer.removeChild(hitEffect);
}, this);
this.frontContainer.addChild(hitEffect);
}
playZoom(type: 'in' | 'out', duration = 700) {
this.background.playZoom(type, duration);
let count = this.stage.height / props.blockHitHeight;
return new Promise(resolve => {
this.frontContainer.anchorY = -props.blockHitHeight * (this.index + count * 1.3) + props.baseOffset;
let scale = type === 'in' ? 1 : /*Math.max(*/Math.min((this.stage.height / props.blockHitHeight / (this.index + count)), props.maxScale)/*, props.minScale)*/;
console.log(scale);
engine.Tween.get(this.frontContainer, null, null, true)
.to({scaleX: scale, scaleY: scale}, duration, engine.Ease.cubicInOut)
.call(resolve);
})
}
playShake(){
const {x, y} = this.frontContainer;
return new Promise(resolve => {
const shakeOffset = 7;
const duration = 30;
engine.Tween.get(this.frontContainer, null, null, true)
.to({x: x, y: y - shakeOffset}, duration)
.to({x: x, y: y + shakeOffset}, duration)
.to({x: x + shakeOffset, y: y}, duration)
.to({x: x - shakeOffset, y: y}, duration)
.to({x: x, y: y}, duration)
.call(resolve)
})
}
}
/**
* Created by rockyl on 2018/8/16.
*/
import Block from "./Block";
import {Background} from "./Background";
import Player from "./Player";
import {props} from "../props";
import {createSvga, getTextureByName, playSound} from "./utils";
import {Base} from "./Base";
import {GuideLayer} from "./GuideLayer";
import {GoldBag} from "./GoldBag";
import ObjectPool = engine.ObjectPool;
import { JumpTips } from "./JumpTips";
const PoolName: string = 'gold-bag';
ObjectPool.registerPool(PoolName, function () {
return new GoldBag();
}, function (item: GoldBag, data) {
item.reset(data);
});
export default class GameView extends engine.Container {
background: Background;
base: Base;
frontContainer: engine.Container;
blockContainer: engine.Container;
guideLayer: GuideLayer;
player: Player;
hitEffect: svga.Svga;
currentBlock: Block;
needHitTest;
index = -1;
blockComplete;
baseOffset: number;
scoreAddTipsContainer;
jumpTips
timer;
_pos;
_score;
_remainToShowGoldBag;
_blockShadow
_playerShadow
lastLandType;
scoreAddTips
_touchEnabled;
private _hasSetup;
constructor() {
super();
this.baseOffset = -props.baseOffset + props.playerOffset;
this.once(engine.Event.ADDED_TO_STAGE, this.setup, this);
}
setup() {
if (this._hasSetup) {
return;
}
this._hasSetup = true;
const {width, height} = this.stage;
const background = this.background = new Background();
this.addChild(background);
background.setup();
const frontContainer = this.frontContainer = new engine.Container();
frontContainer.x = width / 2;
this.addChild(frontContainer);
const guideLayer = this.guideLayer = new GuideLayer();
this.addChild(guideLayer);
const base = this.base = new Base();
frontContainer.addChild(base);
base.setup();
let blockShadow = this._blockShadow = new engine.Image(getTextureByName('方块阴影'));
blockShadow.anchorX = blockShadow.width / 2;
blockShadow.anchorY = blockShadow.height / 2;
blockShadow.x = -(blockShadow.width - base.width) / 2;
blockShadow.y =props.blockShadowOffset;
base.addChild(blockShadow);
const blockContainer = this.blockContainer = new engine.Container();
frontContainer.addChild(blockContainer);
const player = this.player = new Player();
frontContainer.addChild(player);
player.setup();
player.addEventListener('jump-on-top', this.onPlayerJumpOnTop, this);
let playerShadow = this._playerShadow = new engine.Image(getTextureByName('玩家阴影'));
playerShadow.anchorX = playerShadow.width / 2;
playerShadow.anchorY = playerShadow.height / 2;
//playerShadow.x = frontContainer.width / 2;
playerShadow.x =this.player.x-playerShadow.width / 2;
let scoreAddTipsContainer = this.scoreAddTipsContainer = new engine.Container();
scoreAddTipsContainer.width=750;
scoreAddTipsContainer.anchorX = scoreAddTipsContainer.width / 2;
scoreAddTipsContainer.anchorY = scoreAddTipsContainer.height / 2;
let scoreAddTips = this.scoreAddTips = new engine.Label();
scoreAddTips.width=750;
scoreAddTips.fillColor = props.scoreAddFontColor;
scoreAddTips.textAlign=engine.TEXT_ALIGN.CENTER;
scoreAddTips.size = props.scoreAddFontSize;
scoreAddTips.alpha=0;
scoreAddTips.text = "+0";
scoreAddTips.x = this.player.x-scoreAddTips.width / 2;
scoreAddTipsContainer.addChild(scoreAddTips);
let jumpTips = this.jumpTips =new JumpTips()
jumpTips.setup()
jumpTips.x=props.jumpTipsOffset.x
frontContainer.addChild(playerShadow);
frontContainer.addChild(player);
frontContainer.addChild(scoreAddTipsContainer);
frontContainer.addChild(jumpTips);
ObjectPool.recycleObject(PoolName, ObjectPool.getObject(PoolName, {
y: 0,
remain: 0,
}));
this.hitEffect = createSvga('被撞烟雾', 'hitEffectAnchor');
this.pos = 0;
this.background.setup();
this.addEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this);
this.reset();
}
async setScoreText(score){
return new Promise(resolve => {
this.scoreAddTips.text=score
this.scoreAddTips.y=0
this.scoreAddTips.alpha=1
engine.Tween.get(this.scoreAddTips, null, null, true)
.to({y: -100,alpha:0}, 500, engine.Ease.cubicInOut)
.call(resolve);
})
}
async reset(revive = false) {
this.base.reset();
this.index = -1;
this._score = 0;
if (revive) {
} else {
this.pos = 0;
const blockContainer = this.blockContainer;
for (let i = 0, li = blockContainer.children.length; i < li; i++) {
const block = <Block>blockContainer.getChildAt(i);
block.playLeave();
}
}
for (let i = 0; i < props.initBlockCount; i++) {
this.addBlock(false);
}
for (let i = 0, li = this.goldBags.length; i < li; i++) {
const goldBag = this.goldBags[i];
this.frontContainer.removeChild(goldBag);
ObjectPool.recycleObject(PoolName, goldBag);
}
this.goldBags.splice(0);
//this.addGoldBag();
this.playZoom('in');
await this.resetPlayer(revive);
}
async resetPlayer(revive = false) {
this.player.reset(revive);
this.player.y = this.baseOffset - (this.index + 1) * props.blockHitHeight+props.blockBaseOffset;
}
async start(revive = false) {
this._playerShadow.y =this.player.y+props.playerShadowOffset;
this.scoreAddTipsContainer.y =this.player.y+props.scoreAddTipsOffset;
this.jumpTips.y =this.player.y+props.jumpTipsOffset.y;
//this.setScoreText("+100")
if (!revive) {
await this.player.playReady();
}
console.log("开始")
let guideFlagKey = 'jump-high-guide_' + props.guideFlagKey;
let guideFlag = localStorage.getItem(guideFlagKey);
if (!guideFlag) {
localStorage.setItem(guideFlagKey, '1');
await this.guideLayer.show('', {y: this.stage.height + this.player.y - 280});
}
this.lastLandType = 0;
this._remainToShowGoldBag = props.goldBagScoreMultiple - props.goldBagScoreSubtraction;
this._touchEnabled = true;
setTimeout(() => {
this.addBlock();
}, 100);
engine.globalEvent.dispatchEvent('jump-high-game-start');
}
pause() {
if (this.currentBlock) {
engine.Tween.pauseTweens(this.currentBlock);
}
engine.Tween.pauseTweens(this.player);
}
resume() {
if (this.currentBlock) {
engine.Tween.resumeTweens(this.currentBlock);
}
engine.Tween.resumeTweens(this.player);
}
async revive() {
this.blockContainer.getChildAt(this.index).visible = false;
this.index--;
await this.resetPlayer(true);
await this.playZoom('in');
this.start(true);
}
addBlock(animation = true) {
this.index++;
const blockContainer = this.blockContainer;
let block: Block;
if (blockContainer.children.length > this.index) {
block = <Block>blockContainer.getChildAt(this.index);
block.visible = true;
} else {
block = new Block();
blockContainer.addChild(block);
}
block.reset({
type: Math.floor(Math.random() * props.blockAssets.length),
});
block.y = this.baseOffset - this.index * props.blockHitHeight+props.blockBaseOffset;
this.blockComplete = false;
block.playEnter(this.index, animation).then(
(data) => {
this.blockComplete = true;
}
);
if (animation) {
this.needHitTest = true;
}
this.currentBlock = block;
/*if (this.blockCount > 0 && this.blockCount % props.goldBagMultiple === 0) {
this.addGoldBag();
}*/
}
private goldBags: GoldBag[] = [];
addGoldBag() {
let goldBag = <GoldBag>ObjectPool.getObject(PoolName, {
y: this.baseOffset - (this.blockCount + props.goldBagDistance + props.goldBagJumpSubtraction) * props.blockHitHeight,
remain: props.goldBagDistance,
});
this.frontContainer.addChild(goldBag);
this.goldBags.push(goldBag);
}
private nextToUpdateScore;
async playOpenGoldBag() {
for (let i = 0, li = this.goldBags.length; i < li; i++) {
const goldBag = this.goldBags[i];
goldBag.remain--;
if (goldBag.remain <= 0) {
this.goldBags.splice(i, 1);
i--;
li--;
this.nextToUpdateScore = true;
await goldBag.playOpen();
this.frontContainer.removeChild(goldBag);
ObjectPool.recycleObject(PoolName, goldBag);
}
}
}
onPlayerJumpOnTop() {
if (this.nextToUpdateScore) {
this.nextToUpdateScore = false;
this.scoreChange(4);
playSound('撞击钱袋音效');
}
}
get blockCount() {
return this.index - props.initBlockCount + 1;
}
get pos() {
return this._pos;
}
set pos(v) {
this._pos = v;
this.updatePos();
}
updatePos() {
this.frontContainer.y = this.stage.height + this._pos;
}
private onEnterFrame(event) {
if (this.needHitTest) {
if (this.currentBlock) {
const {x: bx, y: by, dir} = this.currentBlock;
const {x: px, y: py} = this.player;
const {blockHitWidth, blockHitHeight, playerWidth} = props;
let hitOn = false;
if (Math.abs(px - bx) < (blockHitWidth + playerWidth) / 2) {
this.player.changeBaseY(by - blockHitHeight);
if (py > by - blockHitHeight) {
hitOn = true;
}
}
if (hitOn) {
this.onHitOn(dir);
}
}
}
}
async onHitOn(dir) {
this._touchEnabled = false;
this.needHitTest = false;
clearInterval(this.timer);
this.currentBlock.playHit();
this._playerShadow.visible=false;
// this.currentBlock.stop();
this.playHitEffect(dir);
await this.player.hitAway(dir);
this.playZoom('out');
await this.player.parachute(dir);
engine.globalEvent.dispatchEvent('jump-high-game-end');
}
async jump() {
if (!this._touchEnabled) {
return;
}
this._playerShadow.visible=false;
this._touchEnabled = false;
this.playOpenGoldBag();
const result: any = await this.player.jump();
if (result) {
if (result.aboveBlock) {
let pos = Math.abs(this.currentBlock.x);
let type = 0;
if (pos > 0) {
type = pos > 0 && pos < props.scoreThreshold ? 2 : 3;
}
let lastLandType = this.lastLandType;
this.lastLandType = type;
if (type === 0) {
if (lastLandType !== type) { //如果前一次不是完美落地说明block没到正中间,所以没有重叠
type = 1;
}
}
if (type < 3) {
this.currentBlock.playEffect();
}
if(type===0){
this.currentBlock.playProFect();
}
if(type!=3){
this._playerShadow.visible=true;
}
this._playerShadow.y=this.player.y+props.playerShadowOffset;
this.player.playLand(type, this.currentBlock.dir);
this.currentBlock.stop();
this.scoreChange(type);
await this.playShake();
await new Promise(resolve => {
engine.Tween.get(this, null, null, true)
.to({pos: props.blockHitHeight * this.index}, 300, engine.Ease.cubicOut)
.call(resolve)
});
this.addBlock();
// this.frontContainer.addChild(this._playerShadow);
//this._playerShadow.y=this.player.y+props.playerShadowOffset;
}
this._touchEnabled = true;
}
}
private scoreChange(type) {
let scoreAdd = props.scoreWeights[type];
this._score += scoreAdd;
this._remainToShowGoldBag -= scoreAdd;
let score = this._score;
engine.globalEvent.dispatchEvent('jump-high-score', {
type,
score,
scoreAdd,
});
this.scoreAddTipsContainer.y =this.player.y+props.scoreAddTipsOffset;
this.setScoreText(`+${scoreAdd}`)
this.jumpTips.y =this.player.y+props.jumpTipsOffset.y;
this.jumpTips.show()
console.log(score, this._remainToShowGoldBag);
if (this._remainToShowGoldBag <= 0) {
this._remainToShowGoldBag += props.goldBagScoreMultiple;
this.addGoldBag();
console.log('addGoldBag');
}
}
playHitEffect(dir) {
let hitEffect = this.hitEffect;
hitEffect.scaleX = dir;
hitEffect.y = this.player.y - props.hitEffectAnchor.y;
hitEffect.play(true, false);
hitEffect.once(engine.Event.END_FRAME, function () {
this.frontContainer.removeChild(hitEffect);
}, this);
this.frontContainer.addChild(hitEffect);
}
playZoom(type: 'in' | 'out', duration = 700) {
this.background.playZoom(type, duration);
let count = this.stage.height / props.blockHitHeight;
return new Promise(resolve => {
this.frontContainer.anchorY = -props.blockHitHeight * (this.index + count * 1.3) + props.baseOffset;
let scale = type === 'in' ? 1 : /*Math.max(*/Math.min((this.stage.height / props.blockHitHeight / (this.index + count)), props.maxScale)/*, props.minScale)*/;
console.log(scale);
engine.Tween.get(this.frontContainer, null, null, true)
.to({scaleX: scale, scaleY: scale}, duration, engine.Ease.cubicInOut)
.call(resolve);
})
}
playShake(){
const {x, y} = this.frontContainer;
return new Promise(resolve => {
const shakeOffset = 7;
const duration = 30;
engine.Tween.get(this.frontContainer, null, null, true)
.to({x: x, y: y - shakeOffset}, duration)
.to({x: x, y: y + shakeOffset}, duration)
.to({x: x + shakeOffset, y: y}, duration)
.to({x: x - shakeOffset, y: y}, duration)
.to({x: x, y: y}, duration)
.call(resolve)
})
}
}
...@@ -162,6 +162,16 @@ ...@@ -162,6 +162,16 @@
"type": "number", "type": "number",
"default": -130 "default": -130
}, },
"scoreAddFontColor": {
"alias": "加分提示字体颜色",
"type": "string",
"default": "#fc4454"
},
"scoreAddFontSize": {
"alias": "加分提示字体颜色",
"type": "number",
"default": 50
},
"jumpTipsOffset": { "jumpTipsOffset": {
"alias": "跳跃文案偏移", "alias": "跳跃文案偏移",
"type": "vector2", "type": "vector2",
...@@ -483,5 +493,5 @@ ...@@ -483,5 +493,5 @@
} }
}, },
"id": "jump-high-2", "id": "jump-high-2",
"code": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('tslib')) :\n\ttypeof define === 'function' && define.amd ? define(['tslib'], factory) :\n\t(global = global || self, global['jump-high-2'] = factory(global.tslib));\n}(this, (function (tslib) { 'use strict';\n\n\tvar props = {};\n\tfunction prepareProps() {\n\t var metaProps = getProps();\n\t engine.injectProp(props, metaProps);\n\t}\n\tfunction injectProps(p) {\n\t engine.injectProp(props, p);\n\t}\n\n\tfunction getTexture(uuid) {\n\t return engine.Texture.from(getAssetByUUID(uuid).uuid);\n\t}\n\tfunction getTextureByName(name) {\n\t return getTexture(engine.getAssetByName(name).uuid);\n\t}\n\tfunction getBlockAsset(type) {\n\t return engine.getAssetByName(props.blockAssets[type]);\n\t}\n\tfunction getBlockHitAsset(type) {\n\t console.log(\"props.blockHitAssets\", props.blockHitAssets);\n\t return engine.getAssetByName(props.blockHitAssets[type]);\n\t}\n\tfunction createSvga(name, anchorName) {\n\t var inst = new svga.Svga();\n\t inst.source = 'asset://' + engine.getAssetByName(name).uuid;\n\t var anchor = props[(anchorName)];\n\t if (anchor) {\n\t inst.x = -anchor.x;\n\t inst.y = -anchor.y;\n\t inst.anchorX = anchor.x;\n\t inst.anchorY = anchor.y;\n\t }\n\t return inst;\n\t}\n\tfunction playSound(name) {\n\t engine.playSound(engine.getAssetByName(name).uuid, { keep: true });\n\t}\n\n\tvar Block = (function (_super) {\n\t tslib.__extends(Block, _super);\n\t function Block() {\n\t var _this = _super.call(this) || this;\n\t var body = _this.body = new svga.Svga();\n\t body.x = -props.blockWidth / 2;\n\t body.y = -props.blockHitHeight - props.blockPaddingTop;\n\t _this.addChild(body);\n\t var bodyHit = _this.bodyHit = new svga.Svga();\n\t bodyHit.x = -props.blockWidth / 2;\n\t bodyHit.y = -props.blockHitHeight - props.blockPaddingTop + props.blockHitOffsetY;\n\t _this.addChild(bodyHit);\n\t console.log(\"props.blockProfectOffset\", props.blockProfectOffset);\n\t var bodyProfect = _this.bodyProfect = new svga.Svga();\n\t bodyProfect.x = -props.blockWidth / 2 + props.blockProfectOffset.x;\n\t bodyProfect.y = -props.blockHitHeight - props.blockPaddingTop + props.blockProfectOffset.y;\n\t _this.addChild(bodyProfect);\n\t return _this;\n\t }\n\t Block.prototype.reset = function (_a) {\n\t var type = _a.type;\n\t this.dir = Math.random() > 0.5 ? 1 : -1;\n\t if (this.type != type) {\n\t this.type = type;\n\t var asset = getBlockAsset(type);\n\t this.body.source = 'asset://' + asset.uuid;\n\t var assetHit = getBlockHitAsset(type);\n\t console.log(\"assetHit\", assetHit);\n\t this.bodyHit.source = 'asset://' + assetHit.uuid;\n\t }\n\t this.bodyProfect.source = 'asset://' + engine.getAssetByName(\"完美方块素材\").uuid;\n\t this.scaleX = this.dir;\n\t this.body.gotoAndStop(1);\n\t this.bodyHit.gotoAndStop(1);\n\t this.bodyProfect.gotoAndStop(1);\n\t this.body.visible = true;\n\t this.bodyHit.visible = false;\n\t };\n\t Block.prototype.playEnter = function (index, animation) {\n\t var _this = this;\n\t this.visible = true;\n\t this.x = this.dir * this.stage.width;\n\t var _a = props.blockDurationRange, min = _a[0], max = _a[1];\n\t var duration = Math.max(max - index * props.blockDurationStep, min);\n\t duration = duration + max * Math.random() * props.blockDurationRandom * (Math.random() > 0.5 ? 1 : -1);\n\t return new Promise(function (resolve) {\n\t if (animation) {\n\t engine.Tween.get(_this, null, null, true)\n\t .to({ x: 0, }, duration)\n\t .call(resolve);\n\t }\n\t else {\n\t _this.x = 0;\n\t setTimeout(function () {\n\t console.log(_this.body);\n\t }, 200);\n\t resolve();\n\t }\n\t });\n\t };\n\t Block.prototype.playLeave = function () {\n\t this.visible = false;\n\t };\n\t Block.prototype.playEffect = function () {\n\t var body = this.body;\n\t body.play(true, false);\n\t body.once(engine.Event.END_FRAME, function () {\n\t body.gotoAndStop(1);\n\t }, this);\n\t };\n\t Block.prototype.playHit = function () {\n\t var bodyHit = this.bodyHit;\n\t bodyHit.play(true, false);\n\t this.body.visible = false;\n\t this.bodyHit.visible = true;\n\t bodyHit.once(engine.Event.END_FRAME, function () {\n\t this.body.visible = true;\n\t this.bodyHit.visible = false;\n\t bodyHit.gotoAndStop(1);\n\t }, this);\n\t };\n\t Block.prototype.playProFect = function () {\n\t var bodyProfect = this.bodyProfect;\n\t bodyProfect.play(true, false);\n\t bodyProfect.once(engine.Event.END_FRAME, function () {\n\t bodyProfect.gotoAndStop(1);\n\t }, this);\n\t };\n\t Block.prototype.stop = function () {\n\t engine.Tween.removeTweens(this);\n\t };\n\t return Block;\n\t}(engine.Container));\n\n\tvar Background = (function (_super) {\n\t tslib.__extends(Background, _super);\n\t function Background() {\n\t return _super.call(this) || this;\n\t }\n\t Background.prototype.setup = function () {\n\t var _a = this.stage, width = _a.width, height = _a.height;\n\t var bg = this._bg = new engine.Image(getTextureByName('背景图'));\n\t bg.anchorX = bg.width / 2;\n\t bg.anchorY = bg.height / 2;\n\t bg.x = -(bg.width - width) / 2;\n\t bg.y = -(bg.height - height) / 2;\n\t this.addChild(bg);\n\t this._minScale = width / bg.width;\n\t };\n\t Background.prototype.playZoom = function (type, duration) {\n\t var _this = this;\n\t if (duration === void 0) { duration = 700; }\n\t return new Promise(function (resolve) {\n\t var scale = type === 'in' ? 1 : _this._minScale;\n\t engine.Tween.get(_this._bg, null, null, true)\n\t .to({ scaleX: scale, scaleY: scale }, duration, engine.Ease.cubicInOut)\n\t .call(resolve);\n\t });\n\t };\n\t return Background;\n\t}(engine.Container));\n\n\tvar svgaAssets = {\n\t aniReady: { name: '准备立正', dir: 1 },\n\t aniReady2: { name: '准备立正', dir: 1 },\n\t aniJump: { name: '跳上升', dir: 1 },\n\t aniFall: { name: '跳下落', dir: 1 },\n\t aniLandNormal: { name: '普通着地', dir: 1 },\n\t aniLandSide: { name: '边缘着地', dir: -1 },\n\t aniHit: { name: '被撞开', dir: -1 },\n\t aniParachute: { name: '降落', dir: -1 },\n\t aniLandPerfect: { name: '完美着地_笑', dir: 1 },\n\t};\n\tvar Player = (function (_super) {\n\t tslib.__extends(Player, _super);\n\t function Player() {\n\t var _this = _super.call(this) || this;\n\t _this.g = props.gravity;\n\t _this.addEventListener(engine.Event.ENTER_FRAME, _this.onEnterFrame, _this);\n\t return _this;\n\t }\n\t Player.prototype.switchAni = function (name, dir, play, loop) {\n\t var _this = this;\n\t if (dir === void 0) { dir = 1; }\n\t if (play === void 0) { play = true; }\n\t if (loop === void 0) { loop = false; }\n\t return new Promise(function (resolve) {\n\t _this.scaleX = dir;\n\t if (_this._aniName !== name) {\n\t _this._aniName = name;\n\t var oldAni = _this.removeChild(_this.getChildByName('body'));\n\t if (oldAni) {\n\t oldAni.stop();\n\t }\n\t var ani = _this._currentAni = _this['ani' + name];\n\t _this.addChild(ani);\n\t if (play) {\n\t ani.play(false, loop);\n\t if (loop) {\n\t resolve();\n\t }\n\t else {\n\t ani.once(engine.Event.END_FRAME, resolve);\n\t }\n\t }\n\t else {\n\t resolve();\n\t }\n\t }\n\t });\n\t };\n\t Player.prototype.setup = function () {\n\t this.prefectEffect = createSvga('完美着地特效', 'playerLandPrefectAnchor');\n\t this.landEffect = createSvga('着地特效', 'playerLandEffectAnchor');\n\t for (var key in svgaAssets) {\n\t var _a = svgaAssets[key], name = _a.name, dir = _a.dir;\n\t var body = this[key] = createSvga(name, key.replace('ani', 'player') + 'Anchor');\n\t body.name = 'body';\n\t body.scaleX = dir;\n\t }\n\t };\n\t Player.prototype.reset = function (revive) {\n\t this.x = 0;\n\t this.rotation = 0;\n\t this.scaleX = this.scaleY = 1;\n\t this._prefectLandCounting = 0;\n\t engine.Tween.removeTweens(this);\n\t if (revive) {\n\t this.switchAni('Jump', 1, false);\n\t }\n\t };\n\t Player.prototype.playReady = function () {\n\t var _this = this;\n\t return new Promise(function (resolve) {\n\t _this.switchAni('Ready', 1);\n\t _this._currentAni.once(engine.Event.END_FRAME, function () {\n\t this.switchAni('Ready2', 1, true, true);\n\t resolve();\n\t }, _this);\n\t });\n\t };\n\t Player.prototype.onEnterFrame = function (event) {\n\t if (!this.playing) {\n\t return;\n\t }\n\t this.vy += this.g;\n\t this.y += this.vy;\n\t if (this.vy > 0 && this._aniName !== 'Fall') {\n\t this.dispatchEvent('jump-on-top');\n\t this.switchAni('Fall');\n\t }\n\t if (this.y > this.baseY) {\n\t this.y = this.baseY;\n\t this.playing = false;\n\t this.jumpPromise && this.jumpPromise({\n\t aboveBlock: this.aboveBlock,\n\t });\n\t this.jumpPromise = null;\n\t }\n\t };\n\t Player.prototype.changeBaseY = function (v) {\n\t if (this.baseY == v) {\n\t return;\n\t }\n\t this.aboveBlock = true;\n\t this.baseY = v;\n\t };\n\t Player.prototype.jump = function () {\n\t var _this = this;\n\t playSound('跳起音效');\n\t this.switchAni('Jump', 1, false);\n\t this._currentAni.play(false, false);\n\t this.aboveBlock = false;\n\t this.playing = true;\n\t this.baseY = this.y;\n\t this.vy = -props.jumpSpeed;\n\t return new Promise(function (resolve) {\n\t _this.jumpPromise = resolve;\n\t });\n\t };\n\t Player.prototype.playLand = function (type, dir) {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var _a, prefectEffect_1, landEffect_1;\n\t return tslib.__generator(this, function (_b) {\n\t switch (_b.label) {\n\t case 0:\n\t _a = type;\n\t switch (_a) {\n\t case 0: return [3, 1];\n\t case 1: return [3, 4];\n\t case 2: return [3, 4];\n\t case 3: return [3, 5];\n\t }\n\t return [3, 6];\n\t case 1:\n\t this._prefectLandCounting++;\n\t playSound('完美落地音效' + Math.min(4, this._prefectLandCounting));\n\t prefectEffect_1 = this.prefectEffect;\n\t this.addChildAt(prefectEffect_1, 0);\n\t prefectEffect_1.gotoAndPlay(1);\n\t prefectEffect_1.once(engine.Event.END_FRAME, function () {\n\t this.removeChild(prefectEffect_1);\n\t }, this);\n\t landEffect_1 = this.landEffect;\n\t this.addChildAt(landEffect_1, 0);\n\t landEffect_1.gotoAndPlay(1);\n\t landEffect_1.once(engine.Event.END_FRAME, function () {\n\t this.removeChild(landEffect_1);\n\t }, this);\n\t return [4, this.switchAni('LandPerfect')];\n\t case 2:\n\t _b.sent();\n\t return [4, this.switchAni('Ready2', 1, true, true)];\n\t case 3:\n\t _b.sent();\n\t return [3, 6];\n\t case 4:\n\t this._prefectLandCounting = 0;\n\t playSound('普通落地音效');\n\t this.switchAni('Ready2', 1, true, true);\n\t return [3, 6];\n\t case 5:\n\t this._prefectLandCounting = 0;\n\t playSound('边缘落地音效');\n\t this.switchAni('LandSide', dir);\n\t return [3, 6];\n\t case 6: return [2];\n\t }\n\t });\n\t });\n\t };\n\t Player.prototype.hitAway = function (dir) {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var _this = this;\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t this.jumpPromise && this.jumpPromise();\n\t this.jumpPromise = null;\n\t playSound('被撞开音效');\n\t this.switchAni('Hit', dir);\n\t this.vy = 0;\n\t return [4, new Promise(function (resolve) {\n\t engine.Tween.get(_this)\n\t .to({\n\t x: -dir * props.hitAwayDistance.x,\n\t }, props.hitAwayDuration, engine.Ease.quartOut);\n\t engine.Tween.get(_this)\n\t .to({\n\t y: _this.y + props.hitAwayDistance.y,\n\t }, props.hitAwayDuration, engine.Ease.cubicOut)\n\t .call(resolve);\n\t })];\n\t case 1:\n\t _a.sent();\n\t return [2];\n\t }\n\t });\n\t });\n\t };\n\t Player.prototype.parachute = function (dir) {\n\t var _this = this;\n\t this.switchAni('Parachute', dir);\n\t return new Promise(function (resolve) {\n\t engine.Tween.get(_this)\n\t .wait(200)\n\t .call(function () {\n\t playSound('降落伞下落音效');\n\t })\n\t .wait(300)\n\t .to({ y: _this.y + props.parachuteDistance }, props.parachuteDuration)\n\t .set({ anchorOffsetY: 0 })\n\t .call(resolve);\n\t });\n\t };\n\t return Player;\n\t}(engine.Container));\n\n\tvar Base = (function (_super) {\n\t tslib.__extends(Base, _super);\n\t function Base() {\n\t return _super.call(this, getTextureByName('底座')) || this;\n\t }\n\t Base.prototype.setup = function () {\n\t this.x = -(this.width) / 2;\n\t };\n\t Base.prototype.reset = function () {\n\t this.y = -props.baseOffset;\n\t };\n\t return Base;\n\t}(engine.Image));\n\n\tvar GuideLayer = (function (_super) {\n\t tslib.__extends(GuideLayer, _super);\n\t function GuideLayer() {\n\t var _this = _super.call(this) || this;\n\t _this.setup();\n\t return _this;\n\t }\n\t GuideLayer.prototype.setup = function () {\n\t };\n\t GuideLayer.prototype.show = function (id, options) {\n\t var _this = this;\n\t return new Promise(function (resolve) {\n\t _this.visible = true;\n\t if (!_this.guideMask) {\n\t var _a = _this.stage, width = _a.width, height = _a.height;\n\t var guideMask = _this.guideMask = new engine.Container();\n\t var guideHole = new engine.Image(getTextureByName('引导遮罩'));\n\t guideHole.x = (width - guideHole.width) / 2;\n\t guideHole.y = options.y;\n\t guideMask.addChild(guideHole);\n\t _this.createRect(guideMask, 0, 0, width, guideHole.y);\n\t _this.createRect(guideMask, 0, guideHole.y, guideHole.x, guideHole.height);\n\t _this.createRect(guideMask, guideHole.x + guideHole.width, guideHole.y, width - guideHole.x - guideHole.width, guideHole.height);\n\t _this.createRect(guideMask, 0, guideHole.y + guideHole.height, width, height - guideHole.y - guideHole.height);\n\t var label = _this.label = new engine.Label();\n\t label.fillColor = 'white';\n\t label.size = 25;\n\t label.text = props.guideText;\n\t label.x = (width - label.width) / 2;\n\t label.y = guideHole.y + guideHole.height + 50;\n\t guideMask.addChild(label);\n\t _this.addChild(guideMask);\n\t }\n\t _this.once(engine.MouseEvent.CLICK, function () {\n\t this.visible = false;\n\t resolve();\n\t }, _this);\n\t });\n\t };\n\t GuideLayer.prototype.createRect = function (container, x, y, width, height) {\n\t var rect = new engine.Rect();\n\t rect.x = x;\n\t rect.y = y;\n\t rect.width = width;\n\t rect.height = height;\n\t rect.fillColor = 'black';\n\t rect.alpha = 0.7;\n\t container.addChild(rect);\n\t };\n\t return GuideLayer;\n\t}(engine.Container));\n\n\tvar GoldBag = (function (_super) {\n\t tslib.__extends(GoldBag, _super);\n\t function GoldBag() {\n\t var _this = _super.call(this) || this;\n\t _this.setup();\n\t return _this;\n\t }\n\t GoldBag.prototype.setup = function () {\n\t var avatar = this.avatar = new engine.Sprite(getTextureByName('钱袋-静态'));\n\t avatar.x = -props.goldPackAvatarAnchor.x;\n\t avatar.y = -props.goldPackAvatarAnchor.y;\n\t this.addChild(avatar);\n\t var svga = this.svga = createSvga('钱袋', 'goldPackAnchor');\n\t svga.visible = false;\n\t this.addChild(svga);\n\t };\n\t GoldBag.prototype.reset = function (data) {\n\t this.y = data.y;\n\t this.avatar.visible = true;\n\t this.svga.visible = false;\n\t this.svga.gotoAndStop(1);\n\t this.remain = data.remain;\n\t };\n\t GoldBag.prototype.playOpen = function () {\n\t var _this = this;\n\t this.avatar.visible = false;\n\t this.svga.visible = true;\n\t return new Promise(function (resolve) {\n\t _this.svga.play(true, false);\n\t _this.svga.once(engine.Event.END_FRAME, function () {\n\t this.svga.visible = false;\n\t resolve();\n\t }, _this);\n\t });\n\t };\n\t return GoldBag;\n\t}(engine.Container));\n\n\tvar JumpTips = (function (_super) {\n\t tslib.__extends(JumpTips, _super);\n\t function JumpTips() {\n\t return _super.call(this) || this;\n\t }\n\t JumpTips.prototype.setup = function () {\n\t this.width = 124;\n\t this.height = 93;\n\t var bg = this._bg = new engine.Image(getTextureByName('跳跃提示背景'));\n\t bg.width = this.width;\n\t bg.height = this.height;\n\t bg.anchorX = bg.width / 2;\n\t bg.anchorY = bg.height / 2;\n\t this.addChild(bg);\n\t var jumpTipsLabel = this._jumpTipsLabel = new engine.Label();\n\t jumpTipsLabel.width = this.width;\n\t jumpTipsLabel.height = this.height;\n\t jumpTipsLabel.anchorX = jumpTipsLabel.width / 2;\n\t jumpTipsLabel.anchorY = jumpTipsLabel.height / 2;\n\t jumpTipsLabel.fillColor = \"#fc4454\";\n\t jumpTipsLabel.textAlign = engine.TEXT_ALIGN.CENTER;\n\t jumpTipsLabel.verticalAlign = engine.VERTICAL_ALIGN.MIDDLE;\n\t jumpTipsLabel.size = 24;\n\t jumpTipsLabel.rotation = -26;\n\t jumpTipsLabel.text = \"+00\";\n\t jumpTipsLabel.x = 0;\n\t jumpTipsLabel.y = 0;\n\t this.addChild(jumpTipsLabel);\n\t this.alpha = 0;\n\t };\n\t JumpTips.prototype.show = function () {\n\t var _this = this;\n\t return new Promise(function (resolve) {\n\t _this._jumpTipsLabel.text = props.jumpTips[parseInt((Math.random() * props.jumpTips.length) + \"\")];\n\t _this.alpha = 1;\n\t engine.Tween.get(_this, null, null, true)\n\t .wait(800)\n\t .to({ alpha: 0 }, 200, engine.Ease.cubicInOut)\n\t .call(resolve);\n\t });\n\t };\n\t return JumpTips;\n\t}(engine.Container));\n\n\tvar ObjectPool = engine.ObjectPool;\n\tvar PoolName = 'gold-bag';\n\tObjectPool.registerPool(PoolName, function () {\n\t return new GoldBag();\n\t}, function (item, data) {\n\t item.reset(data);\n\t});\n\tvar GameView = (function (_super) {\n\t tslib.__extends(GameView, _super);\n\t function GameView() {\n\t var _this = _super.call(this) || this;\n\t _this.index = -1;\n\t _this.goldBags = [];\n\t _this.baseOffset = -props.baseOffset + props.playerOffset;\n\t _this.once(engine.Event.ADDED_TO_STAGE, _this.setup, _this);\n\t return _this;\n\t }\n\t GameView.prototype.setup = function () {\n\t if (this._hasSetup) {\n\t return;\n\t }\n\t this._hasSetup = true;\n\t var _a = this.stage, width = _a.width, height = _a.height;\n\t var background = this.background = new Background();\n\t this.addChild(background);\n\t background.setup();\n\t var frontContainer = this.frontContainer = new engine.Container();\n\t frontContainer.x = width / 2;\n\t this.addChild(frontContainer);\n\t var guideLayer = this.guideLayer = new GuideLayer();\n\t this.addChild(guideLayer);\n\t var base = this.base = new Base();\n\t frontContainer.addChild(base);\n\t base.setup();\n\t var blockShadow = this._blockShadow = new engine.Image(getTextureByName('方块阴影'));\n\t blockShadow.anchorX = blockShadow.width / 2;\n\t blockShadow.anchorY = blockShadow.height / 2;\n\t blockShadow.x = -(blockShadow.width - base.width) / 2;\n\t blockShadow.y = props.blockShadowOffset;\n\t base.addChild(blockShadow);\n\t var blockContainer = this.blockContainer = new engine.Container();\n\t frontContainer.addChild(blockContainer);\n\t var player = this.player = new Player();\n\t frontContainer.addChild(player);\n\t player.setup();\n\t player.addEventListener('jump-on-top', this.onPlayerJumpOnTop, this);\n\t var playerShadow = this._playerShadow = new engine.Image(getTextureByName('玩家阴影'));\n\t playerShadow.anchorX = playerShadow.width / 2;\n\t playerShadow.anchorY = playerShadow.height / 2;\n\t playerShadow.x = this.player.x - playerShadow.width / 2;\n\t var scoreAddTipsContainer = this.scoreAddTipsContainer = new engine.Container();\n\t scoreAddTipsContainer.width = 750;\n\t scoreAddTipsContainer.anchorX = scoreAddTipsContainer.width / 2;\n\t scoreAddTipsContainer.anchorY = scoreAddTipsContainer.height / 2;\n\t var scoreAddTips = this.scoreAddTips = new engine.Label();\n\t scoreAddTips.width = 750;\n\t scoreAddTips.fillColor = \"#fc4454\";\n\t scoreAddTips.textAlign = engine.TEXT_ALIGN.CENTER;\n\t scoreAddTips.size = 50;\n\t scoreAddTips.alpha = 0;\n\t scoreAddTips.text = \"+0\";\n\t scoreAddTips.x = this.player.x - scoreAddTips.width / 2;\n\t scoreAddTipsContainer.addChild(scoreAddTips);\n\t var jumpTips = this.jumpTips = new JumpTips();\n\t jumpTips.setup();\n\t jumpTips.x = props.jumpTipsOffset.x;\n\t frontContainer.addChild(playerShadow);\n\t frontContainer.addChild(player);\n\t frontContainer.addChild(scoreAddTipsContainer);\n\t frontContainer.addChild(jumpTips);\n\t ObjectPool.recycleObject(PoolName, ObjectPool.getObject(PoolName, {\n\t y: 0,\n\t remain: 0,\n\t }));\n\t this.hitEffect = createSvga('被撞烟雾', 'hitEffectAnchor');\n\t this.pos = 0;\n\t this.background.setup();\n\t this.addEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this);\n\t this.reset();\n\t };\n\t GameView.prototype.setScoreText = function (score) {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var _this = this;\n\t return tslib.__generator(this, function (_a) {\n\t return [2, new Promise(function (resolve) {\n\t _this.scoreAddTips.text = score;\n\t _this.scoreAddTips.y = 0;\n\t _this.scoreAddTips.alpha = 1;\n\t engine.Tween.get(_this.scoreAddTips, null, null, true)\n\t .to({ y: -100, alpha: 0 }, 500, engine.Ease.cubicInOut)\n\t .call(resolve);\n\t })];\n\t });\n\t });\n\t };\n\t GameView.prototype.reset = function (revive) {\n\t if (revive === void 0) { revive = false; }\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var blockContainer, i, li, block, i, i, li, goldBag;\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t this.base.reset();\n\t this.index = -1;\n\t this._score = 0;\n\t if (revive) ;\n\t else {\n\t this.pos = 0;\n\t blockContainer = this.blockContainer;\n\t for (i = 0, li = blockContainer.children.length; i < li; i++) {\n\t block = blockContainer.getChildAt(i);\n\t block.playLeave();\n\t }\n\t }\n\t for (i = 0; i < props.initBlockCount; i++) {\n\t this.addBlock(false);\n\t }\n\t for (i = 0, li = this.goldBags.length; i < li; i++) {\n\t goldBag = this.goldBags[i];\n\t this.frontContainer.removeChild(goldBag);\n\t ObjectPool.recycleObject(PoolName, goldBag);\n\t }\n\t this.goldBags.splice(0);\n\t this.playZoom('in');\n\t return [4, this.resetPlayer(revive)];\n\t case 1:\n\t _a.sent();\n\t return [2];\n\t }\n\t });\n\t });\n\t };\n\t GameView.prototype.resetPlayer = function (revive) {\n\t if (revive === void 0) { revive = false; }\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t return tslib.__generator(this, function (_a) {\n\t this.player.reset(revive);\n\t this.player.y = this.baseOffset - (this.index + 1) * props.blockHitHeight + props.blockBaseOffset;\n\t return [2];\n\t });\n\t });\n\t };\n\t GameView.prototype.start = function (revive) {\n\t if (revive === void 0) { revive = false; }\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var guideFlagKey, guideFlag;\n\t var _this = this;\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t this._playerShadow.y = this.player.y + props.playerShadowOffset;\n\t this.scoreAddTipsContainer.y = this.player.y + props.scoreAddTipsOffset;\n\t this.jumpTips.y = this.player.y + props.jumpTipsOffset.y;\n\t if (!!revive) return [3, 2];\n\t return [4, this.player.playReady()];\n\t case 1:\n\t _a.sent();\n\t _a.label = 2;\n\t case 2:\n\t console.log(\"开始\");\n\t guideFlagKey = 'jump-high-guide_' + props.guideFlagKey;\n\t guideFlag = localStorage.getItem(guideFlagKey);\n\t if (!!guideFlag) return [3, 4];\n\t localStorage.setItem(guideFlagKey, '1');\n\t return [4, this.guideLayer.show('', { y: this.stage.height + this.player.y - 280 })];\n\t case 3:\n\t _a.sent();\n\t _a.label = 4;\n\t case 4:\n\t this.lastLandType = 0;\n\t this._remainToShowGoldBag = props.goldBagScoreMultiple - props.goldBagScoreSubtraction;\n\t this._touchEnabled = true;\n\t setTimeout(function () {\n\t _this.addBlock();\n\t }, 100);\n\t engine.globalEvent.dispatchEvent('jump-high-game-start');\n\t return [2];\n\t }\n\t });\n\t });\n\t };\n\t GameView.prototype.pause = function () {\n\t if (this.currentBlock) {\n\t engine.Tween.pauseTweens(this.currentBlock);\n\t }\n\t engine.Tween.pauseTweens(this.player);\n\t };\n\t GameView.prototype.resume = function () {\n\t if (this.currentBlock) {\n\t engine.Tween.resumeTweens(this.currentBlock);\n\t }\n\t engine.Tween.resumeTweens(this.player);\n\t };\n\t GameView.prototype.revive = function () {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t this.blockContainer.getChildAt(this.index).visible = false;\n\t this.index--;\n\t return [4, this.resetPlayer(true)];\n\t case 1:\n\t _a.sent();\n\t return [4, this.playZoom('in')];\n\t case 2:\n\t _a.sent();\n\t this.start(true);\n\t return [2];\n\t }\n\t });\n\t });\n\t };\n\t GameView.prototype.addBlock = function (animation) {\n\t var _this = this;\n\t if (animation === void 0) { animation = true; }\n\t this.index++;\n\t var blockContainer = this.blockContainer;\n\t var block;\n\t if (blockContainer.children.length > this.index) {\n\t block = blockContainer.getChildAt(this.index);\n\t block.visible = true;\n\t }\n\t else {\n\t block = new Block();\n\t blockContainer.addChild(block);\n\t }\n\t block.reset({\n\t type: Math.floor(Math.random() * props.blockAssets.length),\n\t });\n\t block.y = this.baseOffset - this.index * props.blockHitHeight + props.blockBaseOffset;\n\t this.blockComplete = false;\n\t block.playEnter(this.index, animation).then(function (data) {\n\t _this.blockComplete = true;\n\t });\n\t if (animation) {\n\t this.needHitTest = true;\n\t }\n\t this.currentBlock = block;\n\t };\n\t GameView.prototype.addGoldBag = function () {\n\t var goldBag = ObjectPool.getObject(PoolName, {\n\t y: this.baseOffset - (this.blockCount + props.goldBagDistance + props.goldBagJumpSubtraction) * props.blockHitHeight,\n\t remain: props.goldBagDistance,\n\t });\n\t this.frontContainer.addChild(goldBag);\n\t this.goldBags.push(goldBag);\n\t };\n\t GameView.prototype.playOpenGoldBag = function () {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var i, li, goldBag;\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t i = 0, li = this.goldBags.length;\n\t _a.label = 1;\n\t case 1:\n\t if (!(i < li)) return [3, 4];\n\t goldBag = this.goldBags[i];\n\t goldBag.remain--;\n\t if (!(goldBag.remain <= 0)) return [3, 3];\n\t this.goldBags.splice(i, 1);\n\t i--;\n\t li--;\n\t this.nextToUpdateScore = true;\n\t return [4, goldBag.playOpen()];\n\t case 2:\n\t _a.sent();\n\t this.frontContainer.removeChild(goldBag);\n\t ObjectPool.recycleObject(PoolName, goldBag);\n\t _a.label = 3;\n\t case 3:\n\t i++;\n\t return [3, 1];\n\t case 4: return [2];\n\t }\n\t });\n\t });\n\t };\n\t GameView.prototype.onPlayerJumpOnTop = function () {\n\t if (this.nextToUpdateScore) {\n\t this.nextToUpdateScore = false;\n\t this.scoreChange(4);\n\t playSound('撞击钱袋音效');\n\t }\n\t };\n\t Object.defineProperty(GameView.prototype, \"blockCount\", {\n\t get: function () {\n\t return this.index - props.initBlockCount + 1;\n\t },\n\t enumerable: true,\n\t configurable: true\n\t });\n\t Object.defineProperty(GameView.prototype, \"pos\", {\n\t get: function () {\n\t return this._pos;\n\t },\n\t set: function (v) {\n\t this._pos = v;\n\t this.updatePos();\n\t },\n\t enumerable: true,\n\t configurable: true\n\t });\n\t GameView.prototype.updatePos = function () {\n\t this.frontContainer.y = this.stage.height + this._pos;\n\t };\n\t GameView.prototype.onEnterFrame = function (event) {\n\t if (this.needHitTest) {\n\t if (this.currentBlock) {\n\t var _a = this.currentBlock, bx = _a.x, by = _a.y, dir = _a.dir;\n\t var _b = this.player, px = _b.x, py = _b.y;\n\t var blockHitWidth = props.blockHitWidth, blockHitHeight = props.blockHitHeight, playerWidth = props.playerWidth;\n\t var hitOn = false;\n\t if (Math.abs(px - bx) < (blockHitWidth + playerWidth) / 2) {\n\t this.player.changeBaseY(by - blockHitHeight);\n\t if (py > by - blockHitHeight) {\n\t hitOn = true;\n\t }\n\t }\n\t if (hitOn) {\n\t this.onHitOn(dir);\n\t }\n\t }\n\t }\n\t };\n\t GameView.prototype.onHitOn = function (dir) {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t this._touchEnabled = false;\n\t this.needHitTest = false;\n\t clearInterval(this.timer);\n\t this.currentBlock.playHit();\n\t this._playerShadow.visible = false;\n\t this.playHitEffect(dir);\n\t return [4, this.player.hitAway(dir)];\n\t case 1:\n\t _a.sent();\n\t this.playZoom('out');\n\t return [4, this.player.parachute(dir)];\n\t case 2:\n\t _a.sent();\n\t engine.globalEvent.dispatchEvent('jump-high-game-end');\n\t return [2];\n\t }\n\t });\n\t });\n\t };\n\t GameView.prototype.jump = function () {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var result, pos, type, lastLandType;\n\t var _this = this;\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t if (!this._touchEnabled) {\n\t return [2];\n\t }\n\t this._playerShadow.visible = false;\n\t this._touchEnabled = false;\n\t this.playOpenGoldBag();\n\t return [4, this.player.jump()];\n\t case 1:\n\t result = _a.sent();\n\t if (!result) return [3, 5];\n\t if (!result.aboveBlock) return [3, 4];\n\t pos = Math.abs(this.currentBlock.x);\n\t type = 0;\n\t if (pos > 0) {\n\t type = pos > 0 && pos < props.scoreThreshold ? 2 : 3;\n\t }\n\t lastLandType = this.lastLandType;\n\t this.lastLandType = type;\n\t if (type === 0) {\n\t if (lastLandType !== type) {\n\t type = 1;\n\t }\n\t }\n\t if (type < 3) {\n\t this.currentBlock.playEffect();\n\t }\n\t if (type === 0) {\n\t this.currentBlock.playProFect();\n\t }\n\t if (type != 3) {\n\t this._playerShadow.visible = true;\n\t }\n\t this._playerShadow.y = this.player.y + props.playerShadowOffset;\n\t this.player.playLand(type, this.currentBlock.dir);\n\t this.currentBlock.stop();\n\t this.scoreChange(type);\n\t return [4, this.playShake()];\n\t case 2:\n\t _a.sent();\n\t return [4, new Promise(function (resolve) {\n\t engine.Tween.get(_this, null, null, true)\n\t .to({ pos: props.blockHitHeight * _this.index }, 300, engine.Ease.cubicOut)\n\t .call(resolve);\n\t })];\n\t case 3:\n\t _a.sent();\n\t this.addBlock();\n\t _a.label = 4;\n\t case 4:\n\t this._touchEnabled = true;\n\t _a.label = 5;\n\t case 5: return [2];\n\t }\n\t });\n\t });\n\t };\n\t GameView.prototype.scoreChange = function (type) {\n\t var scoreAdd = props.scoreWeights[type];\n\t this._score += scoreAdd;\n\t this._remainToShowGoldBag -= scoreAdd;\n\t var score = this._score;\n\t engine.globalEvent.dispatchEvent('jump-high-score', {\n\t type: type,\n\t score: score,\n\t scoreAdd: scoreAdd,\n\t });\n\t this.scoreAddTipsContainer.y = this.player.y + props.scoreAddTipsOffset;\n\t this.setScoreText(\"+\" + scoreAdd);\n\t this.jumpTips.y = this.player.y + props.jumpTipsOffset.y;\n\t this.jumpTips.show();\n\t console.log(score, this._remainToShowGoldBag);\n\t if (this._remainToShowGoldBag <= 0) {\n\t this._remainToShowGoldBag += props.goldBagScoreMultiple;\n\t this.addGoldBag();\n\t console.log('addGoldBag');\n\t }\n\t };\n\t GameView.prototype.playHitEffect = function (dir) {\n\t var hitEffect = this.hitEffect;\n\t hitEffect.scaleX = dir;\n\t hitEffect.y = this.player.y - props.hitEffectAnchor.y;\n\t hitEffect.play(true, false);\n\t hitEffect.once(engine.Event.END_FRAME, function () {\n\t this.frontContainer.removeChild(hitEffect);\n\t }, this);\n\t this.frontContainer.addChild(hitEffect);\n\t };\n\t GameView.prototype.playZoom = function (type, duration) {\n\t var _this = this;\n\t if (duration === void 0) { duration = 700; }\n\t this.background.playZoom(type, duration);\n\t var count = this.stage.height / props.blockHitHeight;\n\t return new Promise(function (resolve) {\n\t _this.frontContainer.anchorY = -props.blockHitHeight * (_this.index + count * 1.3) + props.baseOffset;\n\t var scale = type === 'in' ? 1 : Math.min((_this.stage.height / props.blockHitHeight / (_this.index + count)), props.maxScale);\n\t console.log(scale);\n\t engine.Tween.get(_this.frontContainer, null, null, true)\n\t .to({ scaleX: scale, scaleY: scale }, duration, engine.Ease.cubicInOut)\n\t .call(resolve);\n\t });\n\t };\n\t GameView.prototype.playShake = function () {\n\t var _this = this;\n\t var _a = this.frontContainer, x = _a.x, y = _a.y;\n\t return new Promise(function (resolve) {\n\t var shakeOffset = 7;\n\t var duration = 30;\n\t engine.Tween.get(_this.frontContainer, null, null, true)\n\t .to({ x: x, y: y - shakeOffset }, duration)\n\t .to({ x: x, y: y + shakeOffset }, duration)\n\t .to({ x: x + shakeOffset, y: y }, duration)\n\t .to({ x: x - shakeOffset, y: y }, duration)\n\t .to({ x: x, y: y }, duration)\n\t .call(resolve);\n\t });\n\t };\n\t return GameView;\n\t}(engine.Container));\n\n\tvar JumpHigh = (function (_super) {\n\t tslib.__extends(JumpHigh, _super);\n\t function JumpHigh() {\n\t var _this = _super.call(this) || this;\n\t engine.globalEvent.addEventListener('jump-high-reset', _this.reset, _this);\n\t engine.globalEvent.addEventListener('jump-high-start', _this.start, _this);\n\t engine.globalEvent.addEventListener('jump-high-pause', _this.pause, _this);\n\t engine.globalEvent.addEventListener('jump-high-resume', _this.resume, _this);\n\t engine.globalEvent.addEventListener('jump-high-revive', _this.revive, _this);\n\t _this.addEventListener(engine.MouseEvent.MOUSE_DOWN, _this.onTap, _this);\n\t var gameView = _this._gameView = new GameView();\n\t _this.addChild(gameView);\n\t return _this;\n\t }\n\t JumpHigh.prototype.reset = function () {\n\t this._gameView.reset();\n\t };\n\t JumpHigh.prototype.start = function (event) {\n\t {\n\t injectProps(event.data);\n\t }\n\t this._status = 1;\n\t this._gameView.start();\n\t };\n\t JumpHigh.prototype.pause = function () {\n\t this._gameView.pause();\n\t };\n\t JumpHigh.prototype.resume = function () {\n\t this._gameView.resume();\n\t };\n\t JumpHigh.prototype.revive = function () {\n\t this._gameView.revive();\n\t };\n\t JumpHigh.prototype.onTap = function (event) {\n\t this._gameView.jump();\n\t };\n\t return JumpHigh;\n\t}(engine.Container));\n\n\tfunction index (props) {\n\t prepareProps();\n\t injectProps(props);\n\t var instance = new JumpHigh();\n\t return instance;\n\t}\n\n\treturn index;\n\n})));\n" "code": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('tslib')) :\n\ttypeof define === 'function' && define.amd ? define(['tslib'], factory) :\n\t(global = global || self, global['jump-high-2'] = factory(global.tslib));\n}(this, (function (tslib) { 'use strict';\n\n\tvar props = {};\n\tfunction prepareProps() {\n\t var metaProps = getProps();\n\t engine.injectProp(props, metaProps);\n\t}\n\tfunction injectProps(p) {\n\t engine.injectProp(props, p);\n\t}\n\t//# sourceMappingURL=props.js.map\n\n\tfunction getTexture(uuid) {\n\t return engine.Texture.from(getAssetByUUID(uuid).uuid);\n\t}\n\tfunction getTextureByName(name) {\n\t return getTexture(engine.getAssetByName(name).uuid);\n\t}\n\tfunction getBlockAsset(type) {\n\t return engine.getAssetByName(props.blockAssets[type]);\n\t}\n\tfunction getBlockHitAsset(type) {\n\t console.log(\"props.blockHitAssets\", props.blockHitAssets);\n\t return engine.getAssetByName(props.blockHitAssets[type]);\n\t}\n\tfunction createSvga(name, anchorName) {\n\t var inst = new svga.Svga();\n\t inst.source = 'asset://' + engine.getAssetByName(name).uuid;\n\t var anchor = props[(anchorName)];\n\t if (anchor) {\n\t inst.x = -anchor.x;\n\t inst.y = -anchor.y;\n\t inst.anchorX = anchor.x;\n\t inst.anchorY = anchor.y;\n\t }\n\t return inst;\n\t}\n\tfunction playSound(name) {\n\t engine.playSound(engine.getAssetByName(name).uuid, { keep: true });\n\t}\n\t//# sourceMappingURL=utils.js.map\n\n\tvar Block = (function (_super) {\n\t tslib.__extends(Block, _super);\n\t function Block() {\n\t var _this = _super.call(this) || this;\n\t var body = _this.body = new svga.Svga();\n\t body.x = -props.blockWidth / 2;\n\t body.y = -props.blockHitHeight - props.blockPaddingTop;\n\t _this.addChild(body);\n\t var bodyHit = _this.bodyHit = new svga.Svga();\n\t bodyHit.x = -props.blockWidth / 2;\n\t bodyHit.y = -props.blockHitHeight - props.blockPaddingTop + props.blockHitOffsetY;\n\t _this.addChild(bodyHit);\n\t console.log(\"props.blockProfectOffset\", props.blockProfectOffset);\n\t var bodyProfect = _this.bodyProfect = new svga.Svga();\n\t bodyProfect.x = -props.blockWidth / 2 + props.blockProfectOffset.x;\n\t bodyProfect.y = -props.blockHitHeight - props.blockPaddingTop + props.blockProfectOffset.y;\n\t _this.addChild(bodyProfect);\n\t return _this;\n\t }\n\t Block.prototype.reset = function (_a) {\n\t var type = _a.type;\n\t this.dir = Math.random() > 0.5 ? 1 : -1;\n\t if (this.type != type) {\n\t this.type = type;\n\t var asset = getBlockAsset(type);\n\t this.body.source = 'asset://' + asset.uuid;\n\t var assetHit = getBlockHitAsset(type);\n\t console.log(\"assetHit\", assetHit);\n\t this.bodyHit.source = 'asset://' + assetHit.uuid;\n\t }\n\t this.bodyProfect.source = 'asset://' + engine.getAssetByName(\"完美方块素材\").uuid;\n\t this.scaleX = this.dir;\n\t this.body.gotoAndStop(1);\n\t this.bodyHit.gotoAndStop(1);\n\t this.bodyProfect.gotoAndStop(1);\n\t this.body.visible = true;\n\t this.bodyHit.visible = false;\n\t };\n\t Block.prototype.playEnter = function (index, animation) {\n\t var _this = this;\n\t this.visible = true;\n\t this.x = this.dir * this.stage.width;\n\t var _a = props.blockDurationRange, min = _a[0], max = _a[1];\n\t var duration = Math.max(max - index * props.blockDurationStep, min);\n\t duration = duration + max * Math.random() * props.blockDurationRandom * (Math.random() > 0.5 ? 1 : -1);\n\t return new Promise(function (resolve) {\n\t if (animation) {\n\t engine.Tween.get(_this, null, null, true)\n\t .to({ x: 0, }, duration)\n\t .call(resolve);\n\t }\n\t else {\n\t _this.x = 0;\n\t setTimeout(function () {\n\t console.log(_this.body);\n\t }, 200);\n\t resolve();\n\t }\n\t });\n\t };\n\t Block.prototype.playLeave = function () {\n\t this.visible = false;\n\t };\n\t Block.prototype.playEffect = function () {\n\t var body = this.body;\n\t body.play(true, false);\n\t body.once(engine.Event.END_FRAME, function () {\n\t body.gotoAndStop(1);\n\t }, this);\n\t };\n\t Block.prototype.playHit = function () {\n\t var bodyHit = this.bodyHit;\n\t bodyHit.play(true, false);\n\t this.body.visible = false;\n\t this.bodyHit.visible = true;\n\t bodyHit.once(engine.Event.END_FRAME, function () {\n\t this.body.visible = true;\n\t this.bodyHit.visible = false;\n\t bodyHit.gotoAndStop(1);\n\t }, this);\n\t };\n\t Block.prototype.playProFect = function () {\n\t var bodyProfect = this.bodyProfect;\n\t bodyProfect.play(true, false);\n\t bodyProfect.once(engine.Event.END_FRAME, function () {\n\t bodyProfect.gotoAndStop(1);\n\t }, this);\n\t };\n\t Block.prototype.stop = function () {\n\t engine.Tween.removeTweens(this);\n\t };\n\t return Block;\n\t}(engine.Container));\n\t//# sourceMappingURL=Block.js.map\n\n\tvar Background = (function (_super) {\n\t tslib.__extends(Background, _super);\n\t function Background() {\n\t return _super.call(this) || this;\n\t }\n\t Background.prototype.setup = function () {\n\t var _a = this.stage, width = _a.width, height = _a.height;\n\t var bg = this._bg = new engine.Image(getTextureByName('背景图'));\n\t bg.anchorX = bg.width / 2;\n\t bg.anchorY = bg.height / 2;\n\t bg.x = -(bg.width - width) / 2;\n\t bg.y = -(bg.height - height) / 2;\n\t this.addChild(bg);\n\t this._minScale = width / bg.width;\n\t };\n\t Background.prototype.playZoom = function (type, duration) {\n\t var _this = this;\n\t if (duration === void 0) { duration = 700; }\n\t return new Promise(function (resolve) {\n\t var scale = type === 'in' ? 1 : _this._minScale;\n\t engine.Tween.get(_this._bg, null, null, true)\n\t .to({ scaleX: scale, scaleY: scale }, duration, engine.Ease.cubicInOut)\n\t .call(resolve);\n\t });\n\t };\n\t return Background;\n\t}(engine.Container));\n\t//# sourceMappingURL=Background.js.map\n\n\tvar svgaAssets = {\n\t aniReady: { name: '准备立正', dir: 1 },\n\t aniReady2: { name: '准备立正', dir: 1 },\n\t aniJump: { name: '跳上升', dir: 1 },\n\t aniFall: { name: '跳下落', dir: 1 },\n\t aniLandNormal: { name: '普通着地', dir: 1 },\n\t aniLandSide: { name: '边缘着地', dir: -1 },\n\t aniHit: { name: '被撞开', dir: -1 },\n\t aniParachute: { name: '降落', dir: -1 },\n\t aniLandPerfect: { name: '完美着地_笑', dir: 1 },\n\t};\n\tvar Player = (function (_super) {\n\t tslib.__extends(Player, _super);\n\t function Player() {\n\t var _this = _super.call(this) || this;\n\t _this.g = props.gravity;\n\t _this.addEventListener(engine.Event.ENTER_FRAME, _this.onEnterFrame, _this);\n\t return _this;\n\t }\n\t Player.prototype.switchAni = function (name, dir, play, loop) {\n\t var _this = this;\n\t if (dir === void 0) { dir = 1; }\n\t if (play === void 0) { play = true; }\n\t if (loop === void 0) { loop = false; }\n\t return new Promise(function (resolve) {\n\t _this.scaleX = dir;\n\t if (_this._aniName !== name) {\n\t _this._aniName = name;\n\t var oldAni = _this.removeChild(_this.getChildByName('body'));\n\t if (oldAni) {\n\t oldAni.stop();\n\t }\n\t var ani = _this._currentAni = _this['ani' + name];\n\t _this.addChild(ani);\n\t if (play) {\n\t ani.play(false, loop);\n\t if (loop) {\n\t resolve();\n\t }\n\t else {\n\t ani.once(engine.Event.END_FRAME, resolve);\n\t }\n\t }\n\t else {\n\t resolve();\n\t }\n\t }\n\t });\n\t };\n\t Player.prototype.setup = function () {\n\t this.prefectEffect = createSvga('完美着地特效', 'playerLandPrefectAnchor');\n\t this.landEffect = createSvga('着地特效', 'playerLandEffectAnchor');\n\t for (var key in svgaAssets) {\n\t var _a = svgaAssets[key], name = _a.name, dir = _a.dir;\n\t var body = this[key] = createSvga(name, key.replace('ani', 'player') + 'Anchor');\n\t body.name = 'body';\n\t body.scaleX = dir;\n\t }\n\t };\n\t Player.prototype.reset = function (revive) {\n\t this.x = 0;\n\t this.rotation = 0;\n\t this.scaleX = this.scaleY = 1;\n\t this._prefectLandCounting = 0;\n\t engine.Tween.removeTweens(this);\n\t if (revive) {\n\t this.switchAni('Jump', 1, false);\n\t }\n\t };\n\t Player.prototype.playReady = function () {\n\t var _this = this;\n\t return new Promise(function (resolve) {\n\t _this.switchAni('Ready', 1);\n\t _this._currentAni.once(engine.Event.END_FRAME, function () {\n\t this.switchAni('Ready2', 1, true, true);\n\t resolve();\n\t }, _this);\n\t });\n\t };\n\t Player.prototype.onEnterFrame = function (event) {\n\t if (!this.playing) {\n\t return;\n\t }\n\t this.vy += this.g;\n\t this.y += this.vy;\n\t if (this.vy > 0 && this._aniName !== 'Fall') {\n\t this.dispatchEvent('jump-on-top');\n\t this.switchAni('Fall');\n\t }\n\t if (this.y > this.baseY) {\n\t this.y = this.baseY;\n\t this.playing = false;\n\t this.jumpPromise && this.jumpPromise({\n\t aboveBlock: this.aboveBlock,\n\t });\n\t this.jumpPromise = null;\n\t }\n\t };\n\t Player.prototype.changeBaseY = function (v) {\n\t if (this.baseY == v) {\n\t return;\n\t }\n\t this.aboveBlock = true;\n\t this.baseY = v;\n\t };\n\t Player.prototype.jump = function () {\n\t var _this = this;\n\t playSound('跳起音效');\n\t this.switchAni('Jump', 1, false);\n\t this._currentAni.play(false, false);\n\t this.aboveBlock = false;\n\t this.playing = true;\n\t this.baseY = this.y;\n\t this.vy = -props.jumpSpeed;\n\t return new Promise(function (resolve) {\n\t _this.jumpPromise = resolve;\n\t });\n\t };\n\t Player.prototype.playLand = function (type, dir) {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var _a, prefectEffect_1, landEffect_1;\n\t return tslib.__generator(this, function (_b) {\n\t switch (_b.label) {\n\t case 0:\n\t _a = type;\n\t switch (_a) {\n\t case 0: return [3, 1];\n\t case 1: return [3, 4];\n\t case 2: return [3, 4];\n\t case 3: return [3, 5];\n\t }\n\t return [3, 6];\n\t case 1:\n\t this._prefectLandCounting++;\n\t playSound('完美落地音效' + Math.min(4, this._prefectLandCounting));\n\t prefectEffect_1 = this.prefectEffect;\n\t this.addChildAt(prefectEffect_1, 0);\n\t prefectEffect_1.gotoAndPlay(1);\n\t prefectEffect_1.once(engine.Event.END_FRAME, function () {\n\t this.removeChild(prefectEffect_1);\n\t }, this);\n\t landEffect_1 = this.landEffect;\n\t this.addChildAt(landEffect_1, 0);\n\t landEffect_1.gotoAndPlay(1);\n\t landEffect_1.once(engine.Event.END_FRAME, function () {\n\t this.removeChild(landEffect_1);\n\t }, this);\n\t return [4, this.switchAni('LandPerfect')];\n\t case 2:\n\t _b.sent();\n\t return [4, this.switchAni('Ready2', 1, true, true)];\n\t case 3:\n\t _b.sent();\n\t return [3, 6];\n\t case 4:\n\t this._prefectLandCounting = 0;\n\t playSound('普通落地音效');\n\t this.switchAni('Ready2', 1, true, true);\n\t return [3, 6];\n\t case 5:\n\t this._prefectLandCounting = 0;\n\t playSound('边缘落地音效');\n\t this.switchAni('LandSide', dir);\n\t return [3, 6];\n\t case 6: return [2];\n\t }\n\t });\n\t });\n\t };\n\t Player.prototype.hitAway = function (dir) {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var _this = this;\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t this.jumpPromise && this.jumpPromise();\n\t this.jumpPromise = null;\n\t playSound('被撞开音效');\n\t this.switchAni('Hit', dir);\n\t this.vy = 0;\n\t return [4, new Promise(function (resolve) {\n\t engine.Tween.get(_this)\n\t .to({\n\t x: -dir * props.hitAwayDistance.x,\n\t }, props.hitAwayDuration, engine.Ease.quartOut);\n\t engine.Tween.get(_this)\n\t .to({\n\t y: _this.y + props.hitAwayDistance.y,\n\t }, props.hitAwayDuration, engine.Ease.cubicOut)\n\t .call(resolve);\n\t })];\n\t case 1:\n\t _a.sent();\n\t return [2];\n\t }\n\t });\n\t });\n\t };\n\t Player.prototype.parachute = function (dir) {\n\t var _this = this;\n\t this.switchAni('Parachute', dir);\n\t return new Promise(function (resolve) {\n\t engine.Tween.get(_this)\n\t .wait(200)\n\t .call(function () {\n\t playSound('降落伞下落音效');\n\t })\n\t .wait(300)\n\t .to({ y: _this.y + props.parachuteDistance }, props.parachuteDuration)\n\t .set({ anchorOffsetY: 0 })\n\t .call(resolve);\n\t });\n\t };\n\t return Player;\n\t}(engine.Container));\n\t//# sourceMappingURL=Player.js.map\n\n\tvar Base = (function (_super) {\n\t tslib.__extends(Base, _super);\n\t function Base() {\n\t return _super.call(this, getTextureByName('底座')) || this;\n\t }\n\t Base.prototype.setup = function () {\n\t this.x = -(this.width) / 2;\n\t };\n\t Base.prototype.reset = function () {\n\t this.y = -props.baseOffset;\n\t };\n\t return Base;\n\t}(engine.Image));\n\t//# sourceMappingURL=Base.js.map\n\n\tvar GuideLayer = (function (_super) {\n\t tslib.__extends(GuideLayer, _super);\n\t function GuideLayer() {\n\t var _this = _super.call(this) || this;\n\t _this.setup();\n\t return _this;\n\t }\n\t GuideLayer.prototype.setup = function () {\n\t };\n\t GuideLayer.prototype.show = function (id, options) {\n\t var _this = this;\n\t return new Promise(function (resolve) {\n\t _this.visible = true;\n\t if (!_this.guideMask) {\n\t var _a = _this.stage, width = _a.width, height = _a.height;\n\t var guideMask = _this.guideMask = new engine.Container();\n\t var guideHole = new engine.Image(getTextureByName('引导遮罩'));\n\t guideHole.x = (width - guideHole.width) / 2;\n\t guideHole.y = options.y;\n\t guideMask.addChild(guideHole);\n\t _this.createRect(guideMask, 0, 0, width, guideHole.y);\n\t _this.createRect(guideMask, 0, guideHole.y, guideHole.x, guideHole.height);\n\t _this.createRect(guideMask, guideHole.x + guideHole.width, guideHole.y, width - guideHole.x - guideHole.width, guideHole.height);\n\t _this.createRect(guideMask, 0, guideHole.y + guideHole.height, width, height - guideHole.y - guideHole.height);\n\t var label = _this.label = new engine.Label();\n\t label.fillColor = 'white';\n\t label.size = 25;\n\t label.text = props.guideText;\n\t label.x = (width - label.width) / 2;\n\t label.y = guideHole.y + guideHole.height + 50;\n\t guideMask.addChild(label);\n\t _this.addChild(guideMask);\n\t }\n\t _this.once(engine.MouseEvent.CLICK, function () {\n\t this.visible = false;\n\t resolve();\n\t }, _this);\n\t });\n\t };\n\t GuideLayer.prototype.createRect = function (container, x, y, width, height) {\n\t var rect = new engine.Rect();\n\t rect.x = x;\n\t rect.y = y;\n\t rect.width = width;\n\t rect.height = height;\n\t rect.fillColor = 'black';\n\t rect.alpha = 0.7;\n\t container.addChild(rect);\n\t };\n\t return GuideLayer;\n\t}(engine.Container));\n\t//# sourceMappingURL=GuideLayer.js.map\n\n\tvar GoldBag = (function (_super) {\n\t tslib.__extends(GoldBag, _super);\n\t function GoldBag() {\n\t var _this = _super.call(this) || this;\n\t _this.setup();\n\t return _this;\n\t }\n\t GoldBag.prototype.setup = function () {\n\t var avatar = this.avatar = new engine.Sprite(getTextureByName('钱袋-静态'));\n\t avatar.x = -props.goldPackAvatarAnchor.x;\n\t avatar.y = -props.goldPackAvatarAnchor.y;\n\t this.addChild(avatar);\n\t var svga = this.svga = createSvga('钱袋', 'goldPackAnchor');\n\t svga.visible = false;\n\t this.addChild(svga);\n\t };\n\t GoldBag.prototype.reset = function (data) {\n\t this.y = data.y;\n\t this.avatar.visible = true;\n\t this.svga.visible = false;\n\t this.svga.gotoAndStop(1);\n\t this.remain = data.remain;\n\t };\n\t GoldBag.prototype.playOpen = function () {\n\t var _this = this;\n\t this.avatar.visible = false;\n\t this.svga.visible = true;\n\t return new Promise(function (resolve) {\n\t _this.svga.play(true, false);\n\t _this.svga.once(engine.Event.END_FRAME, function () {\n\t this.svga.visible = false;\n\t resolve();\n\t }, _this);\n\t });\n\t };\n\t return GoldBag;\n\t}(engine.Container));\n\t//# sourceMappingURL=GoldBag.js.map\n\n\tvar JumpTips = (function (_super) {\n\t tslib.__extends(JumpTips, _super);\n\t function JumpTips() {\n\t return _super.call(this) || this;\n\t }\n\t JumpTips.prototype.setup = function () {\n\t this.width = 124;\n\t this.height = 93;\n\t var bg = this._bg = new engine.Image(getTextureByName('跳跃提示背景'));\n\t bg.width = this.width;\n\t bg.height = this.height;\n\t bg.anchorX = bg.width / 2;\n\t bg.anchorY = bg.height / 2;\n\t this.addChild(bg);\n\t var jumpTipsLabel = this._jumpTipsLabel = new engine.Label();\n\t jumpTipsLabel.width = this.width;\n\t jumpTipsLabel.height = this.height;\n\t jumpTipsLabel.anchorX = jumpTipsLabel.width / 2;\n\t jumpTipsLabel.anchorY = jumpTipsLabel.height / 2;\n\t jumpTipsLabel.fillColor = \"#fc4454\";\n\t jumpTipsLabel.textAlign = engine.TEXT_ALIGN.CENTER;\n\t jumpTipsLabel.verticalAlign = engine.VERTICAL_ALIGN.MIDDLE;\n\t jumpTipsLabel.size = 24;\n\t jumpTipsLabel.rotation = -26;\n\t jumpTipsLabel.text = \"+00\";\n\t jumpTipsLabel.x = 0;\n\t jumpTipsLabel.y = 0;\n\t this.addChild(jumpTipsLabel);\n\t this.alpha = 0;\n\t };\n\t JumpTips.prototype.show = function () {\n\t var _this = this;\n\t return new Promise(function (resolve) {\n\t _this._jumpTipsLabel.text = props.jumpTips[parseInt((Math.random() * props.jumpTips.length) + \"\")];\n\t _this.alpha = 1;\n\t engine.Tween.get(_this, null, null, true)\n\t .wait(800)\n\t .to({ alpha: 0 }, 200, engine.Ease.cubicInOut)\n\t .call(resolve);\n\t });\n\t };\n\t return JumpTips;\n\t}(engine.Container));\n\t//# sourceMappingURL=JumpTips.js.map\n\n\tvar ObjectPool = engine.ObjectPool;\n\tvar PoolName = 'gold-bag';\n\tObjectPool.registerPool(PoolName, function () {\n\t return new GoldBag();\n\t}, function (item, data) {\n\t item.reset(data);\n\t});\n\tvar GameView = (function (_super) {\n\t tslib.__extends(GameView, _super);\n\t function GameView() {\n\t var _this = _super.call(this) || this;\n\t _this.index = -1;\n\t _this.goldBags = [];\n\t _this.baseOffset = -props.baseOffset + props.playerOffset;\n\t _this.once(engine.Event.ADDED_TO_STAGE, _this.setup, _this);\n\t return _this;\n\t }\n\t GameView.prototype.setup = function () {\n\t if (this._hasSetup) {\n\t return;\n\t }\n\t this._hasSetup = true;\n\t var _a = this.stage, width = _a.width, height = _a.height;\n\t var background = this.background = new Background();\n\t this.addChild(background);\n\t background.setup();\n\t var frontContainer = this.frontContainer = new engine.Container();\n\t frontContainer.x = width / 2;\n\t this.addChild(frontContainer);\n\t var guideLayer = this.guideLayer = new GuideLayer();\n\t this.addChild(guideLayer);\n\t var base = this.base = new Base();\n\t frontContainer.addChild(base);\n\t base.setup();\n\t var blockShadow = this._blockShadow = new engine.Image(getTextureByName('方块阴影'));\n\t blockShadow.anchorX = blockShadow.width / 2;\n\t blockShadow.anchorY = blockShadow.height / 2;\n\t blockShadow.x = -(blockShadow.width - base.width) / 2;\n\t blockShadow.y = props.blockShadowOffset;\n\t base.addChild(blockShadow);\n\t var blockContainer = this.blockContainer = new engine.Container();\n\t frontContainer.addChild(blockContainer);\n\t var player = this.player = new Player();\n\t frontContainer.addChild(player);\n\t player.setup();\n\t player.addEventListener('jump-on-top', this.onPlayerJumpOnTop, this);\n\t var playerShadow = this._playerShadow = new engine.Image(getTextureByName('玩家阴影'));\n\t playerShadow.anchorX = playerShadow.width / 2;\n\t playerShadow.anchorY = playerShadow.height / 2;\n\t playerShadow.x = this.player.x - playerShadow.width / 2;\n\t var scoreAddTipsContainer = this.scoreAddTipsContainer = new engine.Container();\n\t scoreAddTipsContainer.width = 750;\n\t scoreAddTipsContainer.anchorX = scoreAddTipsContainer.width / 2;\n\t scoreAddTipsContainer.anchorY = scoreAddTipsContainer.height / 2;\n\t var scoreAddTips = this.scoreAddTips = new engine.Label();\n\t scoreAddTips.width = 750;\n\t scoreAddTips.fillColor = props.scoreAddFontColor;\n\t scoreAddTips.textAlign = engine.TEXT_ALIGN.CENTER;\n\t scoreAddTips.size = props.scoreAddFontSize;\n\t scoreAddTips.alpha = 0;\n\t scoreAddTips.text = \"+0\";\n\t scoreAddTips.x = this.player.x - scoreAddTips.width / 2;\n\t scoreAddTipsContainer.addChild(scoreAddTips);\n\t var jumpTips = this.jumpTips = new JumpTips();\n\t jumpTips.setup();\n\t jumpTips.x = props.jumpTipsOffset.x;\n\t frontContainer.addChild(playerShadow);\n\t frontContainer.addChild(player);\n\t frontContainer.addChild(scoreAddTipsContainer);\n\t frontContainer.addChild(jumpTips);\n\t ObjectPool.recycleObject(PoolName, ObjectPool.getObject(PoolName, {\n\t y: 0,\n\t remain: 0,\n\t }));\n\t this.hitEffect = createSvga('被撞烟雾', 'hitEffectAnchor');\n\t this.pos = 0;\n\t this.background.setup();\n\t this.addEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this);\n\t this.reset();\n\t };\n\t GameView.prototype.setScoreText = function (score) {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var _this = this;\n\t return tslib.__generator(this, function (_a) {\n\t return [2, new Promise(function (resolve) {\n\t _this.scoreAddTips.text = score;\n\t _this.scoreAddTips.y = 0;\n\t _this.scoreAddTips.alpha = 1;\n\t engine.Tween.get(_this.scoreAddTips, null, null, true)\n\t .to({ y: -100, alpha: 0 }, 500, engine.Ease.cubicInOut)\n\t .call(resolve);\n\t })];\n\t });\n\t });\n\t };\n\t GameView.prototype.reset = function (revive) {\n\t if (revive === void 0) { revive = false; }\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var blockContainer, i, li, block, i, i, li, goldBag;\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t this.base.reset();\n\t this.index = -1;\n\t this._score = 0;\n\t if (revive) ;\n\t else {\n\t this.pos = 0;\n\t blockContainer = this.blockContainer;\n\t for (i = 0, li = blockContainer.children.length; i < li; i++) {\n\t block = blockContainer.getChildAt(i);\n\t block.playLeave();\n\t }\n\t }\n\t for (i = 0; i < props.initBlockCount; i++) {\n\t this.addBlock(false);\n\t }\n\t for (i = 0, li = this.goldBags.length; i < li; i++) {\n\t goldBag = this.goldBags[i];\n\t this.frontContainer.removeChild(goldBag);\n\t ObjectPool.recycleObject(PoolName, goldBag);\n\t }\n\t this.goldBags.splice(0);\n\t this.playZoom('in');\n\t return [4, this.resetPlayer(revive)];\n\t case 1:\n\t _a.sent();\n\t return [2];\n\t }\n\t });\n\t });\n\t };\n\t GameView.prototype.resetPlayer = function (revive) {\n\t if (revive === void 0) { revive = false; }\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t return tslib.__generator(this, function (_a) {\n\t this.player.reset(revive);\n\t this.player.y = this.baseOffset - (this.index + 1) * props.blockHitHeight + props.blockBaseOffset;\n\t return [2];\n\t });\n\t });\n\t };\n\t GameView.prototype.start = function (revive) {\n\t if (revive === void 0) { revive = false; }\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var guideFlagKey, guideFlag;\n\t var _this = this;\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t this._playerShadow.y = this.player.y + props.playerShadowOffset;\n\t this.scoreAddTipsContainer.y = this.player.y + props.scoreAddTipsOffset;\n\t this.jumpTips.y = this.player.y + props.jumpTipsOffset.y;\n\t if (!!revive) return [3, 2];\n\t return [4, this.player.playReady()];\n\t case 1:\n\t _a.sent();\n\t _a.label = 2;\n\t case 2:\n\t console.log(\"开始\");\n\t guideFlagKey = 'jump-high-guide_' + props.guideFlagKey;\n\t guideFlag = localStorage.getItem(guideFlagKey);\n\t if (!!guideFlag) return [3, 4];\n\t localStorage.setItem(guideFlagKey, '1');\n\t return [4, this.guideLayer.show('', { y: this.stage.height + this.player.y - 280 })];\n\t case 3:\n\t _a.sent();\n\t _a.label = 4;\n\t case 4:\n\t this.lastLandType = 0;\n\t this._remainToShowGoldBag = props.goldBagScoreMultiple - props.goldBagScoreSubtraction;\n\t this._touchEnabled = true;\n\t setTimeout(function () {\n\t _this.addBlock();\n\t }, 100);\n\t engine.globalEvent.dispatchEvent('jump-high-game-start');\n\t return [2];\n\t }\n\t });\n\t });\n\t };\n\t GameView.prototype.pause = function () {\n\t if (this.currentBlock) {\n\t engine.Tween.pauseTweens(this.currentBlock);\n\t }\n\t engine.Tween.pauseTweens(this.player);\n\t };\n\t GameView.prototype.resume = function () {\n\t if (this.currentBlock) {\n\t engine.Tween.resumeTweens(this.currentBlock);\n\t }\n\t engine.Tween.resumeTweens(this.player);\n\t };\n\t GameView.prototype.revive = function () {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t this.blockContainer.getChildAt(this.index).visible = false;\n\t this.index--;\n\t return [4, this.resetPlayer(true)];\n\t case 1:\n\t _a.sent();\n\t return [4, this.playZoom('in')];\n\t case 2:\n\t _a.sent();\n\t this.start(true);\n\t return [2];\n\t }\n\t });\n\t });\n\t };\n\t GameView.prototype.addBlock = function (animation) {\n\t var _this = this;\n\t if (animation === void 0) { animation = true; }\n\t this.index++;\n\t var blockContainer = this.blockContainer;\n\t var block;\n\t if (blockContainer.children.length > this.index) {\n\t block = blockContainer.getChildAt(this.index);\n\t block.visible = true;\n\t }\n\t else {\n\t block = new Block();\n\t blockContainer.addChild(block);\n\t }\n\t block.reset({\n\t type: Math.floor(Math.random() * props.blockAssets.length),\n\t });\n\t block.y = this.baseOffset - this.index * props.blockHitHeight + props.blockBaseOffset;\n\t this.blockComplete = false;\n\t block.playEnter(this.index, animation).then(function (data) {\n\t _this.blockComplete = true;\n\t });\n\t if (animation) {\n\t this.needHitTest = true;\n\t }\n\t this.currentBlock = block;\n\t };\n\t GameView.prototype.addGoldBag = function () {\n\t var goldBag = ObjectPool.getObject(PoolName, {\n\t y: this.baseOffset - (this.blockCount + props.goldBagDistance + props.goldBagJumpSubtraction) * props.blockHitHeight,\n\t remain: props.goldBagDistance,\n\t });\n\t this.frontContainer.addChild(goldBag);\n\t this.goldBags.push(goldBag);\n\t };\n\t GameView.prototype.playOpenGoldBag = function () {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var i, li, goldBag;\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t i = 0, li = this.goldBags.length;\n\t _a.label = 1;\n\t case 1:\n\t if (!(i < li)) return [3, 4];\n\t goldBag = this.goldBags[i];\n\t goldBag.remain--;\n\t if (!(goldBag.remain <= 0)) return [3, 3];\n\t this.goldBags.splice(i, 1);\n\t i--;\n\t li--;\n\t this.nextToUpdateScore = true;\n\t return [4, goldBag.playOpen()];\n\t case 2:\n\t _a.sent();\n\t this.frontContainer.removeChild(goldBag);\n\t ObjectPool.recycleObject(PoolName, goldBag);\n\t _a.label = 3;\n\t case 3:\n\t i++;\n\t return [3, 1];\n\t case 4: return [2];\n\t }\n\t });\n\t });\n\t };\n\t GameView.prototype.onPlayerJumpOnTop = function () {\n\t if (this.nextToUpdateScore) {\n\t this.nextToUpdateScore = false;\n\t this.scoreChange(4);\n\t playSound('撞击钱袋音效');\n\t }\n\t };\n\t Object.defineProperty(GameView.prototype, \"blockCount\", {\n\t get: function () {\n\t return this.index - props.initBlockCount + 1;\n\t },\n\t enumerable: true,\n\t configurable: true\n\t });\n\t Object.defineProperty(GameView.prototype, \"pos\", {\n\t get: function () {\n\t return this._pos;\n\t },\n\t set: function (v) {\n\t this._pos = v;\n\t this.updatePos();\n\t },\n\t enumerable: true,\n\t configurable: true\n\t });\n\t GameView.prototype.updatePos = function () {\n\t this.frontContainer.y = this.stage.height + this._pos;\n\t };\n\t GameView.prototype.onEnterFrame = function (event) {\n\t if (this.needHitTest) {\n\t if (this.currentBlock) {\n\t var _a = this.currentBlock, bx = _a.x, by = _a.y, dir = _a.dir;\n\t var _b = this.player, px = _b.x, py = _b.y;\n\t var blockHitWidth = props.blockHitWidth, blockHitHeight = props.blockHitHeight, playerWidth = props.playerWidth;\n\t var hitOn = false;\n\t if (Math.abs(px - bx) < (blockHitWidth + playerWidth) / 2) {\n\t this.player.changeBaseY(by - blockHitHeight);\n\t if (py > by - blockHitHeight) {\n\t hitOn = true;\n\t }\n\t }\n\t if (hitOn) {\n\t this.onHitOn(dir);\n\t }\n\t }\n\t }\n\t };\n\t GameView.prototype.onHitOn = function (dir) {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t this._touchEnabled = false;\n\t this.needHitTest = false;\n\t clearInterval(this.timer);\n\t this.currentBlock.playHit();\n\t this._playerShadow.visible = false;\n\t this.playHitEffect(dir);\n\t return [4, this.player.hitAway(dir)];\n\t case 1:\n\t _a.sent();\n\t this.playZoom('out');\n\t return [4, this.player.parachute(dir)];\n\t case 2:\n\t _a.sent();\n\t engine.globalEvent.dispatchEvent('jump-high-game-end');\n\t return [2];\n\t }\n\t });\n\t });\n\t };\n\t GameView.prototype.jump = function () {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var result, pos, type, lastLandType;\n\t var _this = this;\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t if (!this._touchEnabled) {\n\t return [2];\n\t }\n\t this._playerShadow.visible = false;\n\t this._touchEnabled = false;\n\t this.playOpenGoldBag();\n\t return [4, this.player.jump()];\n\t case 1:\n\t result = _a.sent();\n\t if (!result) return [3, 5];\n\t if (!result.aboveBlock) return [3, 4];\n\t pos = Math.abs(this.currentBlock.x);\n\t type = 0;\n\t if (pos > 0) {\n\t type = pos > 0 && pos < props.scoreThreshold ? 2 : 3;\n\t }\n\t lastLandType = this.lastLandType;\n\t this.lastLandType = type;\n\t if (type === 0) {\n\t if (lastLandType !== type) {\n\t type = 1;\n\t }\n\t }\n\t if (type < 3) {\n\t this.currentBlock.playEffect();\n\t }\n\t if (type === 0) {\n\t this.currentBlock.playProFect();\n\t }\n\t if (type != 3) {\n\t this._playerShadow.visible = true;\n\t }\n\t this._playerShadow.y = this.player.y + props.playerShadowOffset;\n\t this.player.playLand(type, this.currentBlock.dir);\n\t this.currentBlock.stop();\n\t this.scoreChange(type);\n\t return [4, this.playShake()];\n\t case 2:\n\t _a.sent();\n\t return [4, new Promise(function (resolve) {\n\t engine.Tween.get(_this, null, null, true)\n\t .to({ pos: props.blockHitHeight * _this.index }, 300, engine.Ease.cubicOut)\n\t .call(resolve);\n\t })];\n\t case 3:\n\t _a.sent();\n\t this.addBlock();\n\t _a.label = 4;\n\t case 4:\n\t this._touchEnabled = true;\n\t _a.label = 5;\n\t case 5: return [2];\n\t }\n\t });\n\t });\n\t };\n\t GameView.prototype.scoreChange = function (type) {\n\t var scoreAdd = props.scoreWeights[type];\n\t this._score += scoreAdd;\n\t this._remainToShowGoldBag -= scoreAdd;\n\t var score = this._score;\n\t engine.globalEvent.dispatchEvent('jump-high-score', {\n\t type: type,\n\t score: score,\n\t scoreAdd: scoreAdd,\n\t });\n\t this.scoreAddTipsContainer.y = this.player.y + props.scoreAddTipsOffset;\n\t this.setScoreText(\"+\" + scoreAdd);\n\t this.jumpTips.y = this.player.y + props.jumpTipsOffset.y;\n\t this.jumpTips.show();\n\t console.log(score, this._remainToShowGoldBag);\n\t if (this._remainToShowGoldBag <= 0) {\n\t this._remainToShowGoldBag += props.goldBagScoreMultiple;\n\t this.addGoldBag();\n\t console.log('addGoldBag');\n\t }\n\t };\n\t GameView.prototype.playHitEffect = function (dir) {\n\t var hitEffect = this.hitEffect;\n\t hitEffect.scaleX = dir;\n\t hitEffect.y = this.player.y - props.hitEffectAnchor.y;\n\t hitEffect.play(true, false);\n\t hitEffect.once(engine.Event.END_FRAME, function () {\n\t this.frontContainer.removeChild(hitEffect);\n\t }, this);\n\t this.frontContainer.addChild(hitEffect);\n\t };\n\t GameView.prototype.playZoom = function (type, duration) {\n\t var _this = this;\n\t if (duration === void 0) { duration = 700; }\n\t this.background.playZoom(type, duration);\n\t var count = this.stage.height / props.blockHitHeight;\n\t return new Promise(function (resolve) {\n\t _this.frontContainer.anchorY = -props.blockHitHeight * (_this.index + count * 1.3) + props.baseOffset;\n\t var scale = type === 'in' ? 1 : Math.min((_this.stage.height / props.blockHitHeight / (_this.index + count)), props.maxScale);\n\t console.log(scale);\n\t engine.Tween.get(_this.frontContainer, null, null, true)\n\t .to({ scaleX: scale, scaleY: scale }, duration, engine.Ease.cubicInOut)\n\t .call(resolve);\n\t });\n\t };\n\t GameView.prototype.playShake = function () {\n\t var _this = this;\n\t var _a = this.frontContainer, x = _a.x, y = _a.y;\n\t return new Promise(function (resolve) {\n\t var shakeOffset = 7;\n\t var duration = 30;\n\t engine.Tween.get(_this.frontContainer, null, null, true)\n\t .to({ x: x, y: y - shakeOffset }, duration)\n\t .to({ x: x, y: y + shakeOffset }, duration)\n\t .to({ x: x + shakeOffset, y: y }, duration)\n\t .to({ x: x - shakeOffset, y: y }, duration)\n\t .to({ x: x, y: y }, duration)\n\t .call(resolve);\n\t });\n\t };\n\t return GameView;\n\t}(engine.Container));\n\n\tvar JumpHigh = (function (_super) {\n\t tslib.__extends(JumpHigh, _super);\n\t function JumpHigh() {\n\t var _this = _super.call(this) || this;\n\t engine.globalEvent.addEventListener('jump-high-reset', _this.reset, _this);\n\t engine.globalEvent.addEventListener('jump-high-start', _this.start, _this);\n\t engine.globalEvent.addEventListener('jump-high-pause', _this.pause, _this);\n\t engine.globalEvent.addEventListener('jump-high-resume', _this.resume, _this);\n\t engine.globalEvent.addEventListener('jump-high-revive', _this.revive, _this);\n\t _this.addEventListener(engine.MouseEvent.MOUSE_DOWN, _this.onTap, _this);\n\t var gameView = _this._gameView = new GameView();\n\t _this.addChild(gameView);\n\t return _this;\n\t }\n\t JumpHigh.prototype.reset = function () {\n\t this._gameView.reset();\n\t };\n\t JumpHigh.prototype.start = function (event) {\n\t {\n\t injectProps(event.data);\n\t }\n\t this._status = 1;\n\t this._gameView.start();\n\t };\n\t JumpHigh.prototype.pause = function () {\n\t this._gameView.pause();\n\t };\n\t JumpHigh.prototype.resume = function () {\n\t this._gameView.resume();\n\t };\n\t JumpHigh.prototype.revive = function () {\n\t this._gameView.revive();\n\t };\n\t JumpHigh.prototype.onTap = function (event) {\n\t this._gameView.jump();\n\t };\n\t return JumpHigh;\n\t}(engine.Container));\n\t//# sourceMappingURL=JumpHigh.js.map\n\n\tfunction index (props) {\n\t prepareProps();\n\t injectProps(props);\n\t var instance = new JumpHigh();\n\t return instance;\n\t}\n\t//# sourceMappingURL=index.js.map\n\n\treturn index;\n\n})));\n"
} }
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
function injectProps(p) { function injectProps(p) {
engine.injectProp(props, p); engine.injectProp(props, p);
} }
//# sourceMappingURL=props.js.map
function getTexture(uuid) { function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid); return engine.Texture.from(getAssetByUUID(uuid).uuid);
...@@ -41,6 +42,7 @@ ...@@ -41,6 +42,7 @@
function playSound(name) { function playSound(name) {
engine.playSound(engine.getAssetByName(name).uuid, { keep: true }); engine.playSound(engine.getAssetByName(name).uuid, { keep: true });
} }
//# sourceMappingURL=utils.js.map
var Block = (function (_super) { var Block = (function (_super) {
tslib.__extends(Block, _super); tslib.__extends(Block, _super);
...@@ -135,6 +137,7 @@ ...@@ -135,6 +137,7 @@
}; };
return Block; return Block;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=Block.js.map
var Background = (function (_super) { var Background = (function (_super) {
tslib.__extends(Background, _super); tslib.__extends(Background, _super);
...@@ -163,6 +166,7 @@ ...@@ -163,6 +166,7 @@
}; };
return Background; return Background;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=Background.js.map
var svgaAssets = { var svgaAssets = {
aniReady: { name: '准备立正', dir: 1 }, aniReady: { name: '准备立正', dir: 1 },
...@@ -379,6 +383,7 @@ ...@@ -379,6 +383,7 @@
}; };
return Player; return Player;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=Player.js.map
var Base = (function (_super) { var Base = (function (_super) {
tslib.__extends(Base, _super); tslib.__extends(Base, _super);
...@@ -393,6 +398,7 @@ ...@@ -393,6 +398,7 @@
}; };
return Base; return Base;
}(engine.Image)); }(engine.Image));
//# sourceMappingURL=Base.js.map
var GuideLayer = (function (_super) { var GuideLayer = (function (_super) {
tslib.__extends(GuideLayer, _super); tslib.__extends(GuideLayer, _super);
...@@ -445,6 +451,7 @@ ...@@ -445,6 +451,7 @@
}; };
return GuideLayer; return GuideLayer;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=GuideLayer.js.map
var GoldBag = (function (_super) { var GoldBag = (function (_super) {
tslib.__extends(GoldBag, _super); tslib.__extends(GoldBag, _super);
...@@ -483,6 +490,7 @@ ...@@ -483,6 +490,7 @@
}; };
return GoldBag; return GoldBag;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=GoldBag.js.map
var JumpTips = (function (_super) { var JumpTips = (function (_super) {
tslib.__extends(JumpTips, _super); tslib.__extends(JumpTips, _super);
...@@ -527,6 +535,7 @@ ...@@ -527,6 +535,7 @@
}; };
return JumpTips; return JumpTips;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=JumpTips.js.map
var ObjectPool = engine.ObjectPool; var ObjectPool = engine.ObjectPool;
var PoolName = 'gold-bag'; var PoolName = 'gold-bag';
...@@ -584,9 +593,9 @@ ...@@ -584,9 +593,9 @@
scoreAddTipsContainer.anchorY = scoreAddTipsContainer.height / 2; scoreAddTipsContainer.anchorY = scoreAddTipsContainer.height / 2;
var scoreAddTips = this.scoreAddTips = new engine.Label(); var scoreAddTips = this.scoreAddTips = new engine.Label();
scoreAddTips.width = 750; scoreAddTips.width = 750;
scoreAddTips.fillColor = "#fc4454"; scoreAddTips.fillColor = props.scoreAddFontColor;
scoreAddTips.textAlign = engine.TEXT_ALIGN.CENTER; scoreAddTips.textAlign = engine.TEXT_ALIGN.CENTER;
scoreAddTips.size = 50; scoreAddTips.size = props.scoreAddFontSize;
scoreAddTips.alpha = 0; scoreAddTips.alpha = 0;
scoreAddTips.text = "+0"; scoreAddTips.text = "+0";
scoreAddTips.x = this.player.x - scoreAddTips.width / 2; scoreAddTips.x = this.player.x - scoreAddTips.width / 2;
...@@ -1041,6 +1050,7 @@ ...@@ -1041,6 +1050,7 @@
}; };
return JumpHigh; return JumpHigh;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=JumpHigh.js.map
function index (props) { function index (props) {
prepareProps(); prepareProps();
...@@ -1048,6 +1058,7 @@ ...@@ -1048,6 +1058,7 @@
var instance = new JumpHigh(); var instance = new JumpHigh();
return instance; return instance;
} }
//# sourceMappingURL=index.js.map
return index; return index;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -162,6 +162,16 @@ ...@@ -162,6 +162,16 @@
"type": "number", "type": "number",
"default": -130 "default": -130
}, },
"scoreAddFontColor": {
"alias": "加分提示字体颜色",
"type": "string",
"default": "#fc4454"
},
"scoreAddFontSize": {
"alias": "加分提示字体颜色",
"type": "number",
"default": 50
},
"jumpTipsOffset": { "jumpTipsOffset": {
"alias": "跳跃文案偏移", "alias": "跳跃文案偏移",
"type": "vector2", "type": "vector2",
......
...@@ -117,9 +117,9 @@ export default class GameView extends engine.Container { ...@@ -117,9 +117,9 @@ export default class GameView extends engine.Container {
let scoreAddTips = this.scoreAddTips = new engine.Label(); let scoreAddTips = this.scoreAddTips = new engine.Label();
scoreAddTips.width=750; scoreAddTips.width=750;
scoreAddTips.fillColor = "#fc4454"; scoreAddTips.fillColor = props.scoreAddFontColor;
scoreAddTips.textAlign=engine.TEXT_ALIGN.CENTER; scoreAddTips.textAlign=engine.TEXT_ALIGN.CENTER;
scoreAddTips.size = 50; scoreAddTips.size = props.scoreAddFontSize;
scoreAddTips.alpha=0; scoreAddTips.alpha=0;
scoreAddTips.text = "+0"; scoreAddTips.text = "+0";
scoreAddTips.x = this.player.x-scoreAddTips.width / 2; scoreAddTips.x = this.player.x-scoreAddTips.width / 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment