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

@ccclass('boom_item')
export class boom_item extends Component {
    public init(){
        this.node.active = false
    }

    public show(box_p:Vec3){
        this.node.active = true
        this.node.position = new Vec3(box_p.x,box_p.y)
        this.node.getComponent(Animation).play()
    }

    public IsCanUse(){
        return !this.node.getComponent(Animation).getState("box_boom").isPlaying
    }
}


