Commit 87ff3e99 authored by linzhiguo's avatar linzhiguo

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

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