
cc.Class({
    extends: cc.Component,

    properties: {

        HammerPrefab: {
            default: null,
            type: cc.Prefab,
        },

        SpawnPoint: {
            default: null,
            type: cc.Node,
        },



    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    // start() {


    // },

    onCreateHammer() {
        let highwayTemp = cc.instantiate(this.HammerPrefab);

        let tempPos = this.SpawnPoint.convertToNodeSpace(GlobalD.game.MainCamera.node);

        let CanvasPos = GlobalD.game.Canvas.position;

        highwayTemp.setPosition(tempPos.x + CanvasPos.x, tempPos.y + CanvasPos.y);
        highwayTemp.parent = this.SpawnPoint;

        // cc.log('onButtonEvent_Building_Close');
        //收起菜单
        GlobalD.game._ManageUIScript.onButtonEvent_Building_Close();
        // //收起菜单
        // GlobalD.game._ManageUIScript.onHideMenu();

    },

});
