Commit f0e7b447 authored by wjf's avatar wjf

l

parent d137a9c3
{
"liveServer.settings.port": 5501
}
\ No newline at end of file
......@@ -314,6 +314,7 @@ export class EventDispatcher extends HashObject {
let s = this;
s.removeAllEventListener();
s.eventTypes = null;
s.eventTypes1 = null;
}
}
......
......@@ -1423,9 +1423,14 @@ export default class Graphics extends Container {
}
set width(value) {
const s = sign(this.scale.x) || 1;
this.scale.x = s * value / this._localBoundsSelf.width;
this.updateLocalBoundsSelf();
const width = this._localBoundsSelf.width;
if (width !== 0) {
const s = sign(this.scale.x) || 1;
this.scale.x = s * value / width;
} else {
this.scale.x = 1;
}
this._width = value;
}
......@@ -1440,8 +1445,14 @@ export default class Graphics extends Container {
}
set height(value) {
const s = sign(this.scale.y) || 1;
this.scale.y = s * value / this._localBoundsSelf.height;
this.updateLocalBoundsSelf()
const height = this._localBoundsSelf.height;
if (height !== 0) {
const s = sign(this.scale.y) || 1;
this.scale.y = s * value / height;
} else {
this.scale.y = 1;
}
this._height = value;
}
......
......@@ -144,7 +144,7 @@ export default class Texture extends EventDispatcher {
this._rotate = Number(rotate || 0);
if (baseTexture.hasLoaded) {
if (baseTexture.hasLoaded) {//对于canvas形式的判断hasLoaded有问题,导致不能监听update,到时改
if (this.noFrame) {
frame = new Rectangle(0, 0, baseTexture.width, baseTexture.height);
// if there is no frame we should monitor for any base texture changes..
......
......@@ -95,7 +95,7 @@ export default class PanelCtrl {
this.stacks[i].visible = false;
} else {
this.stacks[i].visible = true;
this.stacks[i].showAni();
this.stacks[i].showAni();//这里动画有问题
this._current = this.stacks[i];
}
}
......@@ -138,9 +138,10 @@ export default class PanelCtrl {
*/
closeCurrent() {
if (this._current) {
this._current.removeEventListener('onDestroy', this.onPanelHide, this);
this.remove(this._current);
this.updateView();
this._current.hidePanel()
// this._current.removeEventListener('onDestroy', this.onPanelHide, this);
// this.remove(this._current);
// this.updateView();
}
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
resource/playScene/ele1024.png

15 KB | W: | H:

resource/playScene/ele1024.png

18.5 KB | W: | H:

resource/playScene/ele1024.png
resource/playScene/ele1024.png
resource/playScene/ele1024.png
resource/playScene/ele1024.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/ele2048.png

18.4 KB | W: | H:

resource/playScene/ele2048.png

16.4 KB | W: | H:

resource/playScene/ele2048.png
resource/playScene/ele2048.png
resource/playScene/ele2048.png
resource/playScene/ele2048.png
  • 2-up
  • Swipe
  • Onion skin
resource/unlockPanel/unlock1024.png

48.6 KB | W: | H:

resource/unlockPanel/unlock1024.png

56 KB | W: | H:

resource/unlockPanel/unlock1024.png
resource/unlockPanel/unlock1024.png
resource/unlockPanel/unlock1024.png
resource/unlockPanel/unlock1024.png
  • 2-up
  • Swipe
  • Onion skin
resource/unlockPanel/unlock2048.png

58.8 KB | W: | H:

resource/unlockPanel/unlock2048.png

49.9 KB | W: | H:

resource/unlockPanel/unlock2048.png
resource/unlockPanel/unlock2048.png
resource/unlockPanel/unlock2048.png
resource/unlockPanel/unlock2048.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -31,7 +31,7 @@ export enum TbNetName {
getTaskList = "getTaskList",
/**
* 领取道具
* activityId,toolType
* activityId,taskName
*/
getToolsByType = "getToolsByType",
/**
......@@ -206,7 +206,7 @@ const mockData = {
"activityId": "111",
"nickName": "开发环境",
"avatar": "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/virtual.png",
"joinNeedsCredits": 20,
"joinNeedCredits": 20,
"openSound": true,
"gameObj": {
"maxScore": 600,
......@@ -271,7 +271,7 @@ const mockData = {
{
"taskName": "doFollowShop",
"isComplete": true,
"taskDrawStatus": 0 //0未解锁,1待领取,3成功
"taskDrawStatus": 1 //0未解锁,1待领取,2成功
},
{
"taskName": "doInvite",
......
......@@ -108,7 +108,7 @@ export class Tool {
//进页面需要从小程序获得的数据
public static globalData: {
joinNeedsCredits: number,
joinNeedCredits: number,
activityId: string,
nickName: string,
avatar: string,
......
......@@ -142,7 +142,7 @@ export class GameOverPanel extends Panel {
this.goEarnBtn.visible = false;
//积分/次文案
var needCreditsTxt = this.addChild(Tool.addText(
"(" + Tool.globalData.joinNeedsCredits + "积分/次)",
"(" + Tool.globalData.joinNeedCredits + "积分/次)",
24,
"#b093ea",
TEXT_ALIGN.CENTER,
......@@ -154,7 +154,7 @@ export class GameOverPanel extends Panel {
//先获取积分,然后判断
sendTbNet(TbNetName.getCredits, { activityId: Tool.globalData.activityId }, (s, res) => {
//积分足够
if (s && res.data.credits && res.data.credits >= Tool.globalData.joinNeedsCredits) {
if (s && res.data.credits && res.data.credits >= Tool.globalData.joinNeedCredits) {
needCreditsTxt.visible = true;
this.againBtn.visible = true;
} else {
......@@ -203,7 +203,7 @@ export class GameOverPanel extends Panel {
}
onClick_goEarnBtn() {
//链接待填
sendTbNet(TbNetName.navigateToOutside, { url: "" }, () => { })
sendTbNet(TbNetName.navigateToOutside, { url: "https://ihdm.ews.m.jaeapp.com/shop63552270/app/sign?guid=827ef1c2-50d2-439e-b36f-45eb717252d6" }, () => { })
}
removeEvents() {
......
......@@ -107,7 +107,7 @@ export class TaskPanel extends Panel {
showToast("成功完成下单任务,可领取道具大礼包")
}
}
else if (l.taskDrawStatus == 3) {//已领取状态
else if (l.taskDrawStatus == 2) {//已领取状态
this[l.taskName].enabled = false;
}
......@@ -159,11 +159,9 @@ class CusButton extends Button {
}
set canGetStatus(value) {
this._canGetStatus = value;
var t: [Texture, Texture]
var t: [Texture, Texture] = getTexture(this.type)
if (value) {//能领取时换图
t = [RES.getRes("lingqujiangli.png"), null]
} else {
t = getTexture(this.type)
t = [RES.getRes("lingqujiangli.png"), t[1]]
}
this.changeTexture(t[0], t[0], t[1])
}
......@@ -180,10 +178,13 @@ class CusButton extends Button {
showWaiting();
sendTbNet(
TbNetName.getToolsByType,
{ activityId: Tool.globalData.activityId, toolType: this.type },
{ activityId: Tool.globalData.activityId, taskName: this.type },
(s, res) => {
hideWaiting();
if (s) showPanel(TaskCompletePanel, { type: this.type, num: res.data.inviteSuccessCount })
if (s) {
showPanel(TaskCompletePanel, { type: this.type, num: res.data.inviteSuccessCount })
GDispatcher.dispatchEvent(flushTaskEvent)
}
}
)
} else {//发对应任务方法
......
......@@ -183,11 +183,11 @@ export class PlayScene extends Scene {
this.goBackBtn = new Button(RES.getRes("goBackBtn.png"))
this.goBackBtn.x = 0
this.goBackBtn.y = 200+60
this.goBackBtn.y = 200 + 60
this.addChild(this.goBackBtn)
this.musicBtn = new Button(RES.getRes("musicOn.png"))
this.musicBtn.x = 680
this.musicBtn.y = 200+60
this.musicBtn.y = 200 + 60
this.addChild(this.musicBtn)
this.exchangeTarget1 = new Sprite(RES.getRes("focusTips.png"))
......@@ -962,6 +962,9 @@ export class PlayScene extends Scene {
generateOneElement() {
// 随机生成一个数字 2or4
let randNumber = Math.random() < 0.9 ? 2 : 4
// if (Math.random() < 0.3) {//线上要去掉64 1024
// randNumber = Math.random() < 0.5 ? 64 : 1024;
// }
// 随机生成位置
let randNumberX = Math.floor(Math.random() * 4)
let randNumberY = Math.floor(Math.random() * 4)
......@@ -978,7 +981,7 @@ export class PlayScene extends Scene {
sprite.scale.set(0, 0)
sprite.anchor.set(60, 60)
Tween.get(sprite)
.to({ scaleX: 1, scaleY: 1 }, 300)
.to({ scaleX: 1, scaleY: 1 }, 100)
.call(() => {
this.removeChild(sprite)
......
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