Exemple #1
0
        void InitConfig()
        {
            Debuger.LogWarning("SetMesh...");

            // shape
            RoleShapeConfig.TryGet(m_shapeConfigName, out m_shapeConfig);

            // skin
            m_skinPartConfig = RoleSkinConfig.instance.Get(m_skinConfigName);

            // default
            m_disguisePartConfig = RoleDisguiseConfig.Get(m_career, m_sex, m_faceStyle);
            m_disguiseHandle.InitConfig(m_modelName, m_disguisePartConfig, m_skinPartConfig, m_shapeConfig);
            m_skinMerge = m_disguiseHandle.m_skinHandle;
            m_shapeMgr  = m_disguiseHandle.m_shapeHandle;

            // UI
            m_right.SetCount((int)enAvatar.max);
            m_right.AddSel(OnSelPage);
            for (int i = 0; i < (int)enAvatar.max; ++i)
            {
                m_right.Get <UIAvatarPageItem>(i).text.text = Avatar_Type[i];
            }

            // default select
            m_right.SetSel((int)enAvatar.normal);

            m_btnReset.onClick.RemoveAllListeners();
            m_btnReset.onClick.AddListener(OnReset);
        }
    static int ReadConfig(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        RoleShapeConfig obj = (RoleShapeConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "RoleShapeConfig");

        obj.ReadConfig();
        return(0);
    }
    static int GetConfig(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        RoleShapeConfig obj  = (RoleShapeConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "RoleShapeConfig");
        uint            arg0 = (uint)LuaScriptMgr.GetNumber(L, 2);
        RoleShape       o    = obj.GetConfig(arg0);

        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
    static int _CreateRoleShapeConfig(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            RoleShapeConfig obj = new RoleShapeConfig();
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: RoleShapeConfig.New");
        }

        return(0);
    }
    static int set_configs(IntPtr L)
    {
        object          o   = LuaScriptMgr.GetLuaObject(L, 1);
        RoleShapeConfig obj = (RoleShapeConfig)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name configs");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index configs on a nil value");
            }
        }

        obj.configs = (Dictionary <uint, RoleShape>)LuaScriptMgr.GetNetObject(L, 3, typeof(Dictionary <uint, RoleShape>));
        return(0);
    }
    static int get_configs(IntPtr L)
    {
        object          o   = LuaScriptMgr.GetLuaObject(L, 1);
        RoleShapeConfig obj = (RoleShapeConfig)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name configs");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index configs on a nil value");
            }
        }

        LuaScriptMgr.PushObject(L, obj.configs);
        return(1);
    }
    public void LoadConfig()
    {
        AnnouncementConfigData = new AnnouncementConfig();
        BadgeAttrConfigData    = new BadgeAttrConfig();
        ConstStringConfigData  = new ConstStringConfig();
        CommonConfig           = new CommonConfig();

        AttrNameConfigData        = new AttrNameConfig();
        RoleBaseConfigData2       = new BaseDataConfig2();
        AttrDataConfigData        = new AttrDataConfig();
        TeamLevelConfigData       = new TeamLevelConfig();
        RoleLevelConfigData       = new RoleLevelConfig();
        NPCConfigData             = new NPCDataConfig();
        SkillConfig               = new SkillConfig();
        GoodsConfigData           = new GoodsConfig();
        StoreGoodsConfigData      = new StoreGoodsConfig();
        BaseDataBuyConfigData     = new BaseDataBuyConfig();
        TaskConfigData            = new TaskDataConfig();
        AwardPackConfigData       = new AwardPackDataConfig();
        PractiseConfig            = new PractiseConfig();
        PracticePveConfig         = new PracticePveConfig();
        PractiseStepConfig        = new PractiseStepConfig();
        GameModeConfig            = new GameModeConfig();
        TrainingConfig            = new TrainingConfig();
        TattooConfig              = new TattooConfig();
        EquipmentConfigData       = new EquipmentConfig();
        TourConfig                = new TourConfig();
        GuideConfig               = new GuideConfig();
        FunctionConditionConfig   = new FunctionConditionConfig();
        RoleShapeConfig           = new RoleShapeConfig();
        FashionConfig             = new FashionConfig();
        FashionShopConfig         = new FashionShopConfig();
        VipPrivilegeConfig        = new VipPrivilegeConfig();
        pushConfig                = new PushConfig();
        presentHpConfigData       = new PresentHpConfig();
        LotteryConfig             = new LotteryConfig();
        starAttrConfig            = new StarAttrConfig();
        qualityAttrCorConfig      = new QualityAttrCorConfig();
        skillUpConfig             = new SkillUpConfig();
        RankConfig                = new RankConfig();
        signConfig                = new SignConfig();
        NewComerSignConfig        = new NewComerSignConfig();
        FightingCapacityConfig    = new FightingCapacityConfig();
        BodyInfoListConfig        = new BodyInfoListConfig();
        BadgeSlotsConfig          = new BadgeSlotConfig();
        GoodsComposeNewConfigData = new GoodsComposeNewConfig();

        SceneConfig = new SceneConfig();

        ReboundAttrConfigData    = new ReboundAttrConfig();
        CareerConfigData         = new CareerConfig();
        PotientialEffectConfig   = new PotientialEffectConfig();
        PVPPointConfig           = new PVPPointConfig();
        WinningStreakAwardConfig = new WinningStreakAwardConfig();
        ArticleStrengthConfig    = new ArticleStrengthConfig();
        PhRegainConfig           = new PhRegainConfig();
        MatchAchievementConfig   = new MatchAchievementConfig();
        SpecialActionConfig      = new SpecialActionConfig();
        StealConfig           = new StealConfig();
        CurveRateConfig       = new CurveRateConfig();
        DunkRateConfig        = new DunkRateConfig();
        AIConfig              = new AIConfig();
        AttrReduceConfig      = new AttrReduceConfig();
        qualifyingConfig      = new QualifyingConfig();
        qualifyingNewConfig   = new QualifyingNewConfig();
        qualifyingNewerConfig = new QualifyingNewerConfig();
        bullFightConfig       = new BullFightConfig();
        HedgingConfig         = new HedgingConfig();
        roleGiftConfig        = new RoleGiftConfig();
        DebugConfig           = new DebugConfig();
        shootGameConfig       = new ShootGameConfig();
        MapConfig             = new MapConfig();
        activityConfig        = new ActivityConfig();
        trialConfig           = new TrialConfig();
        gameMatchConfig       = new GameMatchConfig();
        shootSolutionManager  = new ShootSolutionManager();
        talentConfig          = new TalentConfig();
        ladderConfig          = new LadderConfig();
        matchSoundConfig      = new MatchSoundConfig();
        matchMsgConfig        = new MatchMsgConfig();
        MatchPointsConfig     = new MatchPointsConfig();
        AnimationSampleManager.Instance.LoadXml();
    }