cc.Class({
    extends: cc.Component,

    properties: {
        GameCourse: {
            default: null,
            type: cc.Node,
            serializable: true,
        },
        GameEvent: {
            default: null,
            type: cc.Node,
            serializable: true,
        },
        GameShop: {
            default: null,
            type: cc.Node,
            serializable: true,
        },
        GameRanking: {
            default: null,
            type: cc.Node,
            serializable: true,
        },
    },
    OnCourseOpen(event, customEventData)
    {
        this.GameCourse.active = true;
        this.GameCourse.getComponent('GameCourse').OnActive();
    },
    OnCourseClose(event, customEventData)
    {
        this.GameCourse.active = false;
    },
    OnEventOpen(event, customEventData)
    {
        this.GameEvent.active = true;
        this.GameEvent.getComponent('GameEvent').OnActive();
    },
    OnEventClose(event, customEventData)
    {
        this.GameEvent.active = false;
    },
    OnShopOpen(event, customEventData)
    {
        this.GameShop.active = true;
        this.GameShop.getComponent('GameShop').OnActive();
    },
    OnShopClose(event, customEventData)
    {
        this.GameShop.active = false;
    },
    OnRankingOpen(event, customEventData)
    {
        this.GameRanking.active = true;
        this.GameRanking.getComponent('GameRanking').OnActive();
    },
    OnRankingClose(event, customEventData)
    {
        this.GameRanking.active = false;
    },
});
