
cc.Class({
    extends: cc.Component,

    properties: {
        m_bullet:cc.Prefab,
        m_button:cc.Node
    },

   ctor(){
    this.array = new Array();
    this.bulletList = new Array();
   },

    start () {

    },


       /**
     * 创建子弹预制体
     */
    createBulletNode() {
        let enemy = null;
        enemy = cc.instantiate(this.m_bullet);
        enemy.parent = this.node;
        return enemy;
    },



    shotBullet(){
        var bulletNode = this.createBulletNode();
        var beginPos = this.m_button.getPosition();//起始位置
        bulletNode.setPosition(beginPos);
        //接下来的逻辑在bullet.js里
    },

    // update (dt) {},
});
