Commit 713825e8 authored by Master Q's avatar Master Q

小机型简单适配

parent f7ae4da7
......@@ -12,7 +12,7 @@
"newUser": false,
"shop": "FUSION",
"shopId": 10004,
"completed": false
"completed": true
}
}
{
"data": {
"id": 666666,
"score": 233,
"score": 1,
"isNewRecord": false,
"productLink": "http://qnpic.top/yoona2",
"isWinPrize": true,
"isWinPrize": false,
"level": "2"
},
"success": true,
......
......@@ -3826,5 +3826,5 @@ export const ResJson = {
}
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1629962165/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/template/1629979469/resource/"
}
\ No newline at end of file
......@@ -21,29 +21,31 @@ export class GameOverScene extends Scene {
UI.Rect(this, 750, 1624, 0xf1ebdd, 0, 0, 0)
var icon = UI.Sp(this, getApp().isNike ? 'nike-icon.png' : 'jordan-icon.png', 41, 220)
if (getApp().isLarge) {
icon.position.set(41, -layers.stageOffsetY + 90 + 1624 - layers.stage.viewRect.height + 68)
icon.position.set(41, layers.stageOffsetY - 90 + 218 + layers.stageOffsetY)
} else {
icon.position.set(41, -layers.stageOffsetY + 90 + 1624 - layers.stage.viewRect.height + 98)
icon.position.set(41, layers.stageOffsetY - 90 + 168 + layers.stageOffsetY)
}
this.y -= layers.stageOffsetY - 90
console.log(this.data)
var bitMapc = Tools.getNumTextures('num')
var bitMapc2 = Tools.getNumTextures('numb')
var bitmapTextCount = this.bitmapTextCount = this.addChild(new FYGE.BitmapText(bitMapc))
if (this.data.score <= 3) {
this.bitmapTextCount.textures = bitMapc2
} else {
if (!this.data.hideMusic) {
}
if (!this.data.hideMusic) {
if (this.data.score > 3) {
await sendTbNet(TbNetName.openMusic, {
isOn: true,
kurl: TBBgm.scoreBgm,
loop: false
}, null, null, true)
}
this.showNumberUp()
}
}
this.showNumberUp()
}
this.bitmapTextCount.position.set(layers.stageCenterX, 500)
// this.bitmapTextCount.text = this.data.score + ''
bitmapTextCount.text = '0'
......@@ -81,8 +83,8 @@ export class GameOverScene extends Scene {
var isJordan = Tools.globalData.shopId == 10003
UI.Rect(bottomCont, layers.stageWidth, 130, 0xffffff)
UI.Sp(bottomCont, 'product-link__icon.png', 50, 25)
UI.Txt(bottomCont, `${isJordan ? 'Jordan': 'Nike'} 瑜伽商品`, 24, '#111111', FYGE.TEXT_ALIGN.LEFT, 500, 160, 40, true)
UI.Txt(bottomCont, '让你的体态更加健康', 22, '#111111', FYGE.TEXT_ALIGN.LEFT, 500, 160, 70, true)
UI.Txt(bottomCont, `${isJordan ? 'Jordan女子商品': 'Nike瑜伽商品'}`, 24, '#111111', FYGE.TEXT_ALIGN.LEFT, 500, 160, 40, true)
UI.Txt(bottomCont, `${isJordan ? '让你充满活力和灵感' : '让你的体态更加健康'}`, 22, '#111111', FYGE.TEXT_ALIGN.LEFT, 500, 160, 70, true)
UI.Sp(bottomCont, 'jump-icon.png', 600, 40)
.addEventListener(FYGE.MouseEvent.CLICK, function() {
this.btnDelay(this)
......
......@@ -118,7 +118,7 @@ export class GameScene extends MotionInitScene {
set score(n: number) {
this._score = n;
if (!this.scoreText) {
this.scoreText = UI.Txt(this, '连续完成: ' + n, 40, '#111111', FYGE.TEXT_ALIGN.CENTER, layers.stageWidth, -8, layers.stageOffsetY + 250)
this.scoreText = UI.Txt(this, '连续完成: ' + n, 40, '#111111', FYGE.TEXT_ALIGN.CENTER, layers.stageWidth, -8, layers.stageOffsetY + (getApp().isLarge ? 250 : 150))
this.scoreText.mouseEnable = false
}
this.scoreText.text = '连续完成: '+n
......@@ -137,14 +137,14 @@ export class GameScene extends MotionInitScene {
set musicBoolean(m: boolean) {
if (m) {
(this.musicBtn || (this.musicBtn = UI.Btn(this, 'music-on.png', this.onMusicClick, this, 650, layers.stageOffsetY + 220))).texture = RES.getRes('music-on.png');
(this.musicBtn || (this.musicBtn = UI.Btn(this, 'music-on.png', this.onMusicClick, this, 650, layers.stageOffsetY + (getApp().isLarge ? 220 : 168 )))).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 + 220))).texture = RES.getRes('music-off.png');
(this.musicBtn || (this.musicBtn = UI.Btn(this, 'music-on.png', this.onMusicClick, this, 650, layers.stageOffsetY + (getApp().isLarge ? 220 : 168 )))).texture = RES.getRes('music-off.png');
FYGE.Tween.removeTweens(this.musicBtn)
this.musicBtn.rotation = 0
}
......@@ -186,7 +186,7 @@ export class GameScene extends MotionInitScene {
})
})
cdp.position.set(layers.stageCenterX - 65, layers.stageOffsetY + 340)
cdp.position.set(layers.stageCenterX - 65, layers.stageOffsetY + (getApp().isLarge ? 340 : 240))
}
......
......@@ -254,9 +254,9 @@ export class MotionInitFunc extends Container {
if (this.timer == null) {
this.timer = FYGE.Tween.get(this.progress, {
onChange: () => {
if (this.progress.value > 0.9) {
this.guidanceFill()
}
// if (this.progress.value > 0.9) {
// this.guidanceFill()
// }
}
})
.to({value: 1}, 1500)
......@@ -299,7 +299,8 @@ export class MotionInitScene extends Scene {
initUi() {
UI.Rect(this, 750, 1624, 0xf1ebdd, 0, 0, 0)
UI.Sp(this, getApp().isNike ? 'nike-icon.png' : 'jordan-icon.png', 41, 220)
var app = getApp()
UI.Sp(this, app.isNike ? 'nike-icon.png' : 'jordan-icon.png', 41, app.isLarge ? 218 + layers.stageOffsetY : 168 + layers.stageOffsetY)
// 中间的小圆
var c = this.addChild(new FYGE.Shape())
......@@ -327,7 +328,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 + 340, true)
this.holdOnTxt = UI.Txt(this, '保持住!', 60, '#111111', FYGE.TEXT_ALIGN.CENTER, layers.stageWidth, 30, layers.stageOffsetY + (getApp().isLarge ? 340 : 240), true)
this.holdOnTxt.visible = false
this.holdOnTxt.anchorX = layers.stageWidth / 2
this.holdOnTxt.anchorY = 30
......@@ -447,7 +448,7 @@ export class MotionInitScene extends Scene {
}
FYGE.Tween.removeTweens(this.holdOnTxt)
this.holdOnTxt.position.set(30, layers.stageOffsetY + 340) // 重新设置一下
this.holdOnTxt.position.set(30, layers.stageOffsetY + (getApp().isLarge ? 340 : 240)) // 重新设置一下
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