Esempio n. 1
0
    protected override void Init_Model()
    {
        //AssetbundleLoader.AssetLoad( AssetbundleLoader.CreateSuffixForPlatform( resInfo.modelFile ), OnLoadedModelGO );

        //추후 어셋번들에서 읽어오게 수정
        //MobTableLowData.MobInfo mosterInfo = _LowDataMgr.instance.GetMonsterInfo(npcInfo.Id);

        GameObject _unit = UnitModelHelper.NPCModelLoad(npcInfo.Id, QualityManager.instance.GetModelQuality());


        CharInfo.animDatas = _LowDataMgr.instance.AniInfoSetting(npcInfo.prefab,
                                                                 _unit,
                                                                 npcInfo.AniId);   //_LowDataMgr.instance.GetUnitAniInfo(mosterInfo.AniId);

        if (CharInfo.animDatas != null)
        {
            CharInfo.MaxAnimCombo = UnitDataFactory.CountingMaxAnimCombo(CharInfo.animDatas);
        }
        else
        {
            Debug.LogError(string.Format("NotFound AniData MonsterID:{0}", npcInfo.Id));
        }

        OnLoadedModelGO(_unit);
        NGUITools.SetLayer(gameObject, 14);

        SetShaderEnvironment();
    }
Esempio n. 2
0
    protected override void Init_Model()
    {
        //AssetbundleLoader.AssetLoad( AssetbundleLoader.CreateSuffixForPlatform( resInfo.modelFile ), OnLoadedModelGO );

        //추후 다 어셋번들에서 읽어오게 해야함
        GameObject _unit = null;

        if (syncData._isPartner)
        {
            Partner.PartnerDataInfo partner = _LowDataMgr.instance.GetPartnerInfo(syncData._partnerID);
            _unit = UnitModelHelper.PartnerModelLoad(syncData._partnerID,
                                                     ref WeaponEffects,
                                                     true,
                                                     partner.RightWeaDummy,
                                                     partner.LeftWeaDummy, QualityManager.instance.GetModelQuality());

            CharInfo.animDatas = _LowDataMgr.instance.AniInfoSetting(partner.prefab,
                                                                     _unit,
                                                                     partner.AniId);
        }
        else
        {
            _unit = UnitModelHelper.PCModelLoad(syncData._charIdx,
                                                syncData._HeadItem,
                                                syncData._CostumeItem,
                                                syncData._ClothItem,
                                                syncData._WeaponItem,
                                                syncData._HideCostume,
                                                ref WeaponEffects, QualityManager.instance.GetModelQuality());


            //무조건 플레이어의 애니메이션 ID는 코스튬에서 읽어와야한다
            CharInfo.animDatas = _LowDataMgr.instance.AniInfoSetting(_LowDataMgr.instance.GetLowDataSkillSet(syncData._SkillSetId).AniPath,//_LowDataMgr.instance.GetLowDataCostumeInfo(syncData._CostumeItem).Bodyprefab,
                                                                     _unit,
                                                                     _LowDataMgr.instance.GetLowDataSkillSet(syncData._SkillSetId).AniId);
            //_LowDataMgr.instance.GetLowDataCostumeInfo(syncData._CostumeItem).AniId);
        }



        CharInfo.MaxAnimCombo = UnitDataFactory.CountingMaxAnimCombo(CharInfo.animDatas);

        OnLoadedModelGO(_unit);
        NGUITools.SetLayer(gameObject, 14);

        SetShaderEnvironment();
    }