Commit 33cfc33b authored by wildfirecode13's avatar wildfirecode13

Merge branch 'tianmaoxiaoyuan' of gitlab2.dui88.com:wanghongyuan/new_taobao into tianmaoxiaoyuan

parents 7d54c2d4 46414ec2
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"success": true, "success": true,
"message":"", "message":"",
"data": { "data": {
"catType": 2, "catType": 4,
"userNick": "Edwise", "userNick": "Edwise",
"energy": 1000, "energy": 1000,
"happyCoin":1000, "happyCoin":1000,
......
...@@ -2604,7 +2604,10 @@ var Cat = (function (_super) { ...@@ -2604,7 +2604,10 @@ var Cat = (function (_super) {
var _this = _super.call(this, data) || this; var _this = _super.call(this, data) || this;
_this.catAnimArr = []; _this.catAnimArr = [];
_this.actRunning = false; _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; _this.catType = data.type;
return _this; return _this;
} }
...@@ -2675,7 +2678,10 @@ var Cat = (function (_super) { ...@@ -2675,7 +2678,10 @@ var Cat = (function (_super) {
}; };
Cat.prototype.initDialog = function () { Cat.prototype.initDialog = function () {
var that = this; 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 = Ins_1.Ins.initSprite("624e8c63-963f-4b20-9802-b0fb006fbf93");
that.dialog.position.set(280, 526); that.dialog.position.set(280, 526);
that.addChild(that.dialog); that.addChild(that.dialog);
...@@ -2684,6 +2690,8 @@ var Cat = (function (_super) { ...@@ -2684,6 +2690,8 @@ var Cat = (function (_super) {
that.dialog.addChild(that.dialogText); that.dialog.addChild(that.dialogText);
that.dialogText.textHeight = 138; that.dialogText.textHeight = 138;
that.dialogText.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE; 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.text.length);
console.log("当前文本高度为" + that.dialogText.textHeight); console.log("当前文本高度为" + that.dialogText.textHeight);
that.dialog.alpha = 0; that.dialog.alpha = 0;
...@@ -2698,7 +2706,7 @@ var Cat = (function (_super) { ...@@ -2698,7 +2706,7 @@ var Cat = (function (_super) {
Cat.prototype.showDialog = function (type, msg) { Cat.prototype.showDialog = function (type, msg) {
var that = this; var that = this;
msg = msg.length >= 11 ? msg.substring(0, 11) + '\n' + msg.substring(11) : msg; 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; that.dialogText.text = msg;
FYGE.Tween.removeTweens(that.dialog); FYGE.Tween.removeTweens(that.dialog);
that.dialog.alpha = 0; that.dialog.alpha = 0;
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2606,7 +2606,10 @@ var Cat = (function (_super) { ...@@ -2606,7 +2606,10 @@ var Cat = (function (_super) {
var _this = _super.call(this, data) || this; var _this = _super.call(this, data) || this;
_this.catAnimArr = []; _this.catAnimArr = [];
_this.actRunning = false; _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; _this.catType = data.type;
return _this; return _this;
} }
...@@ -2677,7 +2680,10 @@ var Cat = (function (_super) { ...@@ -2677,7 +2680,10 @@ var Cat = (function (_super) {
}; };
Cat.prototype.initDialog = function () { Cat.prototype.initDialog = function () {
var that = this; 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 = Ins_1.Ins.initSprite("624e8c63-963f-4b20-9802-b0fb006fbf93");
that.dialog.position.set(280, 526); that.dialog.position.set(280, 526);
that.addChild(that.dialog); that.addChild(that.dialog);
...@@ -2686,6 +2692,8 @@ var Cat = (function (_super) { ...@@ -2686,6 +2692,8 @@ var Cat = (function (_super) {
that.dialog.addChild(that.dialogText); that.dialog.addChild(that.dialogText);
that.dialogText.textHeight = 138; that.dialogText.textHeight = 138;
that.dialogText.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE; 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.text.length);
console.log("当前文本高度为" + that.dialogText.textHeight); console.log("当前文本高度为" + that.dialogText.textHeight);
that.dialog.alpha = 0; that.dialog.alpha = 0;
...@@ -2700,7 +2708,7 @@ var Cat = (function (_super) { ...@@ -2700,7 +2708,7 @@ var Cat = (function (_super) {
Cat.prototype.showDialog = function (type, msg) { Cat.prototype.showDialog = function (type, msg) {
var that = this; var that = this;
msg = msg.length >= 11 ? msg.substring(0, 11) + '\n' + msg.substring(11) : msg; 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; that.dialogText.text = msg;
FYGE.Tween.removeTweens(that.dialog); FYGE.Tween.removeTweens(that.dialog);
that.dialog.alpha = 0; that.dialog.alpha = 0;
...@@ -48,7 +48,10 @@ export class Cat extends Module { ...@@ -48,7 +48,10 @@ export class Cat extends Module {
actRunning: boolean = false; //动效是否进行中,如果动效进行中,无法进行其他动效 actRunning: boolean = false; //动效是否进行中,如果动效进行中,无法进行其他动效
dialog:FYGE.Sprite; //猫咪对话框气泡 dialog:FYGE.Sprite; //猫咪对话框气泡
dialogText:FYGE.TextField; //猫咪对话框气泡文字内容 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() { initUi() {
this.initEvents(); this.initEvents();
...@@ -129,7 +132,10 @@ export class Cat extends Module { ...@@ -129,7 +132,10 @@ export class Cat extends Module {
/**初始化对话框 */ /**初始化对话框 */
initDialog(){ initDialog(){
var that = this; 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 = Ins.initSprite("624e8c63-963f-4b20-9802-b0fb006fbf93");
that.dialog.position.set(280,526) that.dialog.position.set(280,526)
that.addChild(that.dialog); that.addChild(that.dialog);
...@@ -137,8 +143,10 @@ export class Cat extends Module { ...@@ -137,8 +143,10 @@ export class Cat extends Module {
that.dialogText.textWidth = 280; that.dialogText.textWidth = 280;
that.dialog.addChild(that.dialogText); that.dialog.addChild(that.dialogText);
that.dialogText.textHeight = 138; that.dialogText.textHeight = 138;
that.dialogText.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE that.dialogText.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE;
// that.dialogText.text = "哈哈哈哈哈哈哈,哈哈哈\n哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈"; that.dialogText.fillColor = "#685b4e";
that.dialogText.bold = true;
// that.dialogText.text = "哈哈哈哈哈哈哈,哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈";
console.log("最大长度为"+that.dialogText.text.length) console.log("最大长度为"+that.dialogText.text.length)
console.log("当前文本高度为"+that.dialogText.textHeight); console.log("当前文本高度为"+that.dialogText.textHeight);
// that.dialog.visible = false; // that.dialog.visible = false;
...@@ -157,7 +165,7 @@ export class Cat extends Module { ...@@ -157,7 +165,7 @@ export class Cat extends Module {
showDialog(type,msg:string){ showDialog(type,msg:string){
var that = this; var that = this;
msg = msg.length>=11?msg.substring(0,11)+'\n'+msg.substring(11):msg 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; that.dialogText.text = msg;
FYGE.Tween.removeTweens(that.dialog); FYGE.Tween.removeTweens(that.dialog);
that.dialog.alpha = 0; that.dialog.alpha = 0;
......
...@@ -2606,7 +2606,10 @@ var Cat = (function (_super) { ...@@ -2606,7 +2606,10 @@ var Cat = (function (_super) {
var _this = _super.call(this, data) || this; var _this = _super.call(this, data) || this;
_this.catAnimArr = []; _this.catAnimArr = [];
_this.actRunning = false; _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; _this.catType = data.type;
return _this; return _this;
} }
...@@ -2677,7 +2680,10 @@ var Cat = (function (_super) { ...@@ -2677,7 +2680,10 @@ var Cat = (function (_super) {
}; };
Cat.prototype.initDialog = function () { Cat.prototype.initDialog = function () {
var that = this; 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 = Ins_1.Ins.initSprite("624e8c63-963f-4b20-9802-b0fb006fbf93");
that.dialog.position.set(280, 526); that.dialog.position.set(280, 526);
that.addChild(that.dialog); that.addChild(that.dialog);
...@@ -2686,6 +2692,8 @@ var Cat = (function (_super) { ...@@ -2686,6 +2692,8 @@ var Cat = (function (_super) {
that.dialog.addChild(that.dialogText); that.dialog.addChild(that.dialogText);
that.dialogText.textHeight = 138; that.dialogText.textHeight = 138;
that.dialogText.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE; 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.text.length);
console.log("当前文本高度为" + that.dialogText.textHeight); console.log("当前文本高度为" + that.dialogText.textHeight);
that.dialog.alpha = 0; that.dialog.alpha = 0;
...@@ -2700,7 +2708,7 @@ var Cat = (function (_super) { ...@@ -2700,7 +2708,7 @@ var Cat = (function (_super) {
Cat.prototype.showDialog = function (type, msg) { Cat.prototype.showDialog = function (type, msg) {
var that = this; var that = this;
msg = msg.length >= 11 ? msg.substring(0, 11) + '\n' + msg.substring(11) : msg; 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; that.dialogText.text = msg;
FYGE.Tween.removeTweens(that.dialog); FYGE.Tween.removeTweens(that.dialog);
that.dialog.alpha = 0; that.dialog.alpha = 0;
...@@ -2606,7 +2606,10 @@ var Cat = (function (_super) { ...@@ -2606,7 +2606,10 @@ var Cat = (function (_super) {
var _this = _super.call(this, data) || this; var _this = _super.call(this, data) || this;
_this.catAnimArr = []; _this.catAnimArr = [];
_this.actRunning = false; _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; _this.catType = data.type;
return _this; return _this;
} }
...@@ -2677,7 +2680,10 @@ var Cat = (function (_super) { ...@@ -2677,7 +2680,10 @@ var Cat = (function (_super) {
}; };
Cat.prototype.initDialog = function () { Cat.prototype.initDialog = function () {
var that = this; 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 = Ins_1.Ins.initSprite("624e8c63-963f-4b20-9802-b0fb006fbf93");
that.dialog.position.set(280, 526); that.dialog.position.set(280, 526);
that.addChild(that.dialog); that.addChild(that.dialog);
...@@ -2686,6 +2692,8 @@ var Cat = (function (_super) { ...@@ -2686,6 +2692,8 @@ var Cat = (function (_super) {
that.dialog.addChild(that.dialogText); that.dialog.addChild(that.dialogText);
that.dialogText.textHeight = 138; that.dialogText.textHeight = 138;
that.dialogText.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE; 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.text.length);
console.log("当前文本高度为" + that.dialogText.textHeight); console.log("当前文本高度为" + that.dialogText.textHeight);
that.dialog.alpha = 0; that.dialog.alpha = 0;
...@@ -2700,7 +2708,7 @@ var Cat = (function (_super) { ...@@ -2700,7 +2708,7 @@ var Cat = (function (_super) {
Cat.prototype.showDialog = function (type, msg) { Cat.prototype.showDialog = function (type, msg) {
var that = this; var that = this;
msg = msg.length >= 11 ? msg.substring(0, 11) + '\n' + msg.substring(11) : msg; 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; that.dialogText.text = msg;
FYGE.Tween.removeTweens(that.dialog); FYGE.Tween.removeTweens(that.dialog);
that.dialog.alpha = 0; that.dialog.alpha = 0;
This source diff could not be displayed because it is too large. You can view the blob instead.
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