Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
new_taobao
Commits
f72a8f5d
Commit
f72a8f5d
authored
Sep 27, 2020
by
Edwise
🍷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1234
parent
7ccecb6d
Changes
19
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
11498 additions
and
41 deletions
+11498
-41
tmallCat.getUserInfo.json
...ect/src/canvas/game/mock/miniTb/tmallCat.getUserInfo.json
+5
-4
output.js
project/src/canvas/game/output.js
+16
-5
output.js.map
project/src/canvas/game/output.js.map
+1
-1
output.js
project/src/canvas/game/released/output.js
+16
-5
resCanvasList.js
project/src/canvas/game/resCanvasList.js
+127
-0
Enum.ts
project/src/canvas/game/src/Enum.ts
+7
-1
InitLottie.ts
project/src/canvas/game/src/InitLottie.ts
+1
-1
Ins.ts
project/src/canvas/game/src/Ins.ts
+2
-1
ResJson.ts
project/src/canvas/game/src/ResJson.ts
+1
-1
Cat.ts
project/src/canvas/game/src/cat/Cat.ts
+14
-5
Guide.ts
project/src/canvas/game/src/guide/Guide.ts
+94
-0
MainScene.ts
project/src/canvas/game/src/scenes/MainScene.ts
+24
-2
StartScene.ts
project/src/canvas/game/src/scenes/StartScene.ts
+9
-1
MainSceneBtnUi.ts
project/src/canvas/game/src/ui/MainSceneBtnUi.ts
+1
-1
comlevelup.acss
taobao_mini/client/components/comlevelup/comlevelup.acss
+15
-4
comlevelup.axml
taobao_mini/client/components/comlevelup/comlevelup.axml
+3
-2
comlevelup.js
taobao_mini/client/components/comlevelup/comlevelup.js
+14
-2
output.js
taobao_mini/client/pages/pagecanvas/output.js
+16
-5
debug.log
taobao_mini/debug.log
+11132
-0
No files found.
project/src/canvas/game/mock/miniTb/tmallCat.getUserInfo.json
View file @
f72a8f5d
...
@@ -2,18 +2,19 @@
...
@@ -2,18 +2,19 @@
"success"
:
true
,
"success"
:
true
,
"message"
:
""
,
"message"
:
""
,
"data"
:
{
"data"
:
{
"catType"
:
2
,
"catType"
:
3
,
"userNick"
:
"Edwise"
,
"userNick"
:
"Edwise"
,
"energy"
:
1000
,
"energy"
:
1000
,
"happyCoin"
:
1000
,
"happyCoin"
:
1000
,
"experience"
:
80
,
"experience"
:
80
,
"level"
:
"1"
,
"level"
:
"1"
,
"avatar"
:
"http
s://yun.duiba.com.cn/spark/assets/a3ae99684afa9a1f8d94f4c95ee6f1ed81de9996.png
"
,
"avatar"
:
"http
://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vFHbMm8SPFPHPFRHPG7HPmPhvmgyPGPIP07-OF*eMmQT&width=80&height=80&type=sns
"
,
"sence"
:
4
,
"sence"
:
2
,
"catName"
:
"哈哈哈"
,
"catName"
:
"哈哈哈"
,
"senceTips"
:[
"1说话说话说话说话说话说话说话说话说话说话说话"
,
"2说话说话说话说话说话说话说话说话说话说话说话说话"
,
"3说话说话说话说话说话说话说话说话说话说话说话说话"
],
"senceTips"
:[
"1说话说话说话说话说话说话说话说话说话说话说话"
,
"2说话说话说话说话说话说话说话说话说话说话说话说话"
,
"3说话说话说话说话说话说话说话说话说话说话说话说话"
],
"energyMax"
:
2000
,
"energyMax"
:
2000
,
"experienceMax"
:
100
"experienceMax"
:
100
,
"senceGuide"
:
true
}
}
}
}
\ No newline at end of file
project/src/canvas/game/output.js
View file @
f72a8f5d
...
@@ -2602,13 +2602,17 @@ var Cat = (function (_super) {
...
@@ -2602,13 +2602,17 @@ var Cat = (function (_super) {
console.log(actType);
console.log(actType);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.interaction, { type: type, sence: Ins_1.Ins.curScene }, function (s, r) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.interaction, { type: type, sence: Ins_1.Ins.curScene }, function (s, r) {
if (s) {
if (s) {
if (r.data.isUpgrade) {
Ins_1.Ins.showModule("levelupModal", { prizeData: r.data, energyMax1: Ins_1.Ins.userInfo.energyMax, energyMax2: r.data.energyMax });
}
Main_1.GDispatcher.dispatchEvent(Enum_1.MSG.UPDATE_USERINFO);
Main_1.GDispatcher.dispatchEvent(Enum_1.MSG.UPDATE_USERINFO);
that.actRunning = true;
that.actRunning = true;
switch (actType) {
switch (actType) {
case Enum_1.CAT_ACTTYPEP.SLEEP:
case Enum_1.CAT_ACTTYPEP.SLEEP:
break;
break;
default:
default:
that.showDialog(actType, r.data.tips);
var index = Math.floor(Math.random() * r.data.tips.length);
that.showDialog(actType, r.data.tips[index]);
that.setCatAnimShow(actType, function () {
that.setCatAnimShow(actType, function () {
that.stopCatAct();
that.stopCatAct();
});
});
...
@@ -2675,6 +2679,7 @@ var InitLottie;
...
@@ -2675,6 +2679,7 @@ var InitLottie;
}
}
console.log(list);
console.log(list);
var p = new Promise(function (resolve, reject) {
var p = new Promise(function (resolve, reject) {
8;
initLottie(function (s) {
initLottie(function (s) {
if (s) {
if (s) {
resolve();
resolve();
...
@@ -46752,7 +46757,7 @@ var MainScene = (function (_super) {
...
@@ -46752,7 +46757,7 @@ var MainScene = (function (_super) {
return;
return;
}
}
else {
else {
if (
Ins_1.Ins.userInfo.energy != r.data
.energyMax) {
if (
r.data != Ins_1.Ins.userInfo
.energyMax) {
that.getUserEnergy();
that.getUserEnergy();
}
}
else {
else {
...
@@ -46876,6 +46881,7 @@ var MainScene_1 = __webpack_require__(/*! ./MainScene */ "./src/scenes/MainScene
...
@@ -46876,6 +46881,7 @@ var MainScene_1 = __webpack_require__(/*! ./MainScene */ "./src/scenes/MainScene
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var Main_1 = __webpack_require__(/*! ../Main */ "./src/Main.ts");
var StartScene = (function (_super) {
var StartScene = (function (_super) {
__extends(StartScene, _super);
__extends(StartScene, _super);
function StartScene() {
function StartScene() {
...
@@ -46885,6 +46891,7 @@ var StartScene = (function (_super) {
...
@@ -46885,6 +46891,7 @@ var StartScene = (function (_super) {
_super.prototype.initUi.call(this);
_super.prototype.initUi.call(this);
var sceneBg = Ins_1.Ins.initSprite("b3c8c187-e5c9-4968-9a00-a118d18ab2fc");
var sceneBg = Ins_1.Ins.initSprite("b3c8c187-e5c9-4968-9a00-a118d18ab2fc");
this.addChild(sceneBg);
this.addChild(sceneBg);
sceneBg.visible = false;
this.x = (Ins_1.Ins.stageW - 750) >> 1;
this.x = (Ins_1.Ins.stageW - 750) >> 1;
this.y = (Ins_1.Ins.stageH - 1624) >> 1;
this.y = (Ins_1.Ins.stageH - 1624) >> 1;
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getUserInfo, {}, function (s, r) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getUserInfo, {}, function (s, r) {
...
@@ -46900,10 +46907,12 @@ var StartScene = (function (_super) {
...
@@ -46900,10 +46907,12 @@ var StartScene = (function (_super) {
ctrls_1.changeScene(MainScene_1.MainScene);
ctrls_1.changeScene(MainScene_1.MainScene);
}
}
else {
else {
sceneBg.visible = true;
Ins_1.Ins.showModule("selectcatModal");
Ins_1.Ins.showModule("selectcatModal");
}
}
}
}
else {
else {
sceneBg.visible = true;
Ins_1.Ins.showToast(r.message);
Ins_1.Ins.showToast(r.message);
}
}
});
});
...
@@ -46920,7 +46929,10 @@ var StartScene = (function (_super) {
...
@@ -46920,7 +46929,10 @@ var StartScene = (function (_super) {
ctrls_1.changeScene(MainScene_1.MainScene);
ctrls_1.changeScene(MainScene_1.MainScene);
};
};
StartScene.prototype.initEvents = function () {
StartScene.prototype.initEvents = function () {
FYGE.GDispatcher.addEventListener("selectEnd", this.getCat, this);
Main_1.GDispatcher.addEventListener("selectEnd", this.getCat, this);
};
StartScene.prototype.removeEvents = function () {
Main_1.GDispatcher.removeEventListener("selectEnd", this.getCat, this);
};
};
return StartScene;
return StartScene;
}(Scene_1.Scene));
}(Scene_1.Scene));
...
@@ -46975,7 +46987,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
...
@@ -46975,7 +46987,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.MainSceneBtnUi = void 0;
exports.MainSceneBtnUi = void 0;
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var MainSceneBtnUi = (function (_super) {
var MainSceneBtnUi = (function (_super) {
__extends(MainSceneBtnUi, _super);
__extends(MainSceneBtnUi, _super);
...
@@ -47080,7 +47091,7 @@ var MainSceneBtnUi = (function (_super) {
...
@@ -47080,7 +47091,7 @@ var MainSceneBtnUi = (function (_super) {
if (type != 'png' && type != 'jpg') {
if (type != 'png' && type != 'jpg') {
avatar1 = avatar + '.jpg';
avatar1 = avatar + '.jpg';
}
}
that.catAvatar.texture =
RES_1.RES.getRes(avatar1)
;
that.catAvatar.texture =
FYGE.TextureCache[avatar]
;
that.catAvatar.width = 52;
that.catAvatar.width = 52;
that.catAvatar.height = 52;
that.catAvatar.height = 52;
that.catAvatar.x = that.catAvatar.y = 5;
that.catAvatar.x = that.catAvatar.y = 5;
project/src/canvas/game/output.js.map
View file @
f72a8f5d
This diff is collapsed.
Click to expand it.
project/src/canvas/game/released/output.js
View file @
f72a8f5d
...
@@ -2604,13 +2604,17 @@ var Cat = (function (_super) {
...
@@ -2604,13 +2604,17 @@ var Cat = (function (_super) {
console.log(actType);
console.log(actType);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.interaction, { type: type, sence: Ins_1.Ins.curScene }, function (s, r) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.interaction, { type: type, sence: Ins_1.Ins.curScene }, function (s, r) {
if (s) {
if (s) {
if (r.data.isUpgrade) {
Ins_1.Ins.showModule("levelupModal", { prizeData: r.data, energyMax1: Ins_1.Ins.userInfo.energyMax, energyMax2: r.data.energyMax });
}
Main_1.GDispatcher.dispatchEvent(Enum_1.MSG.UPDATE_USERINFO);
Main_1.GDispatcher.dispatchEvent(Enum_1.MSG.UPDATE_USERINFO);
that.actRunning = true;
that.actRunning = true;
switch (actType) {
switch (actType) {
case Enum_1.CAT_ACTTYPEP.SLEEP:
case Enum_1.CAT_ACTTYPEP.SLEEP:
break;
break;
default:
default:
that.showDialog(actType, r.data.tips);
var index = Math.floor(Math.random() * r.data.tips.length);
that.showDialog(actType, r.data.tips[index]);
that.setCatAnimShow(actType, function () {
that.setCatAnimShow(actType, function () {
that.stopCatAct();
that.stopCatAct();
});
});
...
@@ -2677,6 +2681,7 @@ var InitLottie;
...
@@ -2677,6 +2681,7 @@ var InitLottie;
}
}
console.log(list);
console.log(list);
var p = new Promise(function (resolve, reject) {
var p = new Promise(function (resolve, reject) {
8;
initLottie(function (s) {
initLottie(function (s) {
if (s) {
if (s) {
resolve();
resolve();
...
@@ -46754,7 +46759,7 @@ var MainScene = (function (_super) {
...
@@ -46754,7 +46759,7 @@ var MainScene = (function (_super) {
return;
return;
}
}
else {
else {
if (
Ins_1.Ins.userInfo.energy != r.data
.energyMax) {
if (
r.data != Ins_1.Ins.userInfo
.energyMax) {
that.getUserEnergy();
that.getUserEnergy();
}
}
else {
else {
...
@@ -46878,6 +46883,7 @@ var MainScene_1 = __webpack_require__(/*! ./MainScene */ "./src/scenes/MainScene
...
@@ -46878,6 +46883,7 @@ var MainScene_1 = __webpack_require__(/*! ./MainScene */ "./src/scenes/MainScene
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var Main_1 = __webpack_require__(/*! ../Main */ "./src/Main.ts");
var StartScene = (function (_super) {
var StartScene = (function (_super) {
__extends(StartScene, _super);
__extends(StartScene, _super);
function StartScene() {
function StartScene() {
...
@@ -46887,6 +46893,7 @@ var StartScene = (function (_super) {
...
@@ -46887,6 +46893,7 @@ var StartScene = (function (_super) {
_super.prototype.initUi.call(this);
_super.prototype.initUi.call(this);
var sceneBg = Ins_1.Ins.initSprite("b3c8c187-e5c9-4968-9a00-a118d18ab2fc");
var sceneBg = Ins_1.Ins.initSprite("b3c8c187-e5c9-4968-9a00-a118d18ab2fc");
this.addChild(sceneBg);
this.addChild(sceneBg);
sceneBg.visible = false;
this.x = (Ins_1.Ins.stageW - 750) >> 1;
this.x = (Ins_1.Ins.stageW - 750) >> 1;
this.y = (Ins_1.Ins.stageH - 1624) >> 1;
this.y = (Ins_1.Ins.stageH - 1624) >> 1;
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getUserInfo, {}, function (s, r) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getUserInfo, {}, function (s, r) {
...
@@ -46902,10 +46909,12 @@ var StartScene = (function (_super) {
...
@@ -46902,10 +46909,12 @@ var StartScene = (function (_super) {
ctrls_1.changeScene(MainScene_1.MainScene);
ctrls_1.changeScene(MainScene_1.MainScene);
}
}
else {
else {
sceneBg.visible = true;
Ins_1.Ins.showModule("selectcatModal");
Ins_1.Ins.showModule("selectcatModal");
}
}
}
}
else {
else {
sceneBg.visible = true;
Ins_1.Ins.showToast(r.message);
Ins_1.Ins.showToast(r.message);
}
}
});
});
...
@@ -46922,7 +46931,10 @@ var StartScene = (function (_super) {
...
@@ -46922,7 +46931,10 @@ var StartScene = (function (_super) {
ctrls_1.changeScene(MainScene_1.MainScene);
ctrls_1.changeScene(MainScene_1.MainScene);
};
};
StartScene.prototype.initEvents = function () {
StartScene.prototype.initEvents = function () {
FYGE.GDispatcher.addEventListener("selectEnd", this.getCat, this);
Main_1.GDispatcher.addEventListener("selectEnd", this.getCat, this);
};
StartScene.prototype.removeEvents = function () {
Main_1.GDispatcher.removeEventListener("selectEnd", this.getCat, this);
};
};
return StartScene;
return StartScene;
}(Scene_1.Scene));
}(Scene_1.Scene));
...
@@ -46977,7 +46989,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
...
@@ -46977,7 +46989,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.MainSceneBtnUi = void 0;
exports.MainSceneBtnUi = void 0;
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var MainSceneBtnUi = (function (_super) {
var MainSceneBtnUi = (function (_super) {
__extends(MainSceneBtnUi, _super);
__extends(MainSceneBtnUi, _super);
...
@@ -47082,7 +47093,7 @@ var MainSceneBtnUi = (function (_super) {
...
@@ -47082,7 +47093,7 @@ var MainSceneBtnUi = (function (_super) {
if (type != 'png' && type != 'jpg') {
if (type != 'png' && type != 'jpg') {
avatar1 = avatar + '.jpg';
avatar1 = avatar + '.jpg';
}
}
that.catAvatar.texture =
RES_1.RES.getRes(avatar1)
;
that.catAvatar.texture =
FYGE.TextureCache[avatar]
;
that.catAvatar.width = 52;
that.catAvatar.width = 52;
that.catAvatar.height = 52;
that.catAvatar.height = 52;
that.catAvatar.x = that.catAvatar.y = 5;
that.catAvatar.x = that.catAvatar.y = 5;
project/src/canvas/game/resCanvasList.js
View file @
f72a8f5d
...
@@ -688,6 +688,133 @@ const resCanvasList = {
...
@@ -688,6 +688,133 @@ const resCanvasList = {
ext
:
'.png'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/shapGoBtn1.d4d2cbdd9ab87642e34600c20ca627c9a377ffb7.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/shapGoBtn1.d4d2cbdd9ab87642e34600c20ca627c9a377ffb7.png'
,
uuid
:
'dba58651-57a3-4b75-9447-0e4d498dd8cd'
uuid
:
'dba58651-57a3-4b75-9447-0e4d498dd8cd'
},
'5ae12c38-05d8-4105-9101-765e7f32525e'
:
{
name
:
'classRoomGuide1'
,
ext
:
'.png'
,
uuid
:
'5ae12c38-05d8-4105-9101-765e7f32525e'
,
url
:
'//yun.duiba.com.cn/spark/assets/02ca473f5f7828e4801c6de8d6c81cf459d4a366.png'
},
'e8ad2e4e-925c-4db5-b229-882ee98881a7'
:
{
name
:
'classRoomGuide2'
,
ext
:
'.png'
,
uuid
:
'e8ad2e4e-925c-4db5-b229-882ee98881a7'
,
url
:
'//yun.duiba.com.cn/spark/assets/c00974abebadf768413be923f88e4cec0836b275.png'
},
'c549f0a7-085e-444d-b839-4f2172094b0b'
:
{
name
:
'classRoomGuide3'
,
ext
:
'.png'
,
uuid
:
'c549f0a7-085e-444d-b839-4f2172094b0b'
,
url
:
'//yun.duiba.com.cn/spark/assets/d1696c00719725364450dd178fc7da4b6d9446de.png'
},
'3f48a757-495b-4ed7-957c-9ec95f82ea5e'
:
{
name
:
'classRoomGuide4'
,
ext
:
'.png'
,
uuid
:
'3f48a757-495b-4ed7-957c-9ec95f82ea5e'
,
url
:
'//yun.duiba.com.cn/spark/assets/383ce57472efe68f0f16079f122b6cff5ec71995.png'
},
'd37358ea-ba10-4c08-ab3c-7ff682629ada'
:
{
name
:
'playGroundGuide1'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/playGroundGuide1.9ca482960425bac644131a9ae90a45b700ea7642.png'
,
uuid
:
'd37358ea-ba10-4c08-ab3c-7ff682629ada'
},
'f44dd5ee-2fa3-4a47-b398-527b0398544b'
:
{
name
:
'playgroundGuide2'
,
ext
:
'.png'
,
uuid
:
'f44dd5ee-2fa3-4a47-b398-527b0398544b'
,
url
:
'//yun.duiba.com.cn/spark/assets/90b5cff8c620e9b2a81da22ab1cdc130a78da592.png'
},
'6583475b-201e-4324-b15e-4632f33f57ec'
:
{
name
:
'playgroundGuide3'
,
ext
:
'.png'
,
uuid
:
'6583475b-201e-4324-b15e-4632f33f57ec'
,
url
:
'//yun.duiba.com.cn/spark/assets/bb6780d281325d2753204eded63f5c1f9824dc38.png'
},
'a90aa98b-2ff1-41a2-8a71-749bb76d6ba3'
:
{
name
:
'playgroundGuide4'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/playgroundGuide4.a20dd536f9ebe4a7884fd577434d129a49d790df.png'
,
uuid
:
'a90aa98b-2ff1-41a2-8a71-749bb76d6ba3'
},
'5996c68c-2626-4a97-a36a-8d5af6b777c0'
:
{
name
:
'touchImg'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/touchImg.bababfd52ef6f99d5599d5dd09fd71a994e141d3.png'
,
uuid
:
'5996c68c-2626-4a97-a36a-8d5af6b777c0'
},
'90b114e6-83cb-46f1-b607-f88c50077b05'
:
{
name
:
'bluCat'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/bluCat.57cf00351ffde1985720a877d2e1384390970cd6.png'
,
uuid
:
'90b114e6-83cb-46f1-b607-f88c50077b05'
},
'4e471df6-01ab-421d-ba0b-084b2110dc6d'
:
{
name
:
'orengeCat'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/orengeCat.c664a89d9d7f63895c5460144098a5bac5fc31f5.png'
,
uuid
:
'4e471df6-01ab-421d-ba0b-084b2110dc6d'
},
'003e9904-aee4-4b8d-8d5d-fb4b1188bec1'
:
{
name
:
'sanhuaCat'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/sanhuaCat.b58ed1a3960ecd123ff0b0ff38b9cb8ad44c1b4d.png'
,
uuid
:
'003e9904-aee4-4b8d-8d5d-fb4b1188bec1'
},
'90283bd3-4b18-4535-97a8-90318f068781'
:
{
name
:
'xianluoCat'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/xianluoCat.c28961a75753d2d6ffe788a3ae38e7f3c3937344.png'
,
uuid
:
'90283bd3-4b18-4535-97a8-90318f068781'
},
'd4740497-ed95-4e35-b107-df545896cf05'
:
{
name
:
'bedRoomGuide1'
,
ext
:
'.png'
,
uuid
:
'd4740497-ed95-4e35-b107-df545896cf05'
,
url
:
'//yun.duiba.com.cn/spark/assets/b81c5e7ec197bbcc310ec84dc425d1419238c470.png'
},
'ba92a69d-fc74-482a-8839-6b483d2290b8'
:
{
name
:
'bedRoomGuide2'
,
ext
:
'.png'
,
uuid
:
'ba92a69d-fc74-482a-8839-6b483d2290b8'
,
url
:
'//yun.duiba.com.cn/spark/assets/fa384c300572a403ce99bf7cfe506fe5d95ff9e2.png'
},
'ff460e08-76fd-4888-8361-2b65b7ee95ea'
:
{
name
:
'bedRoomGuide3'
,
ext
:
'.png'
,
uuid
:
'ff460e08-76fd-4888-8361-2b65b7ee95ea'
,
url
:
'//yun.duiba.com.cn/spark/assets/dfaa85ae186e20803592e30f535af8c5a527f745.png'
},
'f1154565-9a56-4d95-83de-44832d700b5f'
:
{
name
:
'bedRoomGuide4'
,
ext
:
'.png'
,
uuid
:
'f1154565-9a56-4d95-83de-44832d700b5f'
,
url
:
'//yun.duiba.com.cn/spark/assets/fd6a0511d7feee32869253d7b380ca6870ef1492.png'
},
'6ab7cbb8-6c9d-412f-9d57-8404465d9e35'
:
{
name
:
'bedRoomGuide5'
,
ext
:
'.png'
,
uuid
:
'6ab7cbb8-6c9d-412f-9d57-8404465d9e35'
,
url
:
'//yun.duiba.com.cn/spark/assets/19abee4b0b5e64dcfc219d69ded2bf89ed19847c.png'
},
'df6ccefe-756c-4383-aac3-7da9f74b3a0f'
:
{
name
:
'bedRoomGuide6'
,
ext
:
'.png'
,
uuid
:
'df6ccefe-756c-4383-aac3-7da9f74b3a0f'
,
url
:
'//yun.duiba.com.cn/spark/assets/b6800bb9c52624fe34ae6065333733fe691db8a9.png'
},
'1a4f7c9e-0857-425a-8abe-3dd5c79b2528'
:
{
name
:
'bedRoomGuide7'
,
ext
:
'.png'
,
uuid
:
'1a4f7c9e-0857-425a-8abe-3dd5c79b2528'
,
url
:
'//yun.duiba.com.cn/spark/assets/e2822fc4c01310e66f2276f9b03d56519b122e1e.png'
}
}
};
};
export
default
resCanvasList
;
export
default
resCanvasList
;
project/src/canvas/game/src/Enum.ts
View file @
f72a8f5d
...
@@ -17,7 +17,13 @@ export enum MSG{
...
@@ -17,7 +17,13 @@ export enum MSG{
/**猫咪互动 */
/**猫咪互动 */
CAT_ACT
=
"CAT_ACT"
,
CAT_ACT
=
"CAT_ACT"
,
/**刷新用户领养信息 */
/**刷新用户领养信息 */
UPDATE_USERINFO
=
"UPDATE_USERINFO"
UPDATE_USERINFO
=
"UPDATE_USERINFO"
,
/**结束寝室引导 */
GUIDE_BEDROOMEND
=
"GUIDE_BEDROOMEND"
,
/**结束教室引导 */
GUIDE_CLASSROOMEND
=
"GUIDE_CLASSROOMEND"
,
/**结束操场引导 */
GUIDE_PLAYGROUNDEND
=
"GUIDE_PLAYGROUNDEND"
}
}
/**猫咪类型 */
/**猫咪类型 */
...
...
project/src/canvas/game/src/InitLottie.ts
View file @
f72a8f5d
...
@@ -9,7 +9,7 @@ export namespace InitLottie {
...
@@ -9,7 +9,7 @@ export namespace InitLottie {
list
.
push
(
resList
[
key
]);
list
.
push
(
resList
[
key
]);
}
}
console
.
log
(
list
)
console
.
log
(
list
)
let
p
:
Promise
<
any
>
=
new
Promise
((
resolve
,
reject
)
=>
{
let
p
:
Promise
<
any
>
=
new
Promise
((
resolve
,
reject
)
=>
{
8
initLottie
((
s
)
=>
{
initLottie
((
s
)
=>
{
if
(
s
)
{
if
(
s
)
{
resolve
()
resolve
()
...
...
project/src/canvas/game/src/Ins.ts
View file @
f72a8f5d
...
@@ -31,7 +31,8 @@ export class Ins {
...
@@ -31,7 +31,8 @@ export class Ins {
"sence"
:
number
,
//场景
"sence"
:
number
,
//场景
"senceTips"
:
string
[],
//场景互动文案(猫咪说话)
"senceTips"
:
string
[],
//场景互动文案(猫咪说话)
"energyMax"
:
number
,
"energyMax"
:
number
,
"experienceMax"
:
number
"experienceMax"
:
number
,
"senceGuide"
:
boolean
}
}
...
...
project/src/canvas/game/src/ResJson.ts
View file @
f72a8f5d
...
@@ -10,5 +10,5 @@ export const ResJson = {
...
@@ -10,5 +10,5 @@ export const ResJson = {
"name"
:
"startScene"
"name"
:
"startScene"
}
}
],
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/16010
05193
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/16010
14736
/resource/"
}
}
\ No newline at end of file
project/src/canvas/game/src/cat/Cat.ts
View file @
f72a8f5d
...
@@ -55,10 +55,7 @@ export class Cat extends Module {
...
@@ -55,10 +55,7 @@ export class Cat extends Module {
console
.
log
(
this
.
catLottieArr
);
console
.
log
(
this
.
catLottieArr
);
this
.
initCat
();
this
.
initCat
();
this
.
initDialog
();
this
.
initDialog
();
var
tipsArr
=
Ins
.
userInfo
.
senceTips
;
this
.
catTalk
();
var
index
=
Math
.
floor
(
Math
.
random
()
*
tipsArr
.
length
)
this
.
showDialog
(
1
,
tipsArr
[
index
]);
this
.
setCatAnimShow
(
1
,()
=>
{
this
.
stopCatAct
()});
this
.
initEvents
();
this
.
initEvents
();
}
}
...
@@ -147,6 +144,14 @@ export class Cat extends Module {
...
@@ -147,6 +144,14 @@ export class Cat extends Module {
that
.
dialog
.
alpha
=
0
;
that
.
dialog
.
alpha
=
0
;
}
}
/**在每天进入场景或是在引导后,猫咪说话 */
catTalk
(){
var
tipsArr
=
Ins
.
userInfo
.
senceTips
;
var
index
=
Math
.
floor
(
Math
.
random
()
*
tipsArr
.
length
)
this
.
showDialog
(
1
,
tipsArr
[
index
]);
this
.
setCatAnimShow
(
1
,()
=>
{
this
.
stopCatAct
()});
}
/**显示对话框 */
/**显示对话框 */
showDialog
(
type
,
msg
:
string
){
showDialog
(
type
,
msg
:
string
){
var
that
=
this
;
var
that
=
this
;
...
@@ -213,13 +218,17 @@ export class Cat extends Module {
...
@@ -213,13 +218,17 @@ export class Cat extends Module {
console
.
log
(
actType
);
console
.
log
(
actType
);
sendTbNet
(
TbNetName
.
interaction
,
{
type
:
type
,
sence
:
Ins
.
curScene
},
(
s
,
r
)
=>
{
sendTbNet
(
TbNetName
.
interaction
,
{
type
:
type
,
sence
:
Ins
.
curScene
},
(
s
,
r
)
=>
{
if
(
s
)
{
if
(
s
)
{
if
(
r
.
data
.
isUpgrade
){
Ins
.
showModule
(
"levelupModal"
,{
prizeData
:
r
.
data
,
energyMax1
:
Ins
.
userInfo
.
energyMax
,
energyMax2
:
r
.
data
.
energyMax
});
}
GDispatcher
.
dispatchEvent
(
MSG
.
UPDATE_USERINFO
);
GDispatcher
.
dispatchEvent
(
MSG
.
UPDATE_USERINFO
);
that
.
actRunning
=
true
;
that
.
actRunning
=
true
;
switch
(
actType
)
{
switch
(
actType
)
{
case
CAT_ACTTYPEP
.
SLEEP
:
case
CAT_ACTTYPEP
.
SLEEP
:
break
;
break
;
default
:
default
:
that
.
showDialog
(
actType
,
r
.
data
.
tips
);
var
index
=
Math
.
floor
(
Math
.
random
()
*
r
.
data
.
tips
.
length
)
that
.
showDialog
(
actType
,
r
.
data
.
tips
[
index
]);
that
.
setCatAnimShow
(
actType
,
()
=>
{
that
.
setCatAnimShow
(
actType
,
()
=>
{
that
.
stopCatAct
();
that
.
stopCatAct
();
});
});
...
...
project/src/canvas/game/src/guide/Guide.ts
0 → 100644
View file @
f72a8f5d
import
{
RES
}
from
"../../module/RES"
;
import
{
Module
}
from
"../../module/views/Module"
;
import
resCanvasList
from
"../../resCanvasList"
;
import
{
MSG
}
from
"../Enum"
;
import
{
Ins
}
from
"../Ins"
;
import
{
GDispatcher
}
from
"../Main"
;
export
class
Guide
extends
Module
{
constructor
(
data
?)
{
super
(
data
);
this
.
guideType
=
data
.
type
;
this
.
callBack
=
data
.
callBack
}
guideTouch
:
FYGE
.
Sprite
;
guide
:
FYGE
.
Sprite
;
/**寝室引导图片组 */
guideUUIDArr_3
:
string
[]
=
[];
/**操场引导图片组 */
guideUUIDArr_2
:
string
[]
=
[];
/**教室引导图片组 */
guideUUIDArr_1
:
string
[]
=
[];
/**当前引导索引 */
index
:
number
=
0
;
/**当前引导类型 */
guideType
:
number
=
0
;
//1:教室,2:操场,3:寝室
/**猫咪图片 */
catImg
:
FYGE
.
Sprite
;
/**猫咪图片UUID */
catImgUUIDArr
:
string
[]
=
[];
/**猫咪位置组 */
catPosArr
:
number
[]
=
[];
/**猫咪在对应index的引导中是否出现 */
catIsShow
:
boolean
[]
=
[];
callBack
;
initUi
()
{
var
that
=
this
;
that
.
index
=
0
;
that
.
catPosArr
=
[
80
,
80
,
80
,
70
];
/**猫咪图片 */
that
.
catImgUUIDArr
=
[
'90b114e6-83cb-46f1-b607-f88c50077b05'
,
'4e471df6-01ab-421d-ba0b-084b2110dc6d'
,
'003e9904-aee4-4b8d-8d5d-fb4b1188bec1'
,
'90283bd3-4b18-4535-97a8-90318f068781'
]
/**教室引导图片 */
that
.
guideUUIDArr_1
=
[
'5ae12c38-05d8-4105-9101-765e7f32525e'
,
'e8ad2e4e-925c-4db5-b229-882ee98881a7'
,
'c549f0a7-085e-444d-b839-4f2172094b0b'
,
'3f48a757-495b-4ed7-957c-9ec95f82ea5e'
];
/**操场引导图片 */
that
.
guideUUIDArr_2
=
[
'd37358ea-ba10-4c08-ab3c-7ff682629ada'
,
'f44dd5ee-2fa3-4a47-b398-527b0398544b'
,
'6583475b-201e-4324-b15e-4632f33f57ec'
,
'a90aa98b-2ff1-41a2-8a71-749bb76d6ba3'
];
/**寝室引导图片 */
that
.
guideUUIDArr_3
=
[
'd4740497-ed95-4e35-b107-df545896cf05'
,
'ba92a69d-fc74-482a-8839-6b483d2290b8'
,
'ff460e08-76fd-4888-8361-2b65b7ee95ea'
,
'f1154565-9a56-4d95-83de-44832d700b5f'
,
'6ab7cbb8-6c9d-412f-9d57-8404465d9e35'
,
'df6ccefe-756c-4383-aac3-7da9f74b3a0f'
,
'1a4f7c9e-0857-425a-8abe-3dd5c79b2528'
];
that
.
guide
=
new
FYGE
.
Sprite
(
Ins
.
getRes
(
that
[
'guideUUIDArr_'
+
Ins
.
userInfo
.
sence
][
0
]));
that
.
addChild
(
that
.
guide
);
that
.
catImg
=
new
FYGE
.
Sprite
(
Ins
.
getRes
(
that
.
catImgUUIDArr
[
Ins
.
userInfo
.
catType
-
1
]))
that
.
addChild
(
that
.
catImg
);
that
.
catImg
.
position
.
set
(
128
,
(
Ins
.
stageH
*
0.5
+
that
.
catPosArr
[
Ins
.
userInfo
.
catType
-
1
]));
that
.
guideTouch
=
new
FYGE
.
Sprite
(
RES
.
getRes
(
resCanvasList
[
"5996c68c-2626-4a97-a36a-8d5af6b777c0"
].
url
));
that
.
addChild
(
that
.
guideTouch
);
that
.
guideTouch
.
mouseEnable
=
true
;
that
.
initEvents
();
}
changeGuide
()
{
this
.
index
++
;
if
(
this
.
index
>=
this
[
'guideUUIDArr_'
+
Ins
.
userInfo
.
sence
].
length
)
{
// GDispatcher.dispatchEvent(MSG.GUIDE_BEDROOMEND);
this
.
callBack
&&
this
.
callBack
();
return
;
}
this
.
guide
.
texture
=
RES
.
getRes
(
resCanvasList
[
this
[
'guideUUIDArr_'
+
Ins
.
userInfo
.
sence
][
this
.
index
]].
url
)
if
(
Ins
.
userInfo
.
sence
==
3
||
Ins
.
userInfo
.
sence
==
4
)
{
if
(
this
.
index
==
4
||
this
.
index
==
5
)
{
this
.
catImg
.
visible
=
false
;
}
else
{
this
.
catImg
.
visible
=
true
;
}
}
console
.
log
(
this
.
guide
.
x
,
this
.
guide
.
y
)
}
initEvents
()
{
this
.
guideTouch
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
changeGuide
,
this
);
}
removeEvents
()
{
this
.
guideTouch
.
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
changeGuide
,
this
);
}
}
\ No newline at end of file
project/src/canvas/game/src/scenes/MainScene.ts
View file @
f72a8f5d
...
@@ -9,6 +9,7 @@ import { GDispatcher } from "../Main";
...
@@ -9,6 +9,7 @@ import { GDispatcher } from "../Main";
import
{
Cat
}
from
"../cat/Cat"
;
import
{
Cat
}
from
"../cat/Cat"
;
import
{
sendTbNet
,
TbNetName
}
from
"../TaoBaoNet"
;
import
{
sendTbNet
,
TbNetName
}
from
"../TaoBaoNet"
;
import
{
letter
}
from
"../lottieSrc/lottieTs/letter"
;
import
{
letter
}
from
"../lottieSrc/lottieTs/letter"
;
import
{
Guide
}
from
"../guide/Guide"
;
export
class
MainScene
extends
Scene
{
export
class
MainScene
extends
Scene
{
/**场景背景 */
/**场景背景 */
...
@@ -42,6 +43,9 @@ export class MainScene extends Scene {
...
@@ -42,6 +43,9 @@ export class MainScene extends Scene {
/**猫咪等级 */
/**猫咪等级 */
private
level
:
number
=
0
;
private
level
:
number
=
0
;
/**场景引导 */
private
Guide
:
Guide
;
initUi
()
{
initUi
()
{
var
that
=
this
;
var
that
=
this
;
that
.
initSceneEle
();
that
.
initSceneEle
();
...
@@ -61,6 +65,8 @@ export class MainScene extends Scene {
...
@@ -61,6 +65,8 @@ export class MainScene extends Scene {
that
.
sceneBg
=
Ins
.
initSprite
(
that
.
bgUUID
[
Ins
.
curScene
==
4
?
2
:
Ins
.
curScene
-
1
]);
that
.
sceneBg
=
Ins
.
initSprite
(
that
.
bgUUID
[
Ins
.
curScene
==
4
?
2
:
Ins
.
curScene
-
1
]);
that
.
addChild
(
that
.
sceneBg
);
that
.
addChild
(
that
.
sceneBg
);
that
.
tlBtn
=
Ins
.
initSprite
(
"1f8b040d-2fbc-4ff8-92f9-159773364fae"
,
0
,
640
);
that
.
tlBtn
=
Ins
.
initSprite
(
"1f8b040d-2fbc-4ff8-92f9-159773364fae"
,
0
,
640
);
that
.
tlBtn
.
alpha
=
0.1
;
that
.
tlBtn
.
alpha
=
0.1
;
that
.
tlBtn
.
mouseEnable
=
true
;
that
.
tlBtn
.
mouseEnable
=
true
;
...
@@ -87,6 +93,7 @@ export class MainScene extends Scene {
...
@@ -87,6 +93,7 @@ export class MainScene extends Scene {
that
.
initCat
();
that
.
initCat
();
that
.
initEnergy
();
that
.
initEnergy
();
that
.
energyUp
();
that
.
energyUp
();
that
.
initGuide
();
}
}
/**初始化猫咪 */
/**初始化猫咪 */
...
@@ -105,6 +112,22 @@ export class MainScene extends Scene {
...
@@ -105,6 +112,22 @@ export class MainScene extends Scene {
}
}
}
}
/**初始化引导 */
initGuide
(){
var
that
=
this
;
if
(
Ins
.
userInfo
.
senceGuide
){
this
.
cat
.
visible
=
false
;
this
.
Guide
=
new
Guide
({
type
:
Ins
.
userInfo
.
sence
,
callBack
:()
=>
{
that
.
removeChild
(
that
.
Guide
);
that
.
senceGuideEnd
()}});
this
.
addChild
(
this
.
Guide
);
}
}
/**场景引导结束 */
senceGuideEnd
(){
this
.
cat
.
visible
=
true
;
this
.
cat
.
catTalk
();
}
/**打开信封 */
/**打开信封 */
openLetter
()
{
openLetter
()
{
console
.
log
(
"打开信封弹窗"
)
console
.
log
(
"打开信封弹窗"
)
...
@@ -185,7 +208,7 @@ export class MainScene extends Scene {
...
@@ -185,7 +208,7 @@ export class MainScene extends Scene {
that
.
setEnergy
();
that
.
setEnergy
();
return
;
return
;
}
else
{
}
else
{
if
(
Ins
.
userInfo
.
energy
!=
r
.
data
.
energyMax
){
if
(
r
.
data
!=
Ins
.
userInfo
.
energyMax
){
that
.
getUserEnergy
();
that
.
getUserEnergy
();
}
}
else
{
else
{
...
@@ -271,7 +294,6 @@ export class MainScene extends Scene {
...
@@ -271,7 +294,6 @@ export class MainScene extends Scene {
that
.
mainUi
.
updateUserInfo
();
that
.
mainUi
.
updateUserInfo
();
}
else
{
}
else
{
Ins
.
showToast
(
r
.
message
)
Ins
.
showToast
(
r
.
message
)
}
}
})
})
...
...
project/src/canvas/game/src/scenes/StartScene.ts
View file @
f72a8f5d
...
@@ -8,11 +8,13 @@ import { Ins } from "../Ins";
...
@@ -8,11 +8,13 @@ import { Ins } from "../Ins";
import
{
changeScene
,
showPanel
,
showToast
}
from
"../../module/ctrls"
;
import
{
changeScene
,
showPanel
,
showToast
}
from
"../../module/ctrls"
;
import
{
SelectCatPanel
}
from
"../panels/selectcatpanel/SelectCatPanel"
;
import
{
SelectCatPanel
}
from
"../panels/selectcatpanel/SelectCatPanel"
;
import
{
sendTbNet
,
TbNetName
}
from
"../TaoBaoNet"
;
import
{
sendTbNet
,
TbNetName
}
from
"../TaoBaoNet"
;
import
{
GDispatcher
}
from
"../Main"
;
export
class
StartScene
extends
Scene
{
export
class
StartScene
extends
Scene
{
initUi
()
{
initUi
()
{
super
.
initUi
();
super
.
initUi
();
var
sceneBg
=
Ins
.
initSprite
(
"b3c8c187-e5c9-4968-9a00-a118d18ab2fc"
);
var
sceneBg
=
Ins
.
initSprite
(
"b3c8c187-e5c9-4968-9a00-a118d18ab2fc"
);
this
.
addChild
(
sceneBg
);
this
.
addChild
(
sceneBg
);
sceneBg
.
visible
=
false
;
this
.
x
=
(
Ins
.
stageW
-
750
)
>>
1
;
this
.
x
=
(
Ins
.
stageW
-
750
)
>>
1
;
this
.
y
=
(
Ins
.
stageH
-
1624
)
>>
1
;
this
.
y
=
(
Ins
.
stageH
-
1624
)
>>
1
;
...
@@ -28,9 +30,11 @@ export class StartScene extends Scene {
...
@@ -28,9 +30,11 @@ export class StartScene extends Scene {
}
}
changeScene
(
MainScene
)
changeScene
(
MainScene
)
}
else
{
}
else
{
sceneBg
.
visible
=
true
;
Ins
.
showModule
(
"selectcatModal"
)
Ins
.
showModule
(
"selectcatModal"
)
}
}
}
else
{
}
else
{
sceneBg
.
visible
=
true
;
Ins
.
showToast
(
r
.
message
)
Ins
.
showToast
(
r
.
message
)
}
}
})
})
...
@@ -53,6 +57,10 @@ export class StartScene extends Scene {
...
@@ -53,6 +57,10 @@ export class StartScene extends Scene {
}
}
initEvents
(){
initEvents
(){
FYGE
.
GDispatcher
.
addEventListener
(
"selectEnd"
,
this
.
getCat
,
this
);
GDispatcher
.
addEventListener
(
"selectEnd"
,
this
.
getCat
,
this
);
}
removeEvents
(){
GDispatcher
.
removeEventListener
(
"selectEnd"
,
this
.
getCat
,
this
);
}
}
}
}
project/src/canvas/game/src/ui/MainSceneBtnUi.ts
View file @
f72a8f5d
...
@@ -176,7 +176,7 @@ export class MainSceneBtnUi extends Module {
...
@@ -176,7 +176,7 @@ export class MainSceneBtnUi extends Module {
if
(
type
!=
'png'
&&
type
!=
'jpg'
){
if
(
type
!=
'png'
&&
type
!=
'jpg'
){
avatar1
=
avatar
+
'.jpg'
avatar1
=
avatar
+
'.jpg'
}
}
that
.
catAvatar
.
texture
=
RES
.
getRes
(
avatar1
);
that
.
catAvatar
.
texture
=
FYGE
.
Texture
.
fromUrl
(
avatar
);
that
.
catAvatar
.
width
=
52
;
that
.
catAvatar
.
width
=
52
;
that
.
catAvatar
.
height
=
52
;
that
.
catAvatar
.
height
=
52
;
that
.
catAvatar
.
x
=
that
.
catAvatar
.
y
=
5
that
.
catAvatar
.
x
=
that
.
catAvatar
.
y
=
5
...
...
taobao_mini/client/components/comlevelup/comlevelup.acss
View file @
f72a8f5d
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
width: 750rpx;
width: 750rpx;
height: 1093rpx;
height: 1093rpx;
opacity: 1;
opacity: 1;
transform-origin:
0rpx 0rpx
0rpx;
transform-origin:
50% 50%
0rpx;
top:50%;
top:50%;
margin-top: -546rpx;
margin-top: -546rpx;
}
}
...
@@ -64,15 +64,16 @@
...
@@ -64,15 +64,16 @@
}
}
.levelup .levelup_txt {
.levelup .levelup_txt {
width:
371
rpx;
width:
750
rpx;
height: 26rpx;
height: 26rpx;
opacity: 1;
opacity: 1;
left:
191
rpx;
left:
0
rpx;
top: 711rpx;
top: 711rpx;
position: absolute;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 26rpx;
font-size: 26rpx;
color: #574738;
color: #574738;
text-align: center;
}
}
.levelup .levelup_title {
.levelup .levelup_title {
...
@@ -95,6 +96,16 @@
...
@@ -95,6 +96,16 @@
transform-origin: 0rpx 0rpx 0rpx;
transform-origin: 0rpx 0rpx 0rpx;
}
}
.levelup .levelup_prizeImg {
width: 352rpx;
height: 291rpx;
opacity: 1;
left: 201rpx;
top: 381rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.levelup .levelup_btn {
.levelup .levelup_btn {
width: 351rpx;
width: 351rpx;
height: 105rpx;
height: 105rpx;
...
@@ -102,5 +113,5 @@
...
@@ -102,5 +113,5 @@
left: 201rpx;
left: 201rpx;
top: 773rpx;
top: 773rpx;
position: absolute;
position: absolute;
transform-origin:
0rpx 0rpx
0rpx;
transform-origin:
50% 50%
0rpx;
}
}
\ No newline at end of file
taobao_mini/client/components/comlevelup/comlevelup.axml
View file @
f72a8f5d
...
@@ -4,10 +4,11 @@
...
@@ -4,10 +4,11 @@
<image class="levelup_light " src={{resList['a158cbff-9dcd-49df-bb91-16213d58036e'].url}} />
<image class="levelup_light " src={{resList['a158cbff-9dcd-49df-bb91-16213d58036e'].url}} />
<image class="levelup_bg " src={{resList['b027d194-0fad-45ea-8b1c-3502f7869d2d'].url}} />
<image class="levelup_bg " src={{resList['b027d194-0fad-45ea-8b1c-3502f7869d2d'].url}} />
<image class="levelup_bg2 " src={{resList['f88dfc75-c9f1-4e9d-8826-8a1d0e513259'].url}} />
<image class="levelup_bg2 " src={{resList['f88dfc75-c9f1-4e9d-8826-8a1d0e513259'].url}} />
<label class="levelup_txt ">{{
mydata.tips
}}</label>
<label class="levelup_txt ">{{
levelupTxt
}}</label>
<image class="levelup_title " src={{resList['69bff61a-b5a6-4979-ba8d-9e008aed737a'].url}} />
<image class="levelup_title " src={{resList['69bff61a-b5a6-4979-ba8d-9e008aed737a'].url}} />
<image class="levelup_imgbg " src={{resList['f56872e2-5e79-4906-99a2-576231f153af'].url}} />
<image class="levelup_imgbg " src={{resList['f56872e2-5e79-4906-99a2-576231f153af'].url}} />
<image class="levelup_btn " onTap="onBtnClick" src={{resList['95520b55-9655-4988-a833-3907978dbffb'].url}} />
<image class="levelup_prizeImg" src="{{prizeImg}}"/>>
<image class="levelup_btn btn" onTap="onBtnClick" src={{resList['95520b55-9655-4988-a833-3907978dbffb'].url}} />
<image class="levelup_closebtn " onTap="onModalClose" src={{resList['d33bbf87-ed39-4959-8673-02a4c31dca77'].url}} />
<image class="levelup_closebtn " onTap="onModalClose" src={{resList['d33bbf87-ed39-4959-8673-02a4c31dca77'].url}} />
</view>
</view>
</view>
</view>
\ No newline at end of file
taobao_mini/client/components/comlevelup/comlevelup.js
View file @
f72a8f5d
...
@@ -5,8 +5,11 @@ Component({
...
@@ -5,8 +5,11 @@ Component({
props
:
{
props
:
{
mydata
:{}
mydata
:{}
},
},
// {prizeData:r.data,energyMax1:Ins.userInfo.energyMax,energyMax2:r.data.energyMax}
data
:
{
data
:
{
resList
:
resList
resList
:
resList
,
levelupTxt
:
'精力上限1200 → 精力上限1500'
,
prizeImg
:
'//yun.duiba.com.cn/spark-prod/assets/lihe.f12fa204705c3e790a3300a890d088212f49a5c9.png'
},
},
methods
:
{
methods
:
{
onBtnClick
()
{
onBtnClick
()
{
...
@@ -18,6 +21,15 @@ Component({
...
@@ -18,6 +21,15 @@ Component({
onModalClose
&&
onModalClose
();
onModalClose
&&
onModalClose
();
console
.
log
(
'onModalClose'
)
console
.
log
(
'onModalClose'
)
}
}
}
}
,
didMount
(){
console
.
log
(
"升级弹窗"
+
this
.
props
.
mydata
);
var
txt
=
'精力上限'
+
this
.
props
.
mydata
.
energyMax1
+
' → 精力上限'
+
this
.
props
.
mydata
.
energyMax2
;
this
.
setData
({
levelupTxt
:
txt
,
prizeImg
:
this
.
props
.
mydata
.
prizeData
.
image
})
}
});
});
\ No newline at end of file
taobao_mini/client/pages/pagecanvas/output.js
View file @
f72a8f5d
...
@@ -2603,13 +2603,17 @@ var Cat = (function (_super) {
...
@@ -2603,13 +2603,17 @@ var Cat = (function (_super) {
console.log(actType);
console.log(actType);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.interaction, { type: type, sence: Ins_1.Ins.curScene }, function (s, r) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.interaction, { type: type, sence: Ins_1.Ins.curScene }, function (s, r) {
if (s) {
if (s) {
if (r.data.isUpgrade) {
Ins_1.Ins.showModule("levelupModal", { prizeData: r.data, energyMax1: Ins_1.Ins.userInfo.energyMax, energyMax2: r.data.energyMax });
}
Main_1.GDispatcher.dispatchEvent(Enum_1.MSG.UPDATE_USERINFO);
Main_1.GDispatcher.dispatchEvent(Enum_1.MSG.UPDATE_USERINFO);
that.actRunning = true;
that.actRunning = true;
switch (actType) {
switch (actType) {
case Enum_1.CAT_ACTTYPEP.SLEEP:
case Enum_1.CAT_ACTTYPEP.SLEEP:
break;
break;
default:
default:
that.showDialog(actType, r.data.tips);
var index = Math.floor(Math.random() * r.data.tips.length);
that.showDialog(actType, r.data.tips[index]);
that.setCatAnimShow(actType, function () {
that.setCatAnimShow(actType, function () {
that.stopCatAct();
that.stopCatAct();
});
});
...
@@ -2676,6 +2680,7 @@ var InitLottie;
...
@@ -2676,6 +2680,7 @@ var InitLottie;
}
}
console.log(list);
console.log(list);
var p = new Promise(function (resolve, reject) {
var p = new Promise(function (resolve, reject) {
8;
initLottie(function (s) {
initLottie(function (s) {
if (s) {
if (s) {
resolve();
resolve();
...
@@ -46753,7 +46758,7 @@ var MainScene = (function (_super) {
...
@@ -46753,7 +46758,7 @@ var MainScene = (function (_super) {
return;
return;
}
}
else {
else {
if (
Ins_1.Ins.userInfo.energy != r.data
.energyMax) {
if (
r.data != Ins_1.Ins.userInfo
.energyMax) {
that.getUserEnergy();
that.getUserEnergy();
}
}
else {
else {
...
@@ -46877,6 +46882,7 @@ var MainScene_1 = __webpack_require__(/*! ./MainScene */ "./src/scenes/MainScene
...
@@ -46877,6 +46882,7 @@ var MainScene_1 = __webpack_require__(/*! ./MainScene */ "./src/scenes/MainScene
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var Main_1 = __webpack_require__(/*! ../Main */ "./src/Main.ts");
var StartScene = (function (_super) {
var StartScene = (function (_super) {
__extends(StartScene, _super);
__extends(StartScene, _super);
function StartScene() {
function StartScene() {
...
@@ -46886,6 +46892,7 @@ var StartScene = (function (_super) {
...
@@ -46886,6 +46892,7 @@ var StartScene = (function (_super) {
_super.prototype.initUi.call(this);
_super.prototype.initUi.call(this);
var sceneBg = Ins_1.Ins.initSprite("b3c8c187-e5c9-4968-9a00-a118d18ab2fc");
var sceneBg = Ins_1.Ins.initSprite("b3c8c187-e5c9-4968-9a00-a118d18ab2fc");
this.addChild(sceneBg);
this.addChild(sceneBg);
sceneBg.visible = false;
this.x = (Ins_1.Ins.stageW - 750) >> 1;
this.x = (Ins_1.Ins.stageW - 750) >> 1;
this.y = (Ins_1.Ins.stageH - 1624) >> 1;
this.y = (Ins_1.Ins.stageH - 1624) >> 1;
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getUserInfo, {}, function (s, r) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getUserInfo, {}, function (s, r) {
...
@@ -46901,10 +46908,12 @@ var StartScene = (function (_super) {
...
@@ -46901,10 +46908,12 @@ var StartScene = (function (_super) {
ctrls_1.changeScene(MainScene_1.MainScene);
ctrls_1.changeScene(MainScene_1.MainScene);
}
}
else {
else {
sceneBg.visible = true;
Ins_1.Ins.showModule("selectcatModal");
Ins_1.Ins.showModule("selectcatModal");
}
}
}
}
else {
else {
sceneBg.visible = true;
Ins_1.Ins.showToast(r.message);
Ins_1.Ins.showToast(r.message);
}
}
});
});
...
@@ -46921,7 +46930,10 @@ var StartScene = (function (_super) {
...
@@ -46921,7 +46930,10 @@ var StartScene = (function (_super) {
ctrls_1.changeScene(MainScene_1.MainScene);
ctrls_1.changeScene(MainScene_1.MainScene);
};
};
StartScene.prototype.initEvents = function () {
StartScene.prototype.initEvents = function () {
FYGE.GDispatcher.addEventListener("selectEnd", this.getCat, this);
Main_1.GDispatcher.addEventListener("selectEnd", this.getCat, this);
};
StartScene.prototype.removeEvents = function () {
Main_1.GDispatcher.removeEventListener("selectEnd", this.getCat, this);
};
};
return StartScene;
return StartScene;
}(Scene_1.Scene));
}(Scene_1.Scene));
...
@@ -46976,7 +46988,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
...
@@ -46976,7 +46988,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.MainSceneBtnUi = void 0;
exports.MainSceneBtnUi = void 0;
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var MainSceneBtnUi = (function (_super) {
var MainSceneBtnUi = (function (_super) {
__extends(MainSceneBtnUi, _super);
__extends(MainSceneBtnUi, _super);
...
@@ -47081,7 +47092,7 @@ var MainSceneBtnUi = (function (_super) {
...
@@ -47081,7 +47092,7 @@ var MainSceneBtnUi = (function (_super) {
if (type != 'png' && type != 'jpg') {
if (type != 'png' && type != 'jpg') {
avatar1 = avatar + '.jpg';
avatar1 = avatar + '.jpg';
}
}
that.catAvatar.texture =
RES_1.RES.getRes(avatar1)
;
that.catAvatar.texture =
FYGE.TextureCache[avatar]
;
that.catAvatar.width = 52;
that.catAvatar.width = 52;
that.catAvatar.height = 52;
that.catAvatar.height = 52;
that.catAvatar.x = that.catAvatar.y = 5;
that.catAvatar.x = that.catAvatar.y = 5;
taobao_mini/debug.log
View file @
f72a8f5d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment