import FireEventObserver from '../framework/FireEventObserver';
import SubHallManger from '../view/subHallManger'

cc.Class({
    extends: SubHallManger,

    properties: {
        gamesNode:cc.Node,
        subgamesNode:cc.Node,
    },

    onLoad()
    {
        // var subcp= [['1' , []],
        //     ['2' , [19,20,32]],
        //     ['3' , [5,6,11,14,17,22,27,29]],
        //     ['4' , [2,8,12,16,18]],
        //     ['5' , [3,10,13,25,26,28,30,31]],
        //     ['7' , [1,7,23,24]],
        //     ['9' , [4,9,15,21]]]

        var subcp= [['1' , []],
            ['2' , [10,11,12]],
            ['3' , [28,29,30,31,32,33,34,35]],
            ['4' , [5,6,7,8,9]],
            ['5' , [19,20,21,22,23,24,25,26,27]],
            ['9' , [13,14,15,16,17,18]],
            ['11' , [1,2,3,4]]]

        this.myMap = new Map(subcp);
        console.log(this.myMap.keys());
    },
    
    ClickGamesBtn(sender,customEventData)
    {
        var showingHall = this.subgamesNode.getComponent('CaiPiaosubHallController')
        var needgames = this.myMap.get(customEventData)
        showingHall.plane = this.subgamesNode.getChildByName("nameplane"+customEventData)
        showingHall.showNeedGames(needgames)
        showingHall.parentScene = this
        this.playEnd(showingHall)
    },
});


