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 { ...@@ -314,6 +314,7 @@ export class EventDispatcher extends HashObject {
let s = this; let s = this;
s.removeAllEventListener(); s.removeAllEventListener();
s.eventTypes = null; s.eventTypes = null;
s.eventTypes1 = null;
} }
} }
......
...@@ -1423,9 +1423,14 @@ export default class Graphics extends Container { ...@@ -1423,9 +1423,14 @@ export default class Graphics extends Container {
} }
set width(value) { set width(value) {
const s = sign(this.scale.x) || 1; this.updateLocalBoundsSelf();
const width = this._localBoundsSelf.width;
this.scale.x = s * value / 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; this._width = value;
} }
...@@ -1440,8 +1445,14 @@ export default class Graphics extends Container { ...@@ -1440,8 +1445,14 @@ export default class Graphics extends Container {
} }
set height(value) { set height(value) {
const s = sign(this.scale.y) || 1; this.updateLocalBoundsSelf()
this.scale.y = s * value / this._localBoundsSelf.height; 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; this._height = value;
} }
......
...@@ -144,7 +144,7 @@ export default class Texture extends EventDispatcher { ...@@ -144,7 +144,7 @@ export default class Texture extends EventDispatcher {
this._rotate = Number(rotate || 0); this._rotate = Number(rotate || 0);
if (baseTexture.hasLoaded) { if (baseTexture.hasLoaded) {//对于canvas形式的判断hasLoaded有问题,导致不能监听update,到时改
if (this.noFrame) { if (this.noFrame) {
frame = new Rectangle(0, 0, baseTexture.width, baseTexture.height); frame = new Rectangle(0, 0, baseTexture.width, baseTexture.height);
// if there is no frame we should monitor for any base texture changes.. // if there is no frame we should monitor for any base texture changes..
......
...@@ -95,7 +95,7 @@ export default class PanelCtrl { ...@@ -95,7 +95,7 @@ export default class PanelCtrl {
this.stacks[i].visible = false; this.stacks[i].visible = false;
} else { } else {
this.stacks[i].visible = true; this.stacks[i].visible = true;
this.stacks[i].showAni(); this.stacks[i].showAni();//这里动画有问题
this._current = this.stacks[i]; this._current = this.stacks[i];
} }
} }
...@@ -138,9 +138,10 @@ export default class PanelCtrl { ...@@ -138,9 +138,10 @@ export default class PanelCtrl {
*/ */
closeCurrent() { closeCurrent() {
if (this._current) { if (this._current) {
this._current.removeEventListener('onDestroy', this.onPanelHide, this); this._current.hidePanel()
this.remove(this._current); // this._current.removeEventListener('onDestroy', this.onPanelHide, this);
this.updateView(); // this.remove(this._current);
// this.updateView();
} }
} }
......
This diff is collapsed.
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 { ...@@ -31,7 +31,7 @@ export enum TbNetName {
getTaskList = "getTaskList", getTaskList = "getTaskList",
/** /**
* 领取道具 * 领取道具
* activityId,toolType * activityId,taskName
*/ */
getToolsByType = "getToolsByType", getToolsByType = "getToolsByType",
/** /**
...@@ -206,7 +206,7 @@ const mockData = { ...@@ -206,7 +206,7 @@ const mockData = {
"activityId": "111", "activityId": "111",
"nickName": "开发环境", "nickName": "开发环境",
"avatar": "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/virtual.png", "avatar": "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/virtual.png",
"joinNeedsCredits": 20, "joinNeedCredits": 20,
"openSound": true, "openSound": true,
"gameObj": { "gameObj": {
"maxScore": 600, "maxScore": 600,
...@@ -271,7 +271,7 @@ const mockData = { ...@@ -271,7 +271,7 @@ const mockData = {
{ {
"taskName": "doFollowShop", "taskName": "doFollowShop",
"isComplete": true, "isComplete": true,
"taskDrawStatus": 0 //0未解锁,1待领取,3成功 "taskDrawStatus": 1 //0未解锁,1待领取,2成功
}, },
{ {
"taskName": "doInvite", "taskName": "doInvite",
......
...@@ -108,7 +108,7 @@ export class Tool { ...@@ -108,7 +108,7 @@ export class Tool {
//进页面需要从小程序获得的数据 //进页面需要从小程序获得的数据
public static globalData: { public static globalData: {
joinNeedsCredits: number, joinNeedCredits: number,
activityId: string, activityId: string,
nickName: string, nickName: string,
avatar: string, avatar: string,
......
...@@ -142,7 +142,7 @@ export class GameOverPanel extends Panel { ...@@ -142,7 +142,7 @@ export class GameOverPanel extends Panel {
this.goEarnBtn.visible = false; this.goEarnBtn.visible = false;
//积分/次文案 //积分/次文案
var needCreditsTxt = this.addChild(Tool.addText( var needCreditsTxt = this.addChild(Tool.addText(
"(" + Tool.globalData.joinNeedsCredits + "积分/次)", "(" + Tool.globalData.joinNeedCredits + "积分/次)",
24, 24,
"#b093ea", "#b093ea",
TEXT_ALIGN.CENTER, TEXT_ALIGN.CENTER,
...@@ -154,7 +154,7 @@ export class GameOverPanel extends Panel { ...@@ -154,7 +154,7 @@ export class GameOverPanel extends Panel {
//先获取积分,然后判断 //先获取积分,然后判断
sendTbNet(TbNetName.getCredits, { activityId: Tool.globalData.activityId }, (s, res) => { 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; needCreditsTxt.visible = true;
this.againBtn.visible = true; this.againBtn.visible = true;
} else { } else {
...@@ -203,7 +203,7 @@ export class GameOverPanel extends Panel { ...@@ -203,7 +203,7 @@ export class GameOverPanel extends Panel {
} }
onClick_goEarnBtn() { 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() { removeEvents() {
......
...@@ -107,7 +107,7 @@ export class TaskPanel extends Panel { ...@@ -107,7 +107,7 @@ export class TaskPanel extends Panel {
showToast("成功完成下单任务,可领取道具大礼包") showToast("成功完成下单任务,可领取道具大礼包")
} }
} }
else if (l.taskDrawStatus == 3) {//已领取状态 else if (l.taskDrawStatus == 2) {//已领取状态
this[l.taskName].enabled = false; this[l.taskName].enabled = false;
} }
...@@ -159,11 +159,9 @@ class CusButton extends Button { ...@@ -159,11 +159,9 @@ class CusButton extends Button {
} }
set canGetStatus(value) { set canGetStatus(value) {
this._canGetStatus = value; this._canGetStatus = value;
var t: [Texture, Texture] var t: [Texture, Texture] = getTexture(this.type)
if (value) {//能领取时换图 if (value) {//能领取时换图
t = [RES.getRes("lingqujiangli.png"), null] t = [RES.getRes("lingqujiangli.png"), t[1]]
} else {
t = getTexture(this.type)
} }
this.changeTexture(t[0], t[0], t[1]) this.changeTexture(t[0], t[0], t[1])
} }
...@@ -180,10 +178,13 @@ class CusButton extends Button { ...@@ -180,10 +178,13 @@ class CusButton extends Button {
showWaiting(); showWaiting();
sendTbNet( sendTbNet(
TbNetName.getToolsByType, TbNetName.getToolsByType,
{ activityId: Tool.globalData.activityId, toolType: this.type }, { activityId: Tool.globalData.activityId, taskName: this.type },
(s, res) => { (s, res) => {
hideWaiting(); 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 {//发对应任务方法 } else {//发对应任务方法
......
...@@ -183,11 +183,11 @@ export class PlayScene extends Scene { ...@@ -183,11 +183,11 @@ export class PlayScene extends Scene {
this.goBackBtn = new Button(RES.getRes("goBackBtn.png")) this.goBackBtn = new Button(RES.getRes("goBackBtn.png"))
this.goBackBtn.x = 0 this.goBackBtn.x = 0
this.goBackBtn.y = 200+60 this.goBackBtn.y = 200 + 60
this.addChild(this.goBackBtn) this.addChild(this.goBackBtn)
this.musicBtn = new Button(RES.getRes("musicOn.png")) this.musicBtn = new Button(RES.getRes("musicOn.png"))
this.musicBtn.x = 680 this.musicBtn.x = 680
this.musicBtn.y = 200+60 this.musicBtn.y = 200 + 60
this.addChild(this.musicBtn) this.addChild(this.musicBtn)
this.exchangeTarget1 = new Sprite(RES.getRes("focusTips.png")) this.exchangeTarget1 = new Sprite(RES.getRes("focusTips.png"))
...@@ -962,6 +962,9 @@ export class PlayScene extends Scene { ...@@ -962,6 +962,9 @@ export class PlayScene extends Scene {
generateOneElement() { generateOneElement() {
// 随机生成一个数字 2or4 // 随机生成一个数字 2or4
let randNumber = Math.random() < 0.9 ? 2 : 4 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 randNumberX = Math.floor(Math.random() * 4)
let randNumberY = Math.floor(Math.random() * 4) let randNumberY = Math.floor(Math.random() * 4)
...@@ -978,7 +981,7 @@ export class PlayScene extends Scene { ...@@ -978,7 +981,7 @@ export class PlayScene extends Scene {
sprite.scale.set(0, 0) sprite.scale.set(0, 0)
sprite.anchor.set(60, 60) sprite.anchor.set(60, 60)
Tween.get(sprite) Tween.get(sprite)
.to({ scaleX: 1, scaleY: 1 }, 300) .to({ scaleX: 1, scaleY: 1 }, 100)
.call(() => { .call(() => {
this.removeChild(sprite) 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