Commit 87765894 authored by Master Q's avatar Master Q

游戏页面修改 +提交分数逻辑防止重复提交

parent 540aa936
......@@ -48,7 +48,9 @@
<body>
<script>
const app = {};
const app = {
isLarge: false
};
function getApp() {
return app;
......
......@@ -24,8 +24,8 @@ class TuiaAutoUpload {
var _this = this;
this.client = new OSS({
region: 'oss-cn-hangzhou',
accessKeyId: 'LTAI4Fw25WcfcGv7FvcHoiHK',
accessKeySecret: 'NZk1NtT9J5HFaAolNbtQdzTzLLvLYm',
accessKeyId: 'LTAI5tLEo6SbjfmNPmH7Mz3o',
accessKeySecret: '8yZ6nVMg56DEupEEMRl6rz1DcpG2R7',
bucket: _this.type === 'prod' ? 'duiba' : 'daily-duiba'
});
this.bar = new ProgressBar(chalk.yellow(` 文件上传中 [:bar] :current/${this.files().length} :percent :elapseds`), {
......
......@@ -39,8 +39,8 @@ function uploadSingleJs(url) {
const originPath = `/db_games/${url}/output.js`;
var client = new OSS({
region: 'oss-cn-hangzhou',
accessKeyId: 'LTAI4Fw25WcfcGv7FvcHoiHK',
accessKeySecret: 'NZk1NtT9J5HFaAolNbtQdzTzLLvLYm',
accessKeyId: 'LTAI5tLEo6SbjfmNPmH7Mz3o',
accessKeySecret: '8yZ6nVMg56DEupEEMRl6rz1DcpG2R7',
bucket: 'duiba'
})
var originFile;
......
......@@ -3826,5 +3826,5 @@ export const ResJson = {
}
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1632799529/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/template/1632831758/resource/"
}
\ No newline at end of file
......@@ -66,6 +66,7 @@ export default class CountDownComp extends Module {
countDown(time: TimeObj, onChange: Function) {
var tobj = this.tobj = time
this.tobj && FYGE.Tween.removeTweens(this.tobj)
FYGE.Tween.get(this.tobj, {
onChange: () => {
onChange(tobj.t)
......
......@@ -23,7 +23,7 @@ export class GameOverScene extends Scene {
if (getApp().isLarge) {
icon.position.set(41, layers.stageOffsetY - 90 + 50 + layers.stageOffsetY)
} else {
icon.position.set(41, layers.stageOffsetY - 90 + 0 + layers.stageOffsetY)
icon.position.set(41, layers.stageOffsetY - 90 + 5 + layers.stageOffsetY)
}
this.y -= layers.stageOffsetY - 90
......
......@@ -15,6 +15,7 @@ import { GameOverScene } from '../GameOverScene/GameOverScene';
import { GameOverPanel } from '../../panels/GameOverPanel';
import MusicBtn from '../../common/MusicBtn';
import { yoga_fail } from '../../lotties/yoga_fail';
import { onceFnc } from '../../utils/utils';
const Container = FYGE.Container
const TEXT_ALIGN = FYGE.TEXT_ALIGN
......@@ -171,7 +172,7 @@ export class GameScene extends MotionInitScene {
var cdp = this.cdp = this.addChild(new CountDownComp(GameCfg.getInitTime()))
this.setChildIndex(this.cdp, 2)
this.cdp.addTimeoutFunc(() => {
this.cdp.addTimeoutFunc(onceFnc(() => {
this.cdp.destory()
// 销毁 instance
DeviceMotion.instance.destory()
......@@ -199,8 +200,8 @@ export class GameScene extends MotionInitScene {
})
})
})
cdp.position.set(layers.stageCenterX - 65, layers.stageOffsetY + (getApp().isLarge ? 340 - 168 : 240 - 168))
}))
cdp.position.set(layers.stageCenterX - 65, layers.stageOffsetY + (getApp().isLarge ? 170 : 120))
}
......
......@@ -308,14 +308,14 @@ export class MotionInitScene extends Scene {
set musicBoolean(m: boolean) {
if (m) {
(this.musicBtn || (this.musicBtn = UI.Btn(this, 'music-on.png', this.onMusicClick, this, 650, layers.stageOffsetY + (getApp().isLarge ? 52 : 0 )))).texture = RES.getRes('music-on.png');
(this.musicBtn || (this.musicBtn = UI.Btn(this, 'music-on.png', this.onMusicClick, this, 650, layers.stageOffsetY + (getApp().isLarge ? 52 : 5 )))).texture = RES.getRes('music-on.png');
this.musicBtn.anchorX = 30
this.musicBtn.anchorY = 30
FYGE.Tween.get(this.musicBtn, {loop: true})
.to({rotation: 360}, 5000)
} else {
(this.musicBtn || (this.musicBtn = UI.Btn(this, 'music-on.png', this.onMusicClick, this, 650, layers.stageOffsetY + (getApp().isLarge ? 52 : 168 )))).texture = RES.getRes('music-off.png');
(this.musicBtn || (this.musicBtn = UI.Btn(this, 'music-on.png', this.onMusicClick, this, 650, layers.stageOffsetY + (getApp().isLarge ? 52 : 5 )))).texture = RES.getRes('music-off.png');
FYGE.Tween.removeTweens(this.musicBtn)
this.musicBtn.rotation = 0
}
......@@ -339,7 +339,7 @@ export class MotionInitScene extends Scene {
initUi() {
UI.Rect(this, 750, 1624, 0xf1ebdd, 0, 0, 0)
var app = getApp()
UI.Sp(this, app.isNike ? 'nike-icon.png' : 'jordan-icon.png', 41, app.isLarge ? 50 + layers.stageOffsetY : 0 + layers.stageOffsetY)
UI.Sp(this, app.isNike ? 'nike-icon.png' : 'jordan-icon.png', 41, app.isLarge ? 50 + layers.stageOffsetY : 5 + layers.stageOffsetY)
// 中间的小圆
// var c = this.addChild(new FYGE.Shape())
......@@ -370,7 +370,7 @@ export class MotionInitScene extends Scene {
this.bitmapTextCount.position.set(layers.stageCenterX, layers.stageCenterY + 380)
// @ts-ignore
this.holdOnTxt = UI.Txt(this, '保持住!', 60, '#111111', FYGE.TEXT_ALIGN.CENTER, layers.stageWidth, 30, layers.stageOffsetY + (getApp().isLarge ? 340 - 168 : 240 - 168), true)
this.holdOnTxt = UI.Txt(this, '保持住!', 60, '#111111', FYGE.TEXT_ALIGN.CENTER, layers.stageWidth, 30, layers.stageOffsetY + (getApp().isLarge ? 340 - 128 : 240 - 128), true)
this.holdOnTxt.visible = false
this.holdOnTxt.anchorX = layers.stageWidth / 2
this.holdOnTxt.anchorY = 30
......@@ -494,7 +494,7 @@ export class MotionInitScene extends Scene {
}
FYGE.Tween.removeTweens(this.holdOnTxt)
this.holdOnTxt.position.set(30, layers.stageOffsetY + (getApp().isLarge ? 340 - 168 : 240 - 168)) // 重新设置一下
this.holdOnTxt.position.set(30, layers.stageOffsetY + (getApp().isLarge ? 340 - 128 : 240 - 128)) // 重新设置一下
this.holdOnTxt.visible = false
// @ts-ignore
......
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