修改邀请tip的显示

This commit is contained in:
zhl 2019-02-26 13:28:28 +08:00
parent d7246ec672
commit 5e5da2a214
4 changed files with 51 additions and 1 deletions

View File

@ -25,10 +25,13 @@
"_components": [
{
"__id__": 5
},
{
"__id__": 6
}
],
"_prefab": {
"__id__": 6
"__id__": 7
},
"_opacity": 255,
"_color": {
@ -202,6 +205,19 @@
"_atlas": null,
"_id": ""
},
{
"__type__": "754dd8JsnNGwoGLjRjfrLBY",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"txtLabel": {
"__id__": 3
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {

View File

@ -0,0 +1,24 @@
cc.Class({
extends: cc.Component,
properties: {
txtLabel: {
default: null,
type: cc.Label
}
},
// LIFE-CYCLE CALLBACKS:
onLoad () {
},
start () {
},
// update (dt) {},
setLabelTxt(str) {
this.txtLabel.string = str;
}
});

View File

@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "754ddf09-b273-46c2-818b-8d18dfacb058",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -75,6 +75,7 @@ cc.Class({
this.part2.addChild(puzzle);
var tip = cc.instantiate(this.tipPrefab);
this.part2.addChild(tip);
tip.getComponent('inviteTip').setLabelTxt('xx接受了您的邀请');
var imageSwiper = cc.instantiate(this.imageSwiperPrefab);
this.part4.addChild(imageSwiper, 0);
var bottomSwiper = cc.instantiate(this.bottomSwiperPrefab);