Commit 38c03c25 authored by Edwise's avatar Edwise 🍷

1234

parent c73bc7cb
......@@ -2,7 +2,7 @@
"success": true,
"message":"",
"data": {
"catType": 2,
"catType": 4,
"userNick": "Edwise",
"energy": 1000,
"happyCoin":1000,
......
......@@ -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;
This diff is collapsed.
......@@ -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;
......@@ -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;
......
......@@ -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;
......@@ -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;
This diff is collapsed.
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