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
38c03c25
Commit
38c03c25
authored
Sep 28, 2020
by
Edwise
🍷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1234
parent
c73bc7cb
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
443 additions
and
19 deletions
+443
-19
tmallCat.getUserInfo.json
...ect/src/canvas/game/mock/miniTb/tmallCat.getUserInfo.json
+1
-1
output.js
project/src/canvas/game/output.js
+11
-3
output.js.map
project/src/canvas/game/output.js.map
+1
-1
output.js
project/src/canvas/game/released/output.js
+11
-3
Cat.ts
project/src/canvas/game/src/cat/Cat.ts
+13
-5
output.js
taobao_mini/client/pages/pagecanvas/output.js
+11
-3
pagecanvasoutput.js
taobao_mini/client/pages/pagecanvasoutput.js
+11
-3
debug.log
taobao_mini/debug.log
+384
-0
No files found.
project/src/canvas/game/mock/miniTb/tmallCat.getUserInfo.json
View file @
38c03c25
...
...
@@ -2,7 +2,7 @@
"success"
:
true
,
"message"
:
""
,
"data"
:
{
"catType"
:
2
,
"catType"
:
4
,
"userNick"
:
"Edwise"
,
"energy"
:
1000
,
"happyCoin"
:
1000
,
...
...
project/src/canvas/game/output.js
View file @
38c03c25
...
...
@@ -2604,7 +2604,10 @@ var Cat = (function (_super) {
var _this = _super.call(this, data) || this;
_this.catAnimArr = [];
_this.actRunning = false;
_this.dialogPos = [{ x: 1, y: 1 }];
_this.dialogPos1 = [{ x: 1, y: 1 }];
_this.dialogPos2 = [{ x: 1, y: 1 }];
_this.dialogPos3 = [{ x: 1, y: 1 }];
_this.dialogPos4 = [{ x: 1, y: 1 }];
_this.catType = data.type;
return _this;
}
...
...
@@ -2675,7 +2678,10 @@ var Cat = (function (_super) {
};
Cat.prototype.initDialog = function () {
var that = this;
that.dialogPos = [{}, { x: 280, y: 516 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 370, y: 536 }];
that.dialogPos1 = [{}, { x: 280, y: 556 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 300, y: 536 }, { x: 410, y: 536 }];
that.dialogPos2 = [{}, { x: 280, y: 516 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 410, y: 536 }];
that.dialogPos3 = [{}, { x: 280, y: 546 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 300, y: 536 }, { x: 410, y: 526 }];
that.dialogPos4 = [{}, { x: 280, y: 556 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 410, y: 536 }];
that.dialog = Ins_1.Ins.initSprite("624e8c63-963f-4b20-9802-b0fb006fbf93");
that.dialog.position.set(280, 526);
that.addChild(that.dialog);
...
...
@@ -2684,6 +2690,8 @@ var Cat = (function (_super) {
that.dialog.addChild(that.dialogText);
that.dialogText.textHeight = 138;
that.dialogText.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE;
that.dialogText.fillColor = "#685b4e";
that.dialogText.bold = true;
console.log("最大长度为" + that.dialogText.text.length);
console.log("当前文本高度为" + that.dialogText.textHeight);
that.dialog.alpha = 0;
...
...
@@ -2698,7 +2706,7 @@ var Cat = (function (_super) {
Cat.prototype.showDialog = function (type, msg) {
var that = this;
msg = msg.length >= 11 ? msg.substring(0, 11) + '\n' + msg.substring(11) : msg;
that.dialog.position.set(that
.dialogPos[type].x, that.dialogPos
[type].y);
that.dialog.position.set(that
['dialogPos' + Ins_1.Ins.userInfo.catType][type].x, that['dialogPos' + Ins_1.Ins.userInfo.catType]
[type].y);
that.dialogText.text = msg;
FYGE.Tween.removeTweens(that.dialog);
that.dialog.alpha = 0;
project/src/canvas/game/output.js.map
View file @
38c03c25
This diff is collapsed.
Click to expand it.
project/src/canvas/game/released/output.js
View file @
38c03c25
...
...
@@ -2606,7 +2606,10 @@ var Cat = (function (_super) {
var _this = _super.call(this, data) || this;
_this.catAnimArr = [];
_this.actRunning = false;
_this.dialogPos = [{ x: 1, y: 1 }];
_this.dialogPos1 = [{ x: 1, y: 1 }];
_this.dialogPos2 = [{ x: 1, y: 1 }];
_this.dialogPos3 = [{ x: 1, y: 1 }];
_this.dialogPos4 = [{ x: 1, y: 1 }];
_this.catType = data.type;
return _this;
}
...
...
@@ -2677,7 +2680,10 @@ var Cat = (function (_super) {
};
Cat.prototype.initDialog = function () {
var that = this;
that.dialogPos = [{}, { x: 280, y: 516 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 370, y: 536 }];
that.dialogPos1 = [{}, { x: 280, y: 556 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 300, y: 536 }, { x: 410, y: 536 }];
that.dialogPos2 = [{}, { x: 280, y: 516 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 410, y: 536 }];
that.dialogPos3 = [{}, { x: 280, y: 546 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 300, y: 536 }, { x: 410, y: 526 }];
that.dialogPos4 = [{}, { x: 280, y: 556 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 410, y: 536 }];
that.dialog = Ins_1.Ins.initSprite("624e8c63-963f-4b20-9802-b0fb006fbf93");
that.dialog.position.set(280, 526);
that.addChild(that.dialog);
...
...
@@ -2686,6 +2692,8 @@ var Cat = (function (_super) {
that.dialog.addChild(that.dialogText);
that.dialogText.textHeight = 138;
that.dialogText.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE;
that.dialogText.fillColor = "#685b4e";
that.dialogText.bold = true;
console.log("最大长度为" + that.dialogText.text.length);
console.log("当前文本高度为" + that.dialogText.textHeight);
that.dialog.alpha = 0;
...
...
@@ -2700,7 +2708,7 @@ var Cat = (function (_super) {
Cat.prototype.showDialog = function (type, msg) {
var that = this;
msg = msg.length >= 11 ? msg.substring(0, 11) + '\n' + msg.substring(11) : msg;
that.dialog.position.set(that
.dialogPos[type].x, that.dialogPos
[type].y);
that.dialog.position.set(that
['dialogPos' + Ins_1.Ins.userInfo.catType][type].x, that['dialogPos' + Ins_1.Ins.userInfo.catType]
[type].y);
that.dialogText.text = msg;
FYGE.Tween.removeTweens(that.dialog);
that.dialog.alpha = 0;
project/src/canvas/game/src/cat/Cat.ts
View file @
38c03c25
...
...
@@ -48,7 +48,10 @@ export class Cat extends Module {
actRunning
:
boolean
=
false
;
//动效是否进行中,如果动效进行中,无法进行其他动效
dialog
:
FYGE
.
Sprite
;
//猫咪对话框气泡
dialogText
:
FYGE
.
TextField
;
//猫咪对话框气泡文字内容
dialogPos
:
any
[]
=
[{
x
:
1
,
y
:
1
}];
//猫咪对话框气泡位置
dialogPos1
:
any
[]
=
[{
x
:
1
,
y
:
1
}];
//猫咪对话框气泡位置
dialogPos2
:
any
[]
=
[{
x
:
1
,
y
:
1
}];
dialogPos3
:
any
[]
=
[{
x
:
1
,
y
:
1
}];
dialogPos4
:
any
[]
=
[{
x
:
1
,
y
:
1
}];
initUi
()
{
this
.
initEvents
();
...
...
@@ -129,7 +132,10 @@ export class Cat extends Module {
/**初始化对话框 */
initDialog
(){
var
that
=
this
;
that
.
dialogPos
=
[{},{
x
:
280
,
y
:
516
},{
x
:
320
,
y
:
400
},{
x
:
280
,
y
:
556
},{
x
:
280
,
y
:
536
},{
x
:
370
,
y
:
536
}]
that
.
dialogPos1
=
[{},{
x
:
280
,
y
:
556
},{
x
:
320
,
y
:
400
},{
x
:
280
,
y
:
556
},{
x
:
300
,
y
:
536
},{
x
:
410
,
y
:
536
}];
that
.
dialogPos2
=
[{},{
x
:
280
,
y
:
516
},{
x
:
320
,
y
:
400
},{
x
:
280
,
y
:
556
},{
x
:
280
,
y
:
536
},{
x
:
410
,
y
:
536
}];
that
.
dialogPos3
=
[{},{
x
:
280
,
y
:
546
},{
x
:
320
,
y
:
400
},{
x
:
280
,
y
:
556
},{
x
:
300
,
y
:
536
},{
x
:
410
,
y
:
526
}];
that
.
dialogPos4
=
[{},{
x
:
280
,
y
:
556
},{
x
:
320
,
y
:
400
},{
x
:
280
,
y
:
556
},{
x
:
280
,
y
:
536
},{
x
:
410
,
y
:
536
}];
that
.
dialog
=
Ins
.
initSprite
(
"624e8c63-963f-4b20-9802-b0fb006fbf93"
);
that
.
dialog
.
position
.
set
(
280
,
526
)
that
.
addChild
(
that
.
dialog
);
...
...
@@ -137,8 +143,10 @@ export class Cat extends Module {
that
.
dialogText
.
textWidth
=
280
;
that
.
dialog
.
addChild
(
that
.
dialogText
);
that
.
dialogText
.
textHeight
=
138
;
that
.
dialogText
.
verticalAlign
=
FYGE
.
VERTICAL_ALIGN
.
MIDDLE
// that.dialogText.text = "哈哈哈哈哈哈哈,哈哈哈\n哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈";
that
.
dialogText
.
verticalAlign
=
FYGE
.
VERTICAL_ALIGN
.
MIDDLE
;
that
.
dialogText
.
fillColor
=
"#685b4e"
;
that
.
dialogText
.
bold
=
true
;
// that.dialogText.text = "哈哈哈哈哈哈哈,哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈";
console
.
log
(
"最大长度为"
+
that
.
dialogText
.
text
.
length
)
console
.
log
(
"当前文本高度为"
+
that
.
dialogText
.
textHeight
);
// that.dialog.visible = false;
...
...
@@ -157,7 +165,7 @@ export class Cat extends Module {
showDialog
(
type
,
msg
:
string
){
var
that
=
this
;
msg
=
msg
.
length
>=
11
?
msg
.
substring
(
0
,
11
)
+
'
\
n'
+
msg
.
substring
(
11
):
msg
that
.
dialog
.
position
.
set
(
that
.
dialogPos
[
type
].
x
,
that
.
dialogPos
[
type
].
y
)
that
.
dialog
.
position
.
set
(
that
[
'dialogPos'
+
Ins
.
userInfo
.
catType
][
type
].
x
,
that
[
'dialogPos'
+
Ins
.
userInfo
.
catType
]
[
type
].
y
)
that
.
dialogText
.
text
=
msg
;
FYGE
.
Tween
.
removeTweens
(
that
.
dialog
);
that
.
dialog
.
alpha
=
0
;
...
...
taobao_mini/client/pages/pagecanvas/output.js
View file @
38c03c25
...
...
@@ -2606,7 +2606,10 @@ var Cat = (function (_super) {
var _this = _super.call(this, data) || this;
_this.catAnimArr = [];
_this.actRunning = false;
_this.dialogPos = [{ x: 1, y: 1 }];
_this.dialogPos1 = [{ x: 1, y: 1 }];
_this.dialogPos2 = [{ x: 1, y: 1 }];
_this.dialogPos3 = [{ x: 1, y: 1 }];
_this.dialogPos4 = [{ x: 1, y: 1 }];
_this.catType = data.type;
return _this;
}
...
...
@@ -2677,7 +2680,10 @@ var Cat = (function (_super) {
};
Cat.prototype.initDialog = function () {
var that = this;
that.dialogPos = [{}, { x: 280, y: 516 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 370, y: 536 }];
that.dialogPos1 = [{}, { x: 280, y: 556 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 300, y: 536 }, { x: 410, y: 536 }];
that.dialogPos2 = [{}, { x: 280, y: 516 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 410, y: 536 }];
that.dialogPos3 = [{}, { x: 280, y: 546 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 300, y: 536 }, { x: 410, y: 526 }];
that.dialogPos4 = [{}, { x: 280, y: 556 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 410, y: 536 }];
that.dialog = Ins_1.Ins.initSprite("624e8c63-963f-4b20-9802-b0fb006fbf93");
that.dialog.position.set(280, 526);
that.addChild(that.dialog);
...
...
@@ -2686,6 +2692,8 @@ var Cat = (function (_super) {
that.dialog.addChild(that.dialogText);
that.dialogText.textHeight = 138;
that.dialogText.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE;
that.dialogText.fillColor = "#685b4e";
that.dialogText.bold = true;
console.log("最大长度为" + that.dialogText.text.length);
console.log("当前文本高度为" + that.dialogText.textHeight);
that.dialog.alpha = 0;
...
...
@@ -2700,7 +2708,7 @@ var Cat = (function (_super) {
Cat.prototype.showDialog = function (type, msg) {
var that = this;
msg = msg.length >= 11 ? msg.substring(0, 11) + '\n' + msg.substring(11) : msg;
that.dialog.position.set(that
.dialogPos[type].x, that.dialogPos
[type].y);
that.dialog.position.set(that
['dialogPos' + Ins_1.Ins.userInfo.catType][type].x, that['dialogPos' + Ins_1.Ins.userInfo.catType]
[type].y);
that.dialogText.text = msg;
FYGE.Tween.removeTweens(that.dialog);
that.dialog.alpha = 0;
taobao_mini/client/pages/pagecanvasoutput.js
View file @
38c03c25
...
...
@@ -2606,7 +2606,10 @@ var Cat = (function (_super) {
var _this = _super.call(this, data) || this;
_this.catAnimArr = [];
_this.actRunning = false;
_this.dialogPos = [{ x: 1, y: 1 }];
_this.dialogPos1 = [{ x: 1, y: 1 }];
_this.dialogPos2 = [{ x: 1, y: 1 }];
_this.dialogPos3 = [{ x: 1, y: 1 }];
_this.dialogPos4 = [{ x: 1, y: 1 }];
_this.catType = data.type;
return _this;
}
...
...
@@ -2677,7 +2680,10 @@ var Cat = (function (_super) {
};
Cat.prototype.initDialog = function () {
var that = this;
that.dialogPos = [{}, { x: 280, y: 516 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 370, y: 536 }];
that.dialogPos1 = [{}, { x: 280, y: 556 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 300, y: 536 }, { x: 410, y: 536 }];
that.dialogPos2 = [{}, { x: 280, y: 516 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 410, y: 536 }];
that.dialogPos3 = [{}, { x: 280, y: 546 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 300, y: 536 }, { x: 410, y: 526 }];
that.dialogPos4 = [{}, { x: 280, y: 556 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 410, y: 536 }];
that.dialog = Ins_1.Ins.initSprite("624e8c63-963f-4b20-9802-b0fb006fbf93");
that.dialog.position.set(280, 526);
that.addChild(that.dialog);
...
...
@@ -2686,6 +2692,8 @@ var Cat = (function (_super) {
that.dialog.addChild(that.dialogText);
that.dialogText.textHeight = 138;
that.dialogText.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE;
that.dialogText.fillColor = "#685b4e";
that.dialogText.bold = true;
console.log("最大长度为" + that.dialogText.text.length);
console.log("当前文本高度为" + that.dialogText.textHeight);
that.dialog.alpha = 0;
...
...
@@ -2700,7 +2708,7 @@ var Cat = (function (_super) {
Cat.prototype.showDialog = function (type, msg) {
var that = this;
msg = msg.length >= 11 ? msg.substring(0, 11) + '\n' + msg.substring(11) : msg;
that.dialog.position.set(that
.dialogPos[type].x, that.dialogPos
[type].y);
that.dialog.position.set(that
['dialogPos' + Ins_1.Ins.userInfo.catType][type].x, that['dialogPos' + Ins_1.Ins.userInfo.catType]
[type].y);
that.dialogText.text = msg;
FYGE.Tween.removeTweens(that.dialog);
that.dialog.alpha = 0;
taobao_mini/debug.log
View file @
38c03c25
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