diff --git a/assets/resources/prefabs/tip.prefab b/assets/resources/prefabs/tip.prefab index 52f847a..2ac15cf 100644 --- a/assets/resources/prefabs/tip.prefab +++ b/assets/resources/prefabs/tip.prefab @@ -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": { diff --git a/assets/scripts/inviteTip.js b/assets/scripts/inviteTip.js new file mode 100644 index 0000000..1e8caba --- /dev/null +++ b/assets/scripts/inviteTip.js @@ -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; + } +}); diff --git a/assets/scripts/inviteTip.js.meta b/assets/scripts/inviteTip.js.meta new file mode 100644 index 0000000..ca220ad --- /dev/null +++ b/assets/scripts/inviteTip.js.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.0.5", + "uuid": "754ddf09-b273-46c2-818b-8d18dfacb058", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/scripts/scrollContent.js b/assets/scripts/scrollContent.js index bcf21f2..ac6539d 100644 --- a/assets/scripts/scrollContent.js +++ b/assets/scripts/scrollContent.js @@ -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);