import { UserData } from "../game/data/udata/Player";

/**
 * 管理员从后台登陆
 */
const {ccclass, property} = cc._decorator;

@ccclass
export default class AdminLogin extends cc.Component {

    @property(cc.EditBox)
    mId: cc.EditBox = null;

    @property(cc.EditBox)
    mToken: cc.EditBox = null;

    public static userData:UserData;

    public onclick(){
        AdminLogin.userData = {
            id:parseInt(this.mId.string),
            token:this.mToken.string,
            zone:null
        }
        cc.director.loadScene('main');
    }
}
