| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, November 23, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class GodWeaponEffectConfig : ConfigBase { |
| | | |
| | | public int id { get ; private set ; } |
| | | public int type { get ; private set ; } |
| | | public int level { get ; private set ; } |
| | | public string effect { get ; private set; } |
| | | |
| | | public override string getKey() |
| | | { |
| | | return id.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | try |
| | | { |
| | | id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | type=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | |
| | | level=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | |
| | | effect = rawContents[3].Trim(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c7a22e75f9a0eed49aed26e8171f8172 |
| | | timeCreated: 1542943278 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | namespace TableConfig |
| | | { |
| | | public partial class GodWeaponEffectConfig : ConfigBase, IConfigPostProcess |
| | | { |
| | | static Dictionary<int, Dictionary<int, GodWeaponEffectConfig>> configs = new Dictionary<int, Dictionary<int, GodWeaponEffectConfig>>(); |
| | | |
| | | public void OnConfigParseCompleted() |
| | | { |
| | | if (!configs.ContainsKey(this.type)) |
| | | { |
| | | configs[this.type] = new Dictionary<int, GodWeaponEffectConfig>(); |
| | | } |
| | | |
| | | configs[this.type][this.level] = this; |
| | | } |
| | | |
| | | public static GodWeaponEffectConfig Get(int type, int level) |
| | | { |
| | | if (!configs.ContainsKey(type)) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | GodWeaponEffectConfig config = null; |
| | | foreach (var item in configs[type].Values) |
| | | { |
| | | if (item.level < level && item.level > config.level) |
| | | { |
| | | config = item; |
| | | } |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a15f3ba53c933684bb29eb0ed88403e7 |
| | | timeCreated: 1542943314 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | npcContent.text = m_DialogConfig.content;
|
| | |
|
| | | var npcConfig = Config.Instance.Get<NPCConfig>(m_DialogConfig.npcId);
|
| | | var data = new UI3DModelExhibition.UI3DNPCExhibitionData()
|
| | | var data = new UI3DNPCExhibitionData()
|
| | | {
|
| | | npcId = m_DialogConfig.npcId,
|
| | | isDialogue = true,
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a545fb3dcf719304fa74180c10219375 |
| | | folderAsset: yes |
| | | timeCreated: 1542357825 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0c4f170a0e60c1f4d8390712889c2037 |
| | | timeCreated: 1542892688 |
| | | timeCreated: 1542942273 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ca5a3371c10a33f499a5765438d0cbee |
| | | timeCreated: 1542892702 |
| | | timeCreated: 1542942273 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 854a6ebd3b9a10944a697b7d97dcaba9 |
| | | timeCreated: 1542892697 |
| | | timeCreated: 1542942273 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | |
| | | { |
| | | UnityEngine.UI.RawImage __rawImage = (UnityEngine.UI.RawImage)translator.GetObject(L, 2, typeof(UnityEngine.UI.RawImage)); |
| | | Snxxz.UI.UI3DModelExhibition.UI3DPlayerExhibitionData _data;translator.Get(L, 3, out _data); |
| | | Snxxz.UI.UI3DPlayerExhibitionData _data;translator.Get(L, 3, out _data); |
| | | |
| | | gen_to_be_invoked.ShowOtherPlayer( __rawImage, _data ); |
| | | |
| | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 3&& translator.Assignable<UnityEngine.UI.RawImage>(L, 2)&& translator.Assignable<Snxxz.UI.UI3DModelExhibition.UI3DNPCExhibitionData>(L, 3)) |
| | | if(gen_param_count == 3&& translator.Assignable<UnityEngine.UI.RawImage>(L, 2)&& translator.Assignable<Snxxz.UI.UI3DNPCExhibitionData>(L, 3)) |
| | | { |
| | | UnityEngine.UI.RawImage _rawImage = (UnityEngine.UI.RawImage)translator.GetObject(L, 2, typeof(UnityEngine.UI.RawImage)); |
| | | Snxxz.UI.UI3DModelExhibition.UI3DNPCExhibitionData _data;translator.Get(L, 3, out _data); |
| | | Snxxz.UI.UI3DNPCExhibitionData _data;translator.Get(L, 3, out _data); |
| | | |
| | | gen_to_be_invoked.ShowNPC( _rawImage, _data ); |
| | | |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 12598597a652e2b42b113679a5bf4bf4 |
| | | timeCreated: 1542892689 |
| | | timeCreated: 1542942273 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 8babb5fb6c492df4199b8f2698b16386 |
| | | timeCreated: 1542892698 |
| | | timeCreated: 1542942273 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | weapon2 = itemData.ItemID;
|
| | | }
|
| | |
|
| | | var data = new UI3DModelExhibition.UI3DPlayerExhibitionData
|
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = _leaderData.rolePropData.Job,
|
| | | clothesId = clothes,
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | var model = playerModel.Show(PlayerDatas.Instance.loginInfo.Job, clothesItemId, _suitLevel, weaponItemId, wingsItemId, secondaryItemId, m_HeroPlatform.transform);
|
| | | var data = new UI3DPlayerExhibitionData()
|
| | | {
|
| | | job = PlayerDatas.Instance.loginInfo.Job,
|
| | | clothesId = clothesItemId,
|
| | | suitLevel = _suitLevel,
|
| | | weaponId = weaponItemId,
|
| | | wingsId = wingsItemId,
|
| | | secondaryId = secondaryItemId,
|
| | | };
|
| | |
|
| | | var model = playerModel.Show(data, m_HeroPlatform.transform);
|
| | | m_Shadow.Cast(model.transform);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | string npcIcon = configStoryMissions.NpcIcon[IsMultistage];
|
| | |
|
| | | var data = new UI3DModelExhibition.UI3DNPCExhibitionData()
|
| | | var data = new UI3DNPCExhibitionData()
|
| | | {
|
| | | npcId = npcId,
|
| | | isDialogue = true,
|
| | |
| | | weapon2 = itemData.ItemID;
|
| | | }
|
| | |
|
| | | var data = new UI3DModelExhibition.UI3DPlayerExhibitionData {
|
| | | var data = new UI3DPlayerExhibitionData {
|
| | | job = viewPlayerData.rolePropData.Job,
|
| | | clothesId = clothes,
|
| | | suitLevel = _suitLevel,
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | var _hero = m_HeroShow.Show(_job, _clothesId, _suitLevel, _weaponId, _wingsId, _secondaryId, m_Stage);
|
| | | UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
|
| | | {
|
| | | job=_job,
|
| | | clothesId = _clothesId,
|
| | | suitLevel=_suitLevel,
|
| | | weaponId = _weaponId,
|
| | | wingsId=_wingsId,
|
| | | secondaryId=_secondaryId,
|
| | | };
|
| | |
|
| | | var _hero = m_HeroShow.Show(data, m_Stage);
|
| | | if (_hero != null)
|
| | | {
|
| | | m_HeroPoint = _hero.transform;
|
| | |
| | | [SerializeField] UI3DModelInteractProcessor m_InteractProcessor;
|
| | | [SerializeField] ColorCorrectionCurves m_CameraColor;
|
| | |
|
| | | public bool interactable
|
| | | {
|
| | | public bool interactable {
|
| | | get { return m_Interactable; }
|
| | | set { m_Interactable = value; }
|
| | | }
|
| | |
| | |
|
| | | int m_HorseModelId = 0;
|
| | | GameObject horseModel = null;
|
| | | public GameObject NpcModelHorse
|
| | | {
|
| | | public GameObject NpcModelHorse {
|
| | | get { return horseModel; }
|
| | | set { horseModel = value; }
|
| | | }
|
| | |
| | | int m_NPCId = 0;
|
| | | GameObject npcModel = null;
|
| | | SFXController m_NpcEffect;
|
| | | public GameObject NpcModelPet
|
| | | {
|
| | | public GameObject NpcModelPet {
|
| | | get { return npcModel; }
|
| | | set { npcModel = value; }
|
| | | }
|
| | |
| | | public static UI3DModelExhibition Instance { get; private set; }
|
| | |
|
| | | static UI3DModelExhibition m_InstanceClone1 = null;
|
| | | public static UI3DModelExhibition InstanceClone1
|
| | | {
|
| | | get
|
| | | {
|
| | | public static UI3DModelExhibition InstanceClone1 {
|
| | | get {
|
| | | if (m_InstanceClone1 == null)
|
| | | {
|
| | | CreateCloneStage();
|
| | |
| | | wingsId = wingsItemId,
|
| | | secondaryId = secondaryItemId,
|
| | | isDialogue = false,
|
| | | godWeapons = new Dictionary<int, int>() {
|
| | | { 1, (int)PlayerDatas.Instance.loginInfo.ExAttr15 },
|
| | | { 2, (int)PlayerDatas.Instance.loginInfo.ExAttr16},
|
| | | { 3, (int)PlayerDatas.Instance.loginInfo.ExAttr17 },
|
| | | { 4, (int)PlayerDatas.Instance.loginInfo.ExAttr18 } }
|
| | | };
|
| | |
|
| | | ShowPlayer(_rawImage, data);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | var magicianModel = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | var godWeapon1 = magicianModel.GetGodWeaponInfo(1);
|
| | | var godWeapon2 = magicianModel.GetGodWeaponInfo(2);
|
| | | var godWeapon3 = magicianModel.GetGodWeaponInfo(3);
|
| | | var godWeapon4 = magicianModel.GetGodWeaponInfo(4);
|
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = _job,
|
| | |
| | | wingsId = wingsId,
|
| | | secondaryId = secondaryId,
|
| | | isDialogue = _isDialogue,
|
| | | godWeapons = new Dictionary<int, int>() {
|
| | | { 1, godWeapon1==null?0:godWeapon1.level },
|
| | | { 2, godWeapon2==null?0:godWeapon2.level },
|
| | | { 3, godWeapon3==null?0:godWeapon3.level },
|
| | | { 4, godWeapon4==null?0:godWeapon4.level }
|
| | | }
|
| | | };
|
| | |
|
| | | ShowPlayer(_rawImage, data);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | var magicianModel = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | var godWeapon1 = magicianModel.GetGodWeaponInfo(1);
|
| | | var godWeapon2 = magicianModel.GetGodWeaponInfo(2);
|
| | | var godWeapon3 = magicianModel.GetGodWeaponInfo(3);
|
| | | var godWeapon4 = magicianModel.GetGodWeaponInfo(4);
|
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = _job,
|
| | |
| | | wingsId = wingsId,
|
| | | secondaryId = secondaryId,
|
| | | isDialogue = false,
|
| | | godWeapons = new Dictionary<int, int>() {
|
| | | { 1, godWeapon1==null?0:godWeapon1.level },
|
| | | { 2, godWeapon2==null?0:godWeapon2.level },
|
| | | { 3, godWeapon3==null?0:godWeapon3.level },
|
| | | { 4, godWeapon4==null?0:godWeapon4.level }
|
| | | }
|
| | | };
|
| | |
|
| | | ShowPlayer(_rawImage, data);
|
| | |
| | | {
|
| | | StopShow();
|
| | |
|
| | | var job = data.job;
|
| | | var clothesId = data.clothesId;
|
| | | var suitLevel = data.suitLevel;
|
| | | var weaponId = data.weaponId;
|
| | | var wingsId = data.wingsId;
|
| | | var secondaryId = data.secondaryId;
|
| | | var isDialogue = data.isDialogue;
|
| | |
|
| | | var instance = playerModel.Show(job, clothesId, suitLevel, weaponId, wingsId, secondaryId, isDialogue ? m_DialogPoint : m_PlayerShowPoint);
|
| | |
|
| | | var instance = playerModel.Show(data, isDialogue ? m_DialogPoint : m_PlayerShowPoint);
|
| | | interactable = !isDialogue;
|
| | | m_PlayerShowPoint.localEulerAngles = Vector3.zero;
|
| | |
|
| | |
| | | {
|
| | | StopShow();
|
| | |
|
| | | var job = data.job;
|
| | | var clothesId = data.clothesId;
|
| | | var suitLevel = data.suitLevel;
|
| | | var weaponId = data.weaponId;
|
| | | var wingsId = data.wingsId;
|
| | | var secondaryId = data.secondaryId;
|
| | |
|
| | | playerModel.Show(job, clothesId, suitLevel, weaponId, wingsId, secondaryId, m_PlayerShowPoint);
|
| | | playerModel.Show(data, m_PlayerShowPoint);
|
| | | playerModel.UnloadClothedEffect();
|
| | | playerModel.PutOnEffect(suitLevel);
|
| | | playerModel.PutOnEffect(data.suitLevel);
|
| | |
|
| | | interactable = true;
|
| | | m_PlayerShowPoint.localEulerAngles = Vector3.zero;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public struct UI3DPlayerExhibitionData
|
| | | {
|
| | | public int job;
|
| | | public int clothesId;
|
| | | public int suitLevel;
|
| | | public int weaponId;
|
| | | public int wingsId;
|
| | | public int secondaryId;
|
| | | public bool isDialogue;
|
| | | }
|
| | | }
|
| | |
|
| | | public struct UI3DNPCExhibitionData
|
| | | {
|
| | | public int npcId;
|
| | | public bool gray;
|
| | | public bool isDialogue;
|
| | | }
|
| | | public struct UI3DPlayerExhibitionData
|
| | | {
|
| | | public int job;
|
| | | public int clothesId;
|
| | | public int suitLevel;
|
| | | public int weaponId;
|
| | | public int wingsId;
|
| | | public int secondaryId;
|
| | | public bool isDialogue;
|
| | | public Dictionary<int, int> godWeapons;
|
| | | }
|
| | |
|
| | | public struct UI3DNPCExhibitionData
|
| | | {
|
| | | public int npcId;
|
| | | public bool gray;
|
| | | public bool isDialogue;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | Transform showPoint;
|
| | | List<SFXController> closthesSFXList = new List<SFXController>();
|
| | |
|
| | | public GameObject Show(int _job, int _clothes, int suitID, int _weaponId, int _wingsId, int _secondaryId, Transform _showPoint)
|
| | | public GameObject Show(UI3DPlayerExhibitionData data, Transform showPoint)
|
| | | {
|
| | | showPoint = _showPoint;
|
| | | job = _job;
|
| | | this.showPoint = showPoint;
|
| | | this.job = data.job;
|
| | |
|
| | | var jobConfig = Config.Instance.Get<JobSetupConfig>(_job);
|
| | | var clothes = data.clothesId;
|
| | | var suitID = data.suitLevel;
|
| | | var weaponId = data.weaponId;
|
| | | var wingsId = data.wingsId;
|
| | | var secondaryId = data.secondaryId;
|
| | | var godWeapons = data.godWeapons;
|
| | |
|
| | | var jobConfig = Config.Instance.Get<JobSetupConfig>(job);
|
| | |
|
| | | var clothesResId = 0;
|
| | | if (_clothes == 0)
|
| | | if (clothes == 0)
|
| | | {
|
| | | clothesResId = jobConfig.BaseEquip[0];
|
| | | }
|
| | | else
|
| | | {
|
| | | var item = Config.Instance.Get<ItemConfig>(_clothes);
|
| | | var item = Config.Instance.Get<ItemConfig>(clothes);
|
| | | clothesResId = item == null ? clothesResId = jobConfig.BaseEquip[0] : item.ChangeOrd;
|
| | | }
|
| | | PutOnClothes(_job, clothesResId, suitID);
|
| | | PutOnClothes(job, clothesResId, suitID);
|
| | |
|
| | | var weaponResId = 0;
|
| | | if (_weaponId == 0)
|
| | | if (weaponId == 0)
|
| | | {
|
| | | weaponResId = jobConfig.BaseEquip[1];
|
| | | }
|
| | | else
|
| | | {
|
| | | var item = Config.Instance.Get<ItemConfig>(_weaponId);
|
| | | var item = Config.Instance.Get<ItemConfig>(weaponId);
|
| | | weaponResId = item == null ? weaponResId = jobConfig.BaseEquip[1] : item.ChangeOrd;
|
| | | }
|
| | | PutOnWeapon(_job, weaponResId);
|
| | | PutOnWeapon(job, weaponResId);
|
| | |
|
| | | var secondaryResId = 0;
|
| | | if (_secondaryId == 0)
|
| | | if (secondaryId == 0)
|
| | | {
|
| | | if (job == 1)
|
| | | if (this.job == 1)
|
| | | {
|
| | | secondaryResId = clothesId + 2900;
|
| | | secondaryResId = this.clothesId + 2900;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | var item = Config.Instance.Get<ItemConfig>(_secondaryId);
|
| | | var item = Config.Instance.Get<ItemConfig>(secondaryId);
|
| | | secondaryResId = item == null ? jobConfig.BaseEquip[2] : item.ChangeOrd;
|
| | | }
|
| | | PutOnSecondary(_job, secondaryResId);
|
| | | PutOnSecondary(job, secondaryResId);
|
| | |
|
| | | var wingsResId = 0;
|
| | | if (_wingsId != 0)
|
| | | if (wingsId != 0)
|
| | | {
|
| | | var item = Config.Instance.Get<ItemConfig>(_wingsId);
|
| | | var item = Config.Instance.Get<ItemConfig>(wingsId);
|
| | | wingsResId = item == null ? 0 : item.ChangeOrd;
|
| | | }
|
| | | PutOnWing(wingsResId);
|
| | | PutOnGodWeaponEffect(godWeapons);
|
| | |
|
| | | return clothesModel;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void PutOnClothes(int _job, int clothesResId, int suitID)
|
| | | private void PutOnClothes(int _job, int clothesResId, int suitID)
|
| | | {
|
| | | var config = Config.Instance.Get<JobSetupConfig>(_job);
|
| | | if (clothesId == clothesResId)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void PutOnWeapon(int _job, int resoureceId)
|
| | | private void PutOnWeapon(int _job, int resoureceId)
|
| | | {
|
| | | var config = Config.Instance.Get<JobSetupConfig>(_job);
|
| | |
|
| | |
| | | weaponId = resoureceId;
|
| | | }
|
| | |
|
| | | public void PutOnSecondary(int _job, int secondaryResId)
|
| | | private void PutOnSecondary(int _job, int secondaryResId)
|
| | | {
|
| | | var oldSecondary = secondaryId;
|
| | | if (oldSecondary == secondaryResId)
|
| | |
| | | secondaryId = secondaryResId;
|
| | | }
|
| | |
|
| | | public void PutOnWing(int resourceId)
|
| | | private void PutOnWing(int resourceId)
|
| | | {
|
| | | var config = Config.Instance.Get<JobSetupConfig>(job);
|
| | | var oldWings = wingsId;
|
| | |
| | | wingsId = resourceId;
|
| | | }
|
| | |
|
| | | private void PutOnGodWeaponEffect(Dictionary<int, int> godWeapons)
|
| | | {
|
| | | if (godWeapons == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | | private PlayerSuitModel SuitModel { get { return ModelCenter.Instance.GetModel<PlayerSuitModel>(); } }
|
| | | private PlayerPackModel PlayerBackModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | |
|
| | | public void LoadClothesEffect(int suitLevel)
|
| | | private void LoadClothesEffect(int suitLevel)
|
| | | {
|
| | | UnloadClothedEffect();
|
| | |
|