import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('config')
export class config  {
    static debug = true
    static gameName = "开局自行车";
    static websocket_domain = config.debug?'wss://snakews.xwrun.com':"wss://snakews.hainanmlwl.com" 
    public static Platform_id = {
        browser: "browser",
        tt: "douyin",
        wx: "wx",
        ks: "ks",
    }

    public static API = {
        login : "/snake/user/login",
        info : "/snake/user/info",
        get_dyopen_id : "/snake/user/get_dyopen_id",
        get_wxopen_id : "/snake/user/get_wxopen_id",
        get_ksopen_id : "/snake/user/get_ksopen_id",
        sync_integral : "/snake/user/sync_integral",
        user_ranking : "/snake/user/user_ranking",
        user_car_list : "/snake/user/user_car_list",
        user_set_region: "/snake/user/set_region",
        user_set_default_car_id: "/snake/user/set_default_car_id",
        user_update_photo_frame_img: "/snake/user/update_photo_frame_img",
        user_quarter_rank: "/snake/user/quarter_rank",
        user_quarter_ranking: "/snake/user/quarter_ranking",
        unlock_number_status: "/snake/user/unlock_number_status",
        feedback: "/snake/user/feedback",
        up_feedback_img: "/tool/file/up_feedback_img",
        sync_free_number: "/snake/user/sync_free_number",  
        msg: "/snakestatic/msg.json",
        rankings: (region_id)=>{
            return `/snakestatic/rankings/${region_id}.json`
        },
        mail_lists: "/snake/mail/lists",
        mail_retrieve: "/snake/mail/retrieve",
        mail_del: "/snake/mail/del",
        bag_type_list: "/snake/user/bag_type_list",
        bag_list: "/snake/user/bag_list",
        exchange_car: "/snake/user/exchange_car",
        sign_list:"/snake/user/sign_list",              //签到列表
        user_sign:"/snake/user/sign",                   //用户签到
        user_total_receive:"/snake/user/total_receive", //用户累计签到领取
        user_red_dot:"/snake/user/red_dot",
        user_up_red_dot:"/snake/user/up_red_dot",
    }
    public static STATIC_API = {
        sysconfig : "/snakestatic/sysconfig.json",
        levels : "/snakestatic/levels.json",
        regions : "/snakestatic/regions.json",
        car_list : "/snakestatic/car_list.json",
        bulletin : "/snakestatic/bulletin.json",  //公告
    }

    public static status = {
        SUCCESS:10000
    }

    public static item_type = {
        box_blue:1,
        box_zise:2,
        box_yellow:3,
        box_green:4,
        box_red:5,
        wall:6,
        coin:7,
        scores:8,
        box_fenhong:9,
        box_huanglv:10,
        box_qing:11,
        box_zi:12,
        box_huang:13,
    }

    public static buff_type = {
        dun:1, //盾无敌时间
        xing:2, //获取积分翻倍
        xi:3 //吸收周边的积分
    }

    public static collider_dir = {
        top:1,
        left:2,
        right:3
    }

    public static PREFAB={
        game:"prefabs/game"
    }

    public static AUDIO={
        // loading_bgm:"bgm/loading_bgm",
        home_bgm:"audio/ad_bgm_home", //主页音效
        game_bgm:"audio/ad_bgm_game", //游戏音效
        btn:"audio/ad_btn",//按钮
        car_jia_su:"audio/ad_car_jia_su",//汽车加速
        car_qi_dong:"audio/ad_car_qi_dong", //汽车启动
        car_sha_che:"audio/ad_car_sha_che",//汽车刹车
        buff_xi:"audio/ad_ci_tie", //buff 吸
        buff_dun:"audio/ad_dun",//buff 盾
        buff_xing:"audio/ad_xing",//buff 星
        win:"audio/ad_win", //失败1
        qiyou:"audio/ad_qi_you",//汽油
        peng_zhuang:"audio/ad_peng_zhuang",//碰撞
        zi_xing_che_qi_bu:"audio/ad_zi_xing_che_qi_bu",
        zi_xing_che_sha_che:"audio/ad_zi_xing_che_sha_che",
    }

    public static UI = {
        ui_setting:"ui/setting",
        ui_announcement:"ui/announcement",
        ui_gameplay_view:"ui/gameplay_view",
        ui_select_area:"ui/select_area",
        ui_unLock_view:"ui/unLock_view",
        ui_user_info_view:"ui/user_info_view",
        ui_tips_view:"ui/tips_view",
        ui_feedback:"ui/feedback",
        ui_restart_view:"ui/restart_view",
        ui_car_info:"ui/car_info",
        ui_mailbox:"ui/mailbox",
        ui_sign_view:"ui/sign_view",
        ui_exchange_car_view:"ui/exchange_car_view",
        ui_bag_avatar_preview:"ui/bag_avatar_preview",
        ui_quarter_rank_view:"ui/quarter_rank_view",
        ui_reward_tips_view:"ui/reward_tips_view",
        loading_view:"ui/loading_view",
        home:"ui/home",
        rank:"ui/rank",
        car_lib: "ui/car_lib",
        bag: "ui/bag",
    }

    public static SHOW_BUFF_STATUS = {
        DUN:0,
        XING:1,
        XI:2
    }

    public static MSG_TYPE = {
        guangbo:1,       //广播
        announcement:2,  //公告
        mail:3,          //邮件
    }

    public static UI_EVENT ={
        GAME_OVER_SETTLE_ACCOUNT:"game_over_settle_account",
        GET_NEW_CAR:"get_new_car",
        UPDATE_USER_DEFAULT_CAR:"update_user_default_car",
        UPDATE_USER_INFO:"update_user_info",
        UPDATE_SIGN_RED_DOT_STATUS:"update_sign_red_dot_status",
        UPDATE_MAIL_RED_DOT_STATUS:"update_mail_red_dot_status",
        UPDATE_ANNOUNCEMENT_RED_DOT_STATUS:"update_announcement_red_dot_status",
    }
    
    public static EVENT_TYPE = {
        MSG_DATA:"msg_data",
    }

    public static LOCAL_STORAGE = {
        SETTING_DATA: "SETTING_DATA",
        USER_FREE_ADS_DATA: 'USER_FREE_ADS_DATA'
    }

    public static ADS_TYPE = {
        UNKNOWN:"UNKNOWN",
        GAME_INFINITE_DEGREE_VIDEO:"GAME_INFINITE_DEGREE_VIDEO",
        GAME_RELIFE_VIDEO:"GAME_RELIFE_VIDEO",
        GAME_RESTART:"GAME_RESTART",
        GAME_SIGN_DOUBLE:"GAME_SIGN_DOUBLE",
        GAME_SIGN_BUQIAN:"GAME_SIGN_BUQIAN",
    }
    public static TT_CONFIG = {
        SHARE_RELIFE_TITLE:"分享游戏获得复活",                 //分享复活标题
        SHARE_RECORD_VIDEO_ID:"15nc5nd2apoh170on0",         //分享录制视频ID
        ADS_ID_INFINITE_DEGREE_VIDEO:"c7lih7for4j2vjmllv",  //无限次数
        ADS_ID_RELIFE_VIDEO:"129f13tkcgi1k9i38h",           //游戏看视频复活
        ADS_ID_RESTART:"50u85j05scv25idia2",                //在玩一局
        ADS_ID_SIGN_DOUBLE:"1in5bgcgg9np642ak6",            //签到双倍
        ADS_ID_SIGN_BUQIAN:"ct7255k7es1w97svm4",            //签到补签
    }
    public static WX_CONFIG = {
        SHARE_RELIFE_TITLE:"",            //分享复活标题
        ADS_ID_INFINITE_DEGREE_VIDEO:"",  //无限次数
        ADS_ID_RELIFE_VIDEO:"",           //游戏看视频复活
        ADS_ID_RESTART:"",                //在玩一局
        ADS_ID_SIGN_DOUBLE:"",            //签到双倍
        ADS_ID_SIGN_BUQIAN:"",            //签到补签
    }
    public static KS_CONFIG = {
        SHARE_RELIFE_TITLE:"",            //分享复活标题
        ADS_ID_INFINITE_DEGREE_VIDEO:"",  //无限次数
        ADS_ID_RELIFE_VIDEO:"",           //游戏看视频复活
        ADS_ID_RESTART:"",                //在玩一局
        ADS_ID_SIGN_DOUBLE:"",            //签到双倍
        ADS_ID_SIGN_BUQIAN:"",            //签到补签
    }

    public static USER_TT_SIDEBAR_REWARD = {
        GET: 0,       //获取
        SYNC: 1,      //同步
    }

    public static RED_DOT_TYPE = {
        announcement:1,   //公告
    }
}


