Commit 87ff3e99 authored by linzhiguo's avatar linzhiguo

# 选项图片添加到分组中恢复原大

parent 769ca353
...@@ -106,24 +106,28 @@ cc.Class({ ...@@ -106,24 +106,28 @@ cc.Class({
this.show_node.active = true; this.show_node.active = true;
this.playAnimation(()=>{ this.playAnimation(()=>{
this.show_node.removeAllChildren(); this.show_node.removeAllChildren();
let node = cc.instantiate(ot); let node = cc.instantiate(cc.find('res/option_item'));
let option = node.getComponent(cc.js.getClassByName('WordOption')); let option = node.getComponent(cc.js.getClassByName('WordOption'));
option.copyValues(item);
option.pic.width = item.pic.width; option.pic.width = item.pic.width;
option.pic.height = item.pic.height; option.pic.height = item.pic.height;
this.layout.node.addChild(node); this.layout.node.addChild(node);
option.adjustPicSize(); option.adjustPicSize();
option.finished(); option.finished();
node.width/=3; let sr = 2/3;
node.height/=3; node.width*=sr;
node.opacity = 0; node.height*=sr;
cc.tween(node) node.scale *= sr;
.to(0.5, {opacity:255}) // node.opacity = 0;
.call(()=>{ option.adjustPicSize();
option.adjustPicSize(); // cc.tween(node)
console.log(option); // .to(0.5, {opacity:255})
cb && cb(); // .call(()=>{
}) // option.adjustPicSize();
.start(); // console.log(option);
// cb && cb();
// })
// .start();
this.show_node.active = false; this.show_node.active = false;
this.animate_node.active = false; this.animate_node.active = false;
}); });
......
...@@ -117,12 +117,14 @@ cc.Class({ ...@@ -117,12 +117,14 @@ cc.Class({
}, },
finished(){ finished(){
this.word_finish.active = false;
this.pic_finish.active = false;
this.pic_node.getComponent(cc.Sprite).enabled = false;
this.word_node.getComponent(cc.Sprite).enabled = false;
if (this._type == 0){ if (this._type == 0){
this.pic_node.getComponent(cc.Sprite).enabled = false;
this.pic_finish.active = true; this.pic_finish.active = true;
} }
else{ else{
this.word_node.getComponent(cc.Sprite).enabled = false;
this.word_finish.active = true; this.word_finish.active = true;
} }
} }
......
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