Skip to content

Commit

Permalink
部分更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Willis-Zhou committed Apr 7, 2020
1 parent b3a61cc commit f5c98f8
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 75 deletions.
9 changes: 0 additions & 9 deletions src/script/external/ald/ald-game-config.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/script/external/ald/ald-qq-game-config.js

This file was deleted.

16 changes: 0 additions & 16 deletions src/script/external/qy/qy-config.js

This file was deleted.

15 changes: 0 additions & 15 deletions src/script/external/qy/qy-ov-config.js

This file was deleted.

12 changes: 1 addition & 11 deletions src/script/game/ui/popup/FullScenePopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,7 @@ export default class FullScenePopup extends BaseUI {

onCloseTouched( btn ) {
G_UIHelper.playBtnTouchAction(btn, () => {
if (this._advLoadMgrs.length > 0) {
let randomIndex = G_Utils.random(0, this._advLoadMgrs.length - 1)
console.log(randomIndex, this._advLoadMgrs)
let advLoadMgr = this._advLoadMgrs[randomIndex]
advLoadMgr.randomNavigate((bOpen, bSucc) => {
G_UIManager.hideUI("fullSceneAd")
})
}
else {
G_UIManager.hideUI("fullSceneAd")
}
G_UIManager.hideUI("fullSceneAd")
})

G_SoundMgr.playSound(G_SoundName.SN_CLICK)
Expand Down
15 changes: 0 additions & 15 deletions src/script/game/ui/popup/MoreGamePopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,6 @@ export default class MoreGamePopup extends BaseUI {

onCloseTouched( btn ) {
G_UIHelper.playBtnTouchAction(btn, function () {
let ret = G_UIManager.getUI("moreGameAd")

if (ret) {
let cls = ret[1]

let closeCb = null
closeCb = function () {
// body...
cls.unregisterCallback("close", closeCb)
G_UIManager.showUI("fullSceneAd")
}.bind(this)

cls.registerCallback("close", closeCb)
}

G_UIManager.hideUI("moreGameAd")
}.bind(this), 0.7)

Expand Down
45 changes: 45 additions & 0 deletions src/script/sdk/helper/ui_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ var _UIHelper = (function () {
}))
}
},

playOpenPopupAction: function (popup, cb) {
// body...
this.playUIScaleAction(popup, 0.8, 1.0, 500, cb)
},

playUIScaleAction: function (ui, fromScale, endScale, duration, cb) {
// body...
Expand All @@ -69,6 +74,46 @@ var _UIHelper = (function () {
}))
}
},

playOpenPopupAction_FromLeft: function (popup, cb) {
// body...
if (popup) {
if (popup._tween) {
popup._tween.clear()
popup._tween = null
}

popup.x = 240

popup._tween = Laya.Tween.to(popup, {x: 360}, 500, Laya.Ease.elasticOut, Laya.Handler.create(null, function () {
popup._tween = null

if (typeof cb === "function") {
cb()
}
}))
}
},

playOpenPopupAction_FromBottom: function (popup, cb) {
// body...
if (popup) {
if (popup._tween) {
popup._tween.clear()
popup._tween = null
}

popup.y = Laya.stage.height / 4

popup._tween = Laya.Tween.to(popup, {y: Laya.stage.height - popup.height}, 500, Laya.Ease.elasticOut, Laya.Handler.create(null, function () {
popup._tween = null

if (typeof cb === "function") {
cb()
}
}))
}
},

layoutItemsInContent: function ( content, nodeArr, gap ) {
// body...
Expand Down

0 comments on commit f5c98f8

Please sign in to comment.