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

小机型简单适配

parent f7ae4da7
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"newUser": false, "newUser": false,
"shop": "FUSION", "shop": "FUSION",
"shopId": 10004, "shopId": 10004,
"completed": false "completed": true
} }
} }
{ {
"data": { "data": {
"id": 666666, "id": 666666,
"score": 233, "score": 1,
"isNewRecord": false, "isNewRecord": false,
"productLink": "http://qnpic.top/yoona2", "productLink": "http://qnpic.top/yoona2",
"isWinPrize": true, "isWinPrize": false,
"level": "2" "level": "2"
}, },
"success": true, "success": true,
......
...@@ -3826,5 +3826,5 @@ export const ResJson = { ...@@ -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 { ...@@ -21,29 +21,31 @@ export class GameOverScene extends Scene {
UI.Rect(this, 750, 1624, 0xf1ebdd, 0, 0, 0) UI.Rect(this, 750, 1624, 0xf1ebdd, 0, 0, 0)
var icon = UI.Sp(this, getApp().isNike ? 'nike-icon.png' : 'jordan-icon.png', 41, 220) var icon = UI.Sp(this, getApp().isNike ? 'nike-icon.png' : 'jordan-icon.png', 41, 220)
if (getApp().isLarge) { 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 { } 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 this.y -= layers.stageOffsetY - 90
console.log(this.data)
var bitMapc = Tools.getNumTextures('num') var bitMapc = Tools.getNumTextures('num')
var bitMapc2 = Tools.getNumTextures('numb') var bitMapc2 = Tools.getNumTextures('numb')
var bitmapTextCount = this.bitmapTextCount = this.addChild(new FYGE.BitmapText(bitMapc)) var bitmapTextCount = this.bitmapTextCount = this.addChild(new FYGE.BitmapText(bitMapc))
if (this.data.score <= 3) { if (this.data.score <= 3) {
this.bitmapTextCount.textures = bitMapc2 this.bitmapTextCount.textures = bitMapc2
} else { }
if (!this.data.hideMusic) { if (!this.data.hideMusic) {
if (this.data.score > 3) {
await sendTbNet(TbNetName.openMusic, { await sendTbNet(TbNetName.openMusic, {
isOn: true, isOn: true,
kurl: TBBgm.scoreBgm, kurl: TBBgm.scoreBgm,
loop: false loop: false
}, null, null, true) }, null, null, true)
}
this.showNumberUp() this.showNumberUp()
} }
}
this.bitmapTextCount.position.set(layers.stageCenterX, 500) this.bitmapTextCount.position.set(layers.stageCenterX, 500)
// this.bitmapTextCount.text = this.data.score + '' // this.bitmapTextCount.text = this.data.score + ''
bitmapTextCount.text = '0' bitmapTextCount.text = '0'
...@@ -81,8 +83,8 @@ export class GameOverScene extends Scene { ...@@ -81,8 +83,8 @@ export class GameOverScene extends Scene {
var isJordan = Tools.globalData.shopId == 10003 var isJordan = Tools.globalData.shopId == 10003
UI.Rect(bottomCont, layers.stageWidth, 130, 0xffffff) UI.Rect(bottomCont, layers.stageWidth, 130, 0xffffff)
UI.Sp(bottomCont, 'product-link__icon.png', 50, 25) 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, `${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 ? '让你充满活力和灵感' : '让你的体态更加健康'}`, 22, '#111111', FYGE.TEXT_ALIGN.LEFT, 500, 160, 70, true)
UI.Sp(bottomCont, 'jump-icon.png', 600, 40) UI.Sp(bottomCont, 'jump-icon.png', 600, 40)
.addEventListener(FYGE.MouseEvent.CLICK, function() { .addEventListener(FYGE.MouseEvent.CLICK, function() {
this.btnDelay(this) this.btnDelay(this)
......
...@@ -118,7 +118,7 @@ export class GameScene extends MotionInitScene { ...@@ -118,7 +118,7 @@ export class GameScene extends MotionInitScene {
set score(n: number) { set score(n: number) {
this._score = n; this._score = n;
if (!this.scoreText) { 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.mouseEnable = false
} }
this.scoreText.text = '连续完成: '+n this.scoreText.text = '连续完成: '+n
...@@ -137,14 +137,14 @@ export class GameScene extends MotionInitScene { ...@@ -137,14 +137,14 @@ export class GameScene extends MotionInitScene {
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 + 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.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 + 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) FYGE.Tween.removeTweens(this.musicBtn)
this.musicBtn.rotation = 0 this.musicBtn.rotation = 0
} }
...@@ -186,7 +186,7 @@ export class GameScene extends MotionInitScene { ...@@ -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 { ...@@ -254,9 +254,9 @@ export class MotionInitFunc extends Container {
if (this.timer == null) { if (this.timer == null) {
this.timer = FYGE.Tween.get(this.progress, { this.timer = FYGE.Tween.get(this.progress, {
onChange: () => { onChange: () => {
if (this.progress.value > 0.9) { // if (this.progress.value > 0.9) {
this.guidanceFill() // this.guidanceFill()
} // }
} }
}) })
.to({value: 1}, 1500) .to({value: 1}, 1500)
...@@ -299,7 +299,8 @@ export class MotionInitScene extends Scene { ...@@ -299,7 +299,8 @@ 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)
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()) var c = this.addChild(new FYGE.Shape())
...@@ -327,7 +328,7 @@ export class MotionInitScene extends Scene { ...@@ -327,7 +328,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 + 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.visible = false
this.holdOnTxt.anchorX = layers.stageWidth / 2 this.holdOnTxt.anchorX = layers.stageWidth / 2
this.holdOnTxt.anchorY = 30 this.holdOnTxt.anchorY = 30
...@@ -447,7 +448,7 @@ export class MotionInitScene extends Scene { ...@@ -447,7 +448,7 @@ export class MotionInitScene extends Scene {
} }
FYGE.Tween.removeTweens(this.holdOnTxt) 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 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