import { _decorator, Component, Node, Tween, tween, Vec3 } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('out_ani')
export class out_ani extends Component {
    @property(Node) img_pass:Node = null;
    @property(Node) img_yao_bu_qi:Node = null;
    protected start(): void {
        if(this.img_pass!=null){
            this.img_pass.active = false;
        }
        if(this.img_yao_bu_qi!=null){
            this.img_yao_bu_qi.active = false;
        }
        
    }
    public showPass(){
        if(this.img_pass!=null){
            this.img_pass.active = true;
            Tween.stopAllByTarget(this.img_pass)
            tween(this.img_pass).show().to(0.25,{scale:new Vec3(0.5,0.5,0.5)}).to(0.25,{scale:new Vec3(0.3,0.3,0.3)}).delay(0.25).hide().start()
        }
    }
    public showyaoBuQi(){
        if(this.img_yao_bu_qi!=null){
            this.img_yao_bu_qi.active = true;
            Tween.stopAllByTarget(this.img_yao_bu_qi)
            tween(this.img_yao_bu_qi).show().to(0.25,{scale:new Vec3(0.5,0.5,0.5)}).to(0.25,{scale:new Vec3(0.3,0.3,0.3)}).delay(0.25).hide().start()
        }
    }
}


