import FireEventObserver from '../framework/FireEventObserver';
import ViewManager from '../ui/ViewManager';

cc.Class({
    extends: FireEventObserver,

    properties: {
    },

    onLoad()
    {
        // this.node.active = false
        this.node.children.forEach(element => {
            element.active = false
        });
    },

    setTipsMode(sender,mode)
    {
        this.node.children.forEach(element => {
            element.active = false
        });
        var showingNode = this.node.getChildByName(mode)
        if (showingNode) {
            showingNode.active = true
        }
    },

    closeTipsLayer(){
        ViewManager.PopView()
    },

    Signout(){
        cc.director.loadScene('start');
    },

    CilickSwitch(sender){
        sender.target.children.forEach(element => {
            element.active = !element.active
        });
    }
});


