Commit 87765894 authored by Master Q's avatar Master Q

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

parent 540aa936
...@@ -48,7 +48,9 @@ ...@@ -48,7 +48,9 @@
<body> <body>
<script> <script>
const app = {}; const app = {
isLarge: false
};
function getApp() { function getApp() {
return app; return app;
......
...@@ -24,8 +24,8 @@ class TuiaAutoUpload { ...@@ -24,8 +24,8 @@ class TuiaAutoUpload {
var _this = this; var _this = this;
this.client = new OSS({ this.client = new OSS({
region: 'oss-cn-hangzhou', region: 'oss-cn-hangzhou',
accessKeyId: 'LTAI4Fw25WcfcGv7FvcHoiHK', accessKeyId: 'LTAI5tLEo6SbjfmNPmH7Mz3o',
accessKeySecret: 'NZk1NtT9J5HFaAolNbtQdzTzLLvLYm', accessKeySecret: '8yZ6nVMg56DEupEEMRl6rz1DcpG2R7',
bucket: _this.type === 'prod' ? 'duiba' : 'daily-duiba' bucket: _this.type === 'prod' ? 'duiba' : 'daily-duiba'
}); });
this.bar = new ProgressBar(chalk.yellow(` 文件上传中 [:bar] :current/${this.files().length} :percent :elapseds`), { this.bar = new ProgressBar(chalk.yellow(` 文件上传中 [:bar] :current/${this.files().length} :percent :elapseds`), {
......
...@@ -39,8 +39,8 @@ function uploadSingleJs(url) { ...@@ -39,8 +39,8 @@ function uploadSingleJs(url) {
const originPath = `/db_games/${url}/output.js`; const originPath = `/db_games/${url}/output.js`;
var client = new OSS({ var client = new OSS({
region: 'oss-cn-hangzhou', region: 'oss-cn-hangzhou',
accessKeyId: 'LTAI4Fw25WcfcGv7FvcHoiHK', accessKeyId: 'LTAI5tLEo6SbjfmNPmH7Mz3o',
accessKeySecret: 'NZk1NtT9J5HFaAolNbtQdzTzLLvLYm', accessKeySecret: '8yZ6nVMg56DEupEEMRl6rz1DcpG2R7',
bucket: 'duiba' bucket: 'duiba'
}) })
var originFile; var originFile;
......
...@@ -3826,5 +3826,5 @@ export const ResJson = { ...@@ -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 { ...@@ -66,6 +66,7 @@ export default class CountDownComp extends Module {
countDown(time: TimeObj, onChange: Function) { countDown(time: TimeObj, onChange: Function) {
var tobj = this.tobj = time var tobj = this.tobj = time
this.tobj && FYGE.Tween.removeTweens(this.tobj)
FYGE.Tween.get(this.tobj, { FYGE.Tween.get(this.tobj, {
onChange: () => { onChange: () => {
onChange(tobj.t) onChange(tobj.t)
......
...@@ -23,7 +23,7 @@ export class GameOverScene extends Scene { ...@@ -23,7 +23,7 @@ export class GameOverScene extends Scene {
if (getApp().isLarge) { if (getApp().isLarge) {
icon.position.set(41, layers.stageOffsetY - 90 + 50 + layers.stageOffsetY) icon.position.set(41, layers.stageOffsetY - 90 + 50 + layers.stageOffsetY)
} else { } 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 this.y -= layers.stageOffsetY - 90
......
...@@ -15,6 +15,7 @@ import { GameOverScene } from '../GameOverScene/GameOverScene'; ...@@ -15,6 +15,7 @@ import { GameOverScene } from '../GameOverScene/GameOverScene';
import { GameOverPanel } from '../../panels/GameOverPanel'; import { GameOverPanel } from '../../panels/GameOverPanel';
import MusicBtn from '../../common/MusicBtn'; import MusicBtn from '../../common/MusicBtn';
import { yoga_fail } from '../../lotties/yoga_fail'; import { yoga_fail } from '../../lotties/yoga_fail';
import { onceFnc } from '../../utils/utils';
const Container = FYGE.Container const Container = FYGE.Container
const TEXT_ALIGN = FYGE.TEXT_ALIGN const TEXT_ALIGN = FYGE.TEXT_ALIGN
...@@ -171,7 +172,7 @@ export class GameScene extends MotionInitScene { ...@@ -171,7 +172,7 @@ export class GameScene extends MotionInitScene {
var cdp = this.cdp = this.addChild(new CountDownComp(GameCfg.getInitTime())) var cdp = this.cdp = this.addChild(new CountDownComp(GameCfg.getInitTime()))
this.setChildIndex(this.cdp, 2) this.setChildIndex(this.cdp, 2)
this.cdp.addTimeoutFunc(() => { this.cdp.addTimeoutFunc(onceFnc(() => {
this.cdp.destory() this.cdp.destory()
// 销毁 instance // 销毁 instance
DeviceMotion.instance.destory() DeviceMotion.instance.destory()
...@@ -199,8 +200,8 @@ export class GameScene extends MotionInitScene { ...@@ -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 { ...@@ -308,14 +308,14 @@ export class MotionInitScene extends Scene {
set musicBoolean(m: boolean) { set musicBoolean(m: boolean) {
if (m) { 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.anchorX = 30
this.musicBtn.anchorY = 30 this.musicBtn.anchorY = 30
FYGE.Tween.get(this.musicBtn, {loop: true}) FYGE.Tween.get(this.musicBtn, {loop: true})
.to({rotation: 360}, 5000) .to({rotation: 360}, 5000)
} else { } 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) FYGE.Tween.removeTweens(this.musicBtn)
this.musicBtn.rotation = 0 this.musicBtn.rotation = 0
} }
...@@ -339,7 +339,7 @@ export class MotionInitScene extends Scene { ...@@ -339,7 +339,7 @@ export class MotionInitScene extends Scene {
initUi() { initUi() {
UI.Rect(this, 750, 1624, 0xf1ebdd, 0, 0, 0) UI.Rect(this, 750, 1624, 0xf1ebdd, 0, 0, 0)
var app = getApp() 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()) // var c = this.addChild(new FYGE.Shape())
...@@ -370,7 +370,7 @@ export class MotionInitScene extends Scene { ...@@ -370,7 +370,7 @@ export class MotionInitScene extends Scene {
this.bitmapTextCount.position.set(layers.stageCenterX, layers.stageCenterY + 380) this.bitmapTextCount.position.set(layers.stageCenterX, layers.stageCenterY + 380)
// @ts-ignore // @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.visible = false
this.holdOnTxt.anchorX = layers.stageWidth / 2 this.holdOnTxt.anchorX = layers.stageWidth / 2
this.holdOnTxt.anchorY = 30 this.holdOnTxt.anchorY = 30
...@@ -494,7 +494,7 @@ export class MotionInitScene extends Scene { ...@@ -494,7 +494,7 @@ export class MotionInitScene extends Scene {
} }
FYGE.Tween.removeTweens(this.holdOnTxt) 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 this.holdOnTxt.visible = false
// @ts-ignore // @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