diff --git a/Assets/Editor/InspectorTools/BattleUnitAttrInspector.cs b/Assets/Editor/InspectorTools/BattleUnitAttrInspector.cs new file mode 100644 index 000000000..7fbbba3d3 --- /dev/null +++ b/Assets/Editor/InspectorTools/BattleUnitAttrInspector.cs @@ -0,0 +1,51 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +namespace BFEditor +{ + [CustomEditor(typeof(BF.BattleUnitAttr))] + public class BattleUnitAttrInspector : Editor + { + BF.BattleUnitAttr helper; + void OnEnable() + { + helper = target as BF.BattleUnitAttr; + } + + public override void OnInspectorGUI() + { + DrawAttribute(); + DrawButton(); + } + + private void DrawAttribute() + { + helper.UnitAttribute.hp = EditorGUILayout.LongField("生命(hp)", helper.UnitAttribute.hp); + helper.UnitAttribute.max_hp = EditorGUILayout.LongField("最大生命(max_hp)", helper.UnitAttribute.max_hp); + helper.UnitAttribute.atk = EditorGUILayout.LongField("无属性攻击力(atk)", helper.UnitAttribute.atk); + helper.UnitAttribute.atk_red = EditorGUILayout.LongField("攻击力红(atk_red)", helper.UnitAttribute.atk_red); + helper.UnitAttribute.atk_yellow = EditorGUILayout.LongField("攻击力黄(atk_yellow)", helper.UnitAttribute.atk_yellow); + helper.UnitAttribute.atk_green = EditorGUILayout.LongField("攻击力绿(atk_green)", helper.UnitAttribute.atk_green); + helper.UnitAttribute.atk_blue = EditorGUILayout.LongField("攻击力蓝(atk_blue)", helper.UnitAttribute.atk_blue); + helper.UnitAttribute.atk_purple = EditorGUILayout.LongField("攻击力紫(atk_purple)", helper.UnitAttribute.atk_purple); + helper.UnitAttribute.sheild_hp = EditorGUILayout.LongField("护盾(sheild_hp)", helper.UnitAttribute.sheild_hp); + } + + private void DrawButton() + { + GUILayout.BeginHorizontal(); + if (GUILayout.Button("刷新属性", GUILayout.Width(120))) + { + GetAttributeData(); + } + GUILayout.EndHorizontal(); + } + + private void GetAttributeData() + { + helper.TryGetAttributeFromLua(); + } + } +} diff --git a/Assets/Editor/InspectorTools/BattleUnitAttrInspector.cs.meta b/Assets/Editor/InspectorTools/BattleUnitAttrInspector.cs.meta new file mode 100644 index 000000000..47ba92355 --- /dev/null +++ b/Assets/Editor/InspectorTools/BattleUnitAttrInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 478c022f705744249a7cf2aafa7c3b75 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor/InspectorTools/CharacterHelperInspector.cs b/Assets/Editor/InspectorTools/CharacterHelperInspector.cs index 80e40de45..45e8f4cc5 100644 --- a/Assets/Editor/InspectorTools/CharacterHelperInspector.cs +++ b/Assets/Editor/InspectorTools/CharacterHelperInspector.cs @@ -265,7 +265,17 @@ namespace BFEditor { bool isPlay = list.Items[i].Name == m_CurAnimationName; GUILayout.BeginHorizontal(); - if (GUILayout.Button(string.Format("动作:{0}==============时长:{1}s", list.Items[i].Name, list.Items[i].Duration), isPlay ? highlightStyle : normalStyle)) + float keyFrame = 0.0f; + foreach(var t in list.Items[i].Timelines) { + var et = t as Spine.EventTimeline; + if(et != null) { + foreach (var spineEvent in et.Events) { + keyFrame = spineEvent.Time; + break; + } + } + } + if (GUILayout.Button(string.Format("动作:{0}============时长:{1}s============关键帧:{2}s", list.Items[i].Name, list.Items[i].Duration, keyFrame), isPlay ? highlightStyle : normalStyle)) { } GUILayout.EndHorizontal(); diff --git a/Assets/Scripts/Component/Battle/BattleHeroAttr.cs b/Assets/Scripts/Component/Battle/BattleHeroAttr.cs deleted file mode 100644 index deb412870..000000000 --- a/Assets/Scripts/Component/Battle/BattleHeroAttr.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace BF -{ - public class BattleHeroAttr : MonoBehaviour - { - [Header("血量")] - public long Hp = 0; - // 最大血量 - [Header("最大血量")] - public long MaxHp = 0; - // 生命恢复 - [Header("生命恢复")] - public int Recover = 0; - // 攻击力 - [Header("攻击力")] - public long Atk = 0; - // 移动速度 - [Header("移动速度")] - public float MoveSpeed = 0; - // 暴击率 - [Header("暴击率")] - public int Crit = 0; - // 暴击伤害加成 - [Header("暴击伤害加成")] - public double CritDmgAddition = 0; - // 子弹数量 - [Header("子弹数量")] - public int BulletCount = 0; - // 子弹额外穿透数量 - [Header("子弹额外穿透数量")] - public int HitCount = 0; - // 子弹飞行速度加成 - [Header("子弹飞行速度加成")] - public int BulletSpeed = 0; - // 技能持续时间加成 - [Header("技能持续时间加成")] - public float Lifetime = 0.0f; - // 冷却加成 - [Header("冷却加成")] - public float Cooldown = 0.0f; - // 攻击范围加成 - [Header("攻击范围加成")] - public float AtkRange = 0.0f; - // 道具拾取范围加成 - [Header("道具拾取范围加成")] - public float PickupRange = 0.0f; - // 经验获取倍率增加 - [Header("经验获取倍率增加")] - public float ExpAddition = 0.0f; - // 金币获取加成 - [Header("金币获取加成")] - public float CoinAddition = 0.0f; - // 受到普通怪伤害减少 - [Header("受到普通怪伤害减少")] - public int DmgDec1 = 0; - // 受到精英怪伤害减少 - [Header("受到精英怪伤害减少")] - public int DmgDec2 = 0; - // 受到BOSS伤减少 - [Header("受到BOSS伤减少")] - public int DmgDec3 = 0; - [Header("伤害减免")] - public double DmgDecAll = 0.0f; - [Header("治疗效果")] - public double Cured = 0.0f; - [Header("当前经验")] - public int CurrExp = 0; - } -} \ No newline at end of file diff --git a/Assets/Scripts/Component/Battle/BattleUnitAttr.cs b/Assets/Scripts/Component/Battle/BattleUnitAttr.cs new file mode 100644 index 000000000..7b4429eb0 --- /dev/null +++ b/Assets/Scripts/Component/Battle/BattleUnitAttr.cs @@ -0,0 +1,69 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System; + +namespace BF +{ + [Serializable] + public class BattleUnitAttribute + { + public long hp = 0; + public long max_hp = 0; + public long atk = 0; + public long atk_red = 0; + public long atk_yellow = 0; + public long atk_green = 0; + public long atk_blue = 0; + public long atk_purple = 0; + public long sheild_hp = 0; + } + + public class BattleUnitAttr : MonoBehaviour + { + [HideInInspector] + public BattleUnitAttribute UnitAttribute; + [HideInInspector] + public Action LuaGetAttributeFunc; + public int Side = 1; + private void Start() + { +#if UNITY_EDITOR + TryBindCharacter(); +#endif + } + + /// + /// 尝试在lua端找到并绑定对应角色 + /// + protected void TryBindCharacter() + { + int hashCode = gameObject.GetHashCode(); // 该脚本绑定的角色的hashcode + string lua = @"ModuleManager.BattleManager:bindBattleUnitAttribute({0}, {1})"; + BFMain.Instance.LuaMgr.luaEnv.DoString(string.Format(lua, hashCode, Side)); + } + + public void BindGetAttributeFunc(Action getFunc) + { + LuaGetAttributeFunc = getFunc; + } + + public void TryGetAttributeFromLua() + { + int hashCode = gameObject.GetHashCode(); // 该脚本绑定的角色的hashcode + + if (LuaGetAttributeFunc != null) + { + LuaGetAttributeFunc(hashCode); + } + } + + /// + /// 从lua端获取并刷新属性(lua调用的CS方法) + /// + public void GetAttribute(string attr) + { + UnitAttribute = JsonUtility.FromJson(attr); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Component/Battle/BattleHeroAttr.cs.meta b/Assets/Scripts/Component/Battle/BattleUnitAttr.cs.meta similarity index 100% rename from Assets/Scripts/Component/Battle/BattleHeroAttr.cs.meta rename to Assets/Scripts/Component/Battle/BattleUnitAttr.cs.meta diff --git a/Assets/Scripts/Component/Helper/CharacterSpineHelper.cs b/Assets/Scripts/Component/Helper/CharacterSpineHelper.cs index 8d34c0da2..bfd8111cb 100644 --- a/Assets/Scripts/Component/Helper/CharacterSpineHelper.cs +++ b/Assets/Scripts/Component/Helper/CharacterSpineHelper.cs @@ -235,6 +235,21 @@ namespace BF return skeletonGraphic.skeletonDataAsset.GetAnimationStateData().SkeletonData.FindAnimation(name).Duration; } + public float GetAnimationKeyFrameTime(string name) + { + float time = 0.0f; + var animation = skeletonGraphic.skeletonDataAsset.GetAnimationStateData().SkeletonData.FindAnimation(name); + foreach (var timeline in animation.Timelines) + { + var eventTimeline = timeline as Spine.EventTimeline; + if (eventTimeline != null && eventTimeline.Events.Length > 0) + { + time = eventTimeline.Events[0].Time; + } + } + return time; + } + public void SetDefaultMix(float mixDuration) { skeletonGraphic.skeletonDataAsset.GetAnimationStateData().DefaultMix = mixDuration; diff --git a/Assets/XLua/Gen/BF_BattleHeroAttrWrap.cs b/Assets/XLua/Gen/BF_BattleHeroAttrWrap.cs deleted file mode 100644 index 6efa49f7c..000000000 --- a/Assets/XLua/Gen/BF_BattleHeroAttrWrap.cs +++ /dev/null @@ -1,766 +0,0 @@ -#if USE_UNI_LUA -using LuaAPI = UniLua.Lua; -using RealStatePtr = UniLua.ILuaState; -using LuaCSFunction = UniLua.CSharpFunctionDelegate; -#else -using LuaAPI = XLua.LuaDLL.Lua; -using RealStatePtr = System.IntPtr; -using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; -#endif - -using XLua; -using System.Collections.Generic; - - -namespace XLua.CSObjectWrap -{ - using Utils = XLua.Utils; - public class BFBattleHeroAttrWrap - { - public static void __Register(RealStatePtr L) - { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - System.Type type = typeof(BF.BattleHeroAttr); - Utils.BeginObjectRegister(type, L, translator, 0, 0, 22, 22); - - - - Utils.RegisterFunc(L, Utils.GETTER_IDX, "Hp", _g_get_Hp); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "MaxHp", _g_get_MaxHp); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "Recover", _g_get_Recover); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "Atk", _g_get_Atk); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "MoveSpeed", _g_get_MoveSpeed); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "Crit", _g_get_Crit); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "CritDmgAddition", _g_get_CritDmgAddition); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "BulletCount", _g_get_BulletCount); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "HitCount", _g_get_HitCount); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "BulletSpeed", _g_get_BulletSpeed); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "Lifetime", _g_get_Lifetime); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "Cooldown", _g_get_Cooldown); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "AtkRange", _g_get_AtkRange); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "PickupRange", _g_get_PickupRange); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "ExpAddition", _g_get_ExpAddition); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "CoinAddition", _g_get_CoinAddition); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "DmgDec1", _g_get_DmgDec1); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "DmgDec2", _g_get_DmgDec2); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "DmgDec3", _g_get_DmgDec3); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "DmgDecAll", _g_get_DmgDecAll); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "Cured", _g_get_Cured); - Utils.RegisterFunc(L, Utils.GETTER_IDX, "CurrExp", _g_get_CurrExp); - - Utils.RegisterFunc(L, Utils.SETTER_IDX, "Hp", _s_set_Hp); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "MaxHp", _s_set_MaxHp); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "Recover", _s_set_Recover); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "Atk", _s_set_Atk); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "MoveSpeed", _s_set_MoveSpeed); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "Crit", _s_set_Crit); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "CritDmgAddition", _s_set_CritDmgAddition); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "BulletCount", _s_set_BulletCount); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "HitCount", _s_set_HitCount); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "BulletSpeed", _s_set_BulletSpeed); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "Lifetime", _s_set_Lifetime); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "Cooldown", _s_set_Cooldown); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "AtkRange", _s_set_AtkRange); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "PickupRange", _s_set_PickupRange); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "ExpAddition", _s_set_ExpAddition); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "CoinAddition", _s_set_CoinAddition); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "DmgDec1", _s_set_DmgDec1); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "DmgDec2", _s_set_DmgDec2); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "DmgDec3", _s_set_DmgDec3); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "DmgDecAll", _s_set_DmgDecAll); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "Cured", _s_set_Cured); - Utils.RegisterFunc(L, Utils.SETTER_IDX, "CurrExp", _s_set_CurrExp); - - - Utils.EndObjectRegister(type, L, translator, null, null, - null, null, null); - - Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0); - - - - - - - Utils.EndClassRegister(type, L, translator); - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int __CreateInstance(RealStatePtr L) - { - - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - if(LuaAPI.lua_gettop(L) == 1) - { - - var gen_ret = new BF.BattleHeroAttr(); - translator.Push(L, gen_ret); - - return 1; - } - - } - catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleHeroAttr constructor!"); - - } - - - - - - - - - - - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_Hp(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.lua_pushint64(L, gen_to_be_invoked.Hp); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_MaxHp(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.lua_pushint64(L, gen_to_be_invoked.MaxHp); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_Recover(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Recover); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_Atk(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.lua_pushint64(L, gen_to_be_invoked.Atk); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_MoveSpeed(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.lua_pushnumber(L, gen_to_be_invoked.MoveSpeed); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_Crit(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Crit); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_CritDmgAddition(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CritDmgAddition); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_BulletCount(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.BulletCount); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_HitCount(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.HitCount); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_BulletSpeed(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.BulletSpeed); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_Lifetime(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Lifetime); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_Cooldown(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Cooldown); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_AtkRange(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.lua_pushnumber(L, gen_to_be_invoked.AtkRange); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_PickupRange(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.lua_pushnumber(L, gen_to_be_invoked.PickupRange); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_ExpAddition(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.lua_pushnumber(L, gen_to_be_invoked.ExpAddition); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_CoinAddition(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CoinAddition); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_DmgDec1(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.DmgDec1); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_DmgDec2(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.DmgDec2); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_DmgDec3(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.DmgDec3); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_DmgDecAll(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.lua_pushnumber(L, gen_to_be_invoked.DmgDecAll); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_Cured(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Cured); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _g_get_CurrExp(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.CurrExp); - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 1; - } - - - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_Hp(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.Hp = LuaAPI.lua_toint64(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_MaxHp(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.MaxHp = LuaAPI.lua_toint64(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_Recover(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.Recover = LuaAPI.xlua_tointeger(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_Atk(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.Atk = LuaAPI.lua_toint64(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_MoveSpeed(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.MoveSpeed = (float)LuaAPI.lua_tonumber(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_Crit(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.Crit = LuaAPI.xlua_tointeger(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_CritDmgAddition(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.CritDmgAddition = LuaAPI.lua_tonumber(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_BulletCount(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.BulletCount = LuaAPI.xlua_tointeger(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_HitCount(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.HitCount = LuaAPI.xlua_tointeger(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_BulletSpeed(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.BulletSpeed = LuaAPI.xlua_tointeger(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_Lifetime(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.Lifetime = (float)LuaAPI.lua_tonumber(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_Cooldown(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.Cooldown = (float)LuaAPI.lua_tonumber(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_AtkRange(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.AtkRange = (float)LuaAPI.lua_tonumber(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_PickupRange(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.PickupRange = (float)LuaAPI.lua_tonumber(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_ExpAddition(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.ExpAddition = (float)LuaAPI.lua_tonumber(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_CoinAddition(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.CoinAddition = (float)LuaAPI.lua_tonumber(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_DmgDec1(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.DmgDec1 = LuaAPI.xlua_tointeger(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_DmgDec2(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.DmgDec2 = LuaAPI.xlua_tointeger(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_DmgDec3(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.DmgDec3 = LuaAPI.xlua_tointeger(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_DmgDecAll(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.DmgDecAll = LuaAPI.lua_tonumber(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_Cured(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.Cured = LuaAPI.lua_tonumber(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] - static int _s_set_CurrExp(RealStatePtr L) - { - try { - ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); - - BF.BattleHeroAttr gen_to_be_invoked = (BF.BattleHeroAttr)translator.FastGetCSObj(L, 1); - gen_to_be_invoked.CurrExp = LuaAPI.xlua_tointeger(L, 2); - - } catch(System.Exception gen_e) { - return LuaAPI.luaL_error(L, "c# exception:" + gen_e); - } - return 0; - } - - - - - - } -} diff --git a/Assets/XLua/Gen/BF_BattleUnitAttrWrap.cs b/Assets/XLua/Gen/BF_BattleUnitAttrWrap.cs new file mode 100644 index 000000000..ba715d170 --- /dev/null +++ b/Assets/XLua/Gen/BF_BattleUnitAttrWrap.cs @@ -0,0 +1,263 @@ +#if USE_UNI_LUA +using LuaAPI = UniLua.Lua; +using RealStatePtr = UniLua.ILuaState; +using LuaCSFunction = UniLua.CSharpFunctionDelegate; +#else +using LuaAPI = XLua.LuaDLL.Lua; +using RealStatePtr = System.IntPtr; +using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; +#endif + +using XLua; +using System.Collections.Generic; + + +namespace XLua.CSObjectWrap +{ + using Utils = XLua.Utils; + public class BFBattleUnitAttrWrap + { + public static void __Register(RealStatePtr L) + { + ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); + System.Type type = typeof(BF.BattleUnitAttr); + Utils.BeginObjectRegister(type, L, translator, 0, 3, 3, 3); + + Utils.RegisterFunc(L, Utils.METHOD_IDX, "BindGetAttributeFunc", _m_BindGetAttributeFunc); + Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetAttributeFromLua", _m_TryGetAttributeFromLua); + Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetAttribute", _m_GetAttribute); + + + Utils.RegisterFunc(L, Utils.GETTER_IDX, "UnitAttribute", _g_get_UnitAttribute); + Utils.RegisterFunc(L, Utils.GETTER_IDX, "LuaGetAttributeFunc", _g_get_LuaGetAttributeFunc); + Utils.RegisterFunc(L, Utils.GETTER_IDX, "Side", _g_get_Side); + + Utils.RegisterFunc(L, Utils.SETTER_IDX, "UnitAttribute", _s_set_UnitAttribute); + Utils.RegisterFunc(L, Utils.SETTER_IDX, "LuaGetAttributeFunc", _s_set_LuaGetAttributeFunc); + Utils.RegisterFunc(L, Utils.SETTER_IDX, "Side", _s_set_Side); + + + Utils.EndObjectRegister(type, L, translator, null, null, + null, null, null); + + Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0); + + + + + + + Utils.EndClassRegister(type, L, translator); + } + + [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] + static int __CreateInstance(RealStatePtr L) + { + + try { + ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); + if(LuaAPI.lua_gettop(L) == 1) + { + + var gen_ret = new BF.BattleUnitAttr(); + translator.Push(L, gen_ret); + + return 1; + } + + } + catch(System.Exception gen_e) { + return LuaAPI.luaL_error(L, "c# exception:" + gen_e); + } + return LuaAPI.luaL_error(L, "invalid arguments to BF.BattleUnitAttr constructor!"); + + } + + + + + + + + + [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] + static int _m_BindGetAttributeFunc(RealStatePtr L) + { + try { + + ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); + + + BF.BattleUnitAttr gen_to_be_invoked = (BF.BattleUnitAttr)translator.FastGetCSObj(L, 1); + + + + { + System.Action _getFunc = translator.GetDelegate>(L, 2); + + gen_to_be_invoked.BindGetAttributeFunc( _getFunc ); + + + + return 0; + } + + } catch(System.Exception gen_e) { + return LuaAPI.luaL_error(L, "c# exception:" + gen_e); + } + + } + + [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] + static int _m_TryGetAttributeFromLua(RealStatePtr L) + { + try { + + ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); + + + BF.BattleUnitAttr gen_to_be_invoked = (BF.BattleUnitAttr)translator.FastGetCSObj(L, 1); + + + + { + + gen_to_be_invoked.TryGetAttributeFromLua( ); + + + + return 0; + } + + } catch(System.Exception gen_e) { + return LuaAPI.luaL_error(L, "c# exception:" + gen_e); + } + + } + + [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] + static int _m_GetAttribute(RealStatePtr L) + { + try { + + ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); + + + BF.BattleUnitAttr gen_to_be_invoked = (BF.BattleUnitAttr)translator.FastGetCSObj(L, 1); + + + + { + string _attr = LuaAPI.lua_tostring(L, 2); + + gen_to_be_invoked.GetAttribute( _attr ); + + + + return 0; + } + + } catch(System.Exception gen_e) { + return LuaAPI.luaL_error(L, "c# exception:" + gen_e); + } + + } + + + + + [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] + static int _g_get_UnitAttribute(RealStatePtr L) + { + try { + ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); + + BF.BattleUnitAttr gen_to_be_invoked = (BF.BattleUnitAttr)translator.FastGetCSObj(L, 1); + translator.Push(L, gen_to_be_invoked.UnitAttribute); + } catch(System.Exception gen_e) { + return LuaAPI.luaL_error(L, "c# exception:" + gen_e); + } + return 1; + } + + [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] + static int _g_get_LuaGetAttributeFunc(RealStatePtr L) + { + try { + ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); + + BF.BattleUnitAttr gen_to_be_invoked = (BF.BattleUnitAttr)translator.FastGetCSObj(L, 1); + translator.Push(L, gen_to_be_invoked.LuaGetAttributeFunc); + } catch(System.Exception gen_e) { + return LuaAPI.luaL_error(L, "c# exception:" + gen_e); + } + return 1; + } + + [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] + static int _g_get_Side(RealStatePtr L) + { + try { + ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); + + BF.BattleUnitAttr gen_to_be_invoked = (BF.BattleUnitAttr)translator.FastGetCSObj(L, 1); + LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Side); + } catch(System.Exception gen_e) { + return LuaAPI.luaL_error(L, "c# exception:" + gen_e); + } + return 1; + } + + + + [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] + static int _s_set_UnitAttribute(RealStatePtr L) + { + try { + ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); + + BF.BattleUnitAttr gen_to_be_invoked = (BF.BattleUnitAttr)translator.FastGetCSObj(L, 1); + gen_to_be_invoked.UnitAttribute = (BF.BattleUnitAttribute)translator.GetObject(L, 2, typeof(BF.BattleUnitAttribute)); + + } catch(System.Exception gen_e) { + return LuaAPI.luaL_error(L, "c# exception:" + gen_e); + } + return 0; + } + + [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] + static int _s_set_LuaGetAttributeFunc(RealStatePtr L) + { + try { + ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); + + BF.BattleUnitAttr gen_to_be_invoked = (BF.BattleUnitAttr)translator.FastGetCSObj(L, 1); + gen_to_be_invoked.LuaGetAttributeFunc = translator.GetDelegate>(L, 2); + + } catch(System.Exception gen_e) { + return LuaAPI.luaL_error(L, "c# exception:" + gen_e); + } + return 0; + } + + [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] + static int _s_set_Side(RealStatePtr L) + { + try { + ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); + + BF.BattleUnitAttr gen_to_be_invoked = (BF.BattleUnitAttr)translator.FastGetCSObj(L, 1); + gen_to_be_invoked.Side = LuaAPI.xlua_tointeger(L, 2); + + } catch(System.Exception gen_e) { + return LuaAPI.luaL_error(L, "c# exception:" + gen_e); + } + return 0; + } + + + + + + } +} diff --git a/Assets/XLua/Gen/BF_CharacterSpineHelperWrap.cs b/Assets/XLua/Gen/BF_CharacterSpineHelperWrap.cs index 8bea1774b..e939181dd 100644 --- a/Assets/XLua/Gen/BF_CharacterSpineHelperWrap.cs +++ b/Assets/XLua/Gen/BF_CharacterSpineHelperWrap.cs @@ -21,7 +21,7 @@ namespace XLua.CSObjectWrap { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(BF.CharacterSpineHelper); - Utils.BeginObjectRegister(type, L, translator, 0, 23, 5, 2); + Utils.BeginObjectRegister(type, L, translator, 0, 24, 5, 2); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Reload", _m_Reload); Utils.RegisterFunc(L, Utils.METHOD_IDX, "PlayAnimation", _m_PlayAnimation); @@ -44,6 +44,7 @@ namespace XLua.CSObjectWrap Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetLocalScaleX", _m_SetLocalScaleX); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetMainSpineLocalPosition", _m_SetMainSpineLocalPosition); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetAnimationDuration", _m_GetAnimationDuration); + Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetAnimationKeyFrameTime", _m_GetAnimationKeyFrameTime); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetDefaultMix", _m_SetDefaultMix); Utils.RegisterFunc(L, Utils.METHOD_IDX, "PlayAnimationAndPause", _m_PlayAnimationAndPause); @@ -703,6 +704,35 @@ namespace XLua.CSObjectWrap + return 1; + } + + } catch(System.Exception gen_e) { + return LuaAPI.luaL_error(L, "c# exception:" + gen_e); + } + + } + + [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] + static int _m_GetAnimationKeyFrameTime(RealStatePtr L) + { + try { + + ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); + + + BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1); + + + + { + string _name = LuaAPI.lua_tostring(L, 2); + + var gen_ret = gen_to_be_invoked.GetAnimationKeyFrameTime( _name ); + LuaAPI.lua_pushnumber(L, gen_ret); + + + return 1; } diff --git a/Assets/XLua/Gen/XLuaGenAutoRegister.cs b/Assets/XLua/Gen/XLuaGenAutoRegister.cs index c7446fd4b..c5d7863f3 100644 --- a/Assets/XLua/Gen/XLuaGenAutoRegister.cs +++ b/Assets/XLua/Gen/XLuaGenAutoRegister.cs @@ -1546,9 +1546,6 @@ namespace XLua.CSObjectWrap translator.DelayWrapLoader(typeof(BF.BattleEffectNumber), BFBattleEffectNumberWrap.__Register); - translator.DelayWrapLoader(typeof(BF.BattleHeroAttr), BFBattleHeroAttrWrap.__Register); - - translator.DelayWrapLoader(typeof(BF.BattleHpBar), BFBattleHpBarWrap.__Register); @@ -1558,6 +1555,9 @@ namespace XLua.CSObjectWrap translator.DelayWrapLoader(typeof(BF.BattleSkillToast), BFBattleSkillToastWrap.__Register); + translator.DelayWrapLoader(typeof(BF.BattleUnitAttr), BFBattleUnitAttrWrap.__Register); + + translator.DelayWrapLoader(typeof(BF.BaseSortingOrderHelper), BFBaseSortingOrderHelperWrap.__Register); diff --git a/Assets/XLua/Gen/link.xml b/Assets/XLua/Gen/link.xml index 6fea3f39e..1f5c6a681 100644 --- a/Assets/XLua/Gen/link.xml +++ b/Assets/XLua/Gen/link.xml @@ -122,10 +122,10 @@ - + diff --git a/Assets/arts/spines/characters/p0002/p0002.skel.bytes b/Assets/arts/spines/characters/p0002/p0002.skel.bytes index 29ac50d2f..1e754d64e 100644 Binary files a/Assets/arts/spines/characters/p0002/p0002.skel.bytes and b/Assets/arts/spines/characters/p0002/p0002.skel.bytes differ diff --git a/Assets/arts/spines/characters/p0003.meta b/Assets/arts/spines/characters/p0003.meta new file mode 100644 index 000000000..93ae572b7 --- /dev/null +++ b/Assets/arts/spines/characters/p0003.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dfd7040bb832077409acbd9e7142a534 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/arts/spines/characters/p0003/p0003.atlas.txt b/Assets/arts/spines/characters/p0003/p0003.atlas.txt new file mode 100644 index 000000000..dd5c2f9bc --- /dev/null +++ b/Assets/arts/spines/characters/p0003/p0003.atlas.txt @@ -0,0 +1,33 @@ +p0003.png +size:256,256 +filter:Linear,Linear +hair +bounds:2,116,111,138 +hand _r_01 +bounds:123,15,23,24 +hand_l_01 +bounds:2,5,45,34 +head +bounds:171,56,91,83 +rotate:90 +hit_yan1 +bounds:148,21,16,18 +leg_l +bounds:171,7,47,58 +rotate:90 +leg_r +bounds:204,196,47,58 +spine +bounds:115,149,105,87 +rotate:90 +upperarm_l_01 +bounds:204,151,43,42 +rotate:90 +upperarm_r_01 +bounds:49,9,30,46 +rotate:90 +weapon_1 +bounds:2,41,73,167 +rotate:90 +zui +bounds:97,7,24,32 diff --git a/Assets/arts/spines/characters/p0003/p0003.atlas.txt.meta b/Assets/arts/spines/characters/p0003/p0003.atlas.txt.meta new file mode 100644 index 000000000..b93eff0bb --- /dev/null +++ b/Assets/arts/spines/characters/p0003/p0003.atlas.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9ee6987ee3dfc7a4284c02ce783bee82 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/arts/spines/characters/p0003/p0003.png b/Assets/arts/spines/characters/p0003/p0003.png new file mode 100644 index 000000000..df6f0437e Binary files /dev/null and b/Assets/arts/spines/characters/p0003/p0003.png differ diff --git a/Assets/arts/spines/characters/p0003/p0003.png.meta b/Assets/arts/spines/characters/p0003/p0003.png.meta new file mode 100644 index 000000000..fcfcc201f --- /dev/null +++ b/Assets/arts/spines/characters/p0003/p0003.png.meta @@ -0,0 +1,120 @@ +fileFormatVersion: 2 +guid: 9125d3b066736854987c9cd07f2b13d9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 47 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 50 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/arts/spines/characters/p0003/p0003.skel.bytes b/Assets/arts/spines/characters/p0003/p0003.skel.bytes new file mode 100644 index 000000000..852c60b19 Binary files /dev/null and b/Assets/arts/spines/characters/p0003/p0003.skel.bytes differ diff --git a/Assets/arts/spines/characters/p0003/p0003.skel.bytes.meta b/Assets/arts/spines/characters/p0003/p0003.skel.bytes.meta new file mode 100644 index 000000000..1121407cf --- /dev/null +++ b/Assets/arts/spines/characters/p0003/p0003.skel.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 970d36de7e83c6c409b24b89d6c38815 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/arts/spines/characters/p0003/p0003_atlas.asset b/Assets/arts/spines/characters/p0003/p0003_atlas.asset new file mode 100644 index 000000000..8c9ff2359 --- /dev/null +++ b/Assets/arts/spines/characters/p0003/p0003_atlas.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a6b194f808b1af6499c93410e504af42, type: 3} + m_Name: p0003_atlas + m_EditorClassIdentifier: + atlasFile: {fileID: 4900000, guid: 9ee6987ee3dfc7a4284c02ce783bee82, type: 3} + materials: + - {fileID: 2100000, guid: 4ada85a8672dcfe4da7c34168abd0bff, type: 2} diff --git a/Assets/arts/spines/characters/p0003/p0003_atlas.asset.meta b/Assets/arts/spines/characters/p0003/p0003_atlas.asset.meta new file mode 100644 index 000000000..0b00eeafd --- /dev/null +++ b/Assets/arts/spines/characters/p0003/p0003_atlas.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d9414a9c46bd7674baf38504624642f7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/arts/spines/characters/p0003/p0003_material.mat b/Assets/arts/spines/characters/p0003/p0003_material.mat new file mode 100644 index 000000000..270e3303d --- /dev/null +++ b/Assets/arts/spines/characters/p0003/p0003_material.mat @@ -0,0 +1,40 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: p0003_material + m_Shader: {fileID: 4800000, guid: b2f91ac81daca8e4392188a2ba68c1e3, type: 3} + m_ShaderKeywords: _STRAIGHT_ALPHA_INPUT _USE8NEIGHBOURHOOD_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 2800000, guid: 9125d3b066736854987c9cd07f2b13d9, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _Cutoff: 0.1 + - _OutlineMipLevel: 0 + - _OutlineOpaqueAlpha: 1 + - _OutlineReferenceTexWidth: 1024 + - _OutlineSmoothness: 1 + - _OutlineWidth: 3 + - _StencilComp: 8 + - _StencilRef: 1 + - _StraightAlphaInput: 1 + - _ThresholdEnd: 0.25 + - _Use8Neighbourhood: 1 + m_Colors: + - _OutlineColor: {r: 1, g: 1, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/arts/spines/characters/p0003/p0003_material.mat.meta b/Assets/arts/spines/characters/p0003/p0003_material.mat.meta new file mode 100644 index 000000000..61986a5a6 --- /dev/null +++ b/Assets/arts/spines/characters/p0003/p0003_material.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4ada85a8672dcfe4da7c34168abd0bff +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/arts/spines/characters/p0003/p0003_skeletondata.asset b/Assets/arts/spines/characters/p0003/p0003_skeletondata.asset new file mode 100644 index 000000000..85ed2ef9a --- /dev/null +++ b/Assets/arts/spines/characters/p0003/p0003_skeletondata.asset @@ -0,0 +1,31 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1b3b4b945939a54ea0b23d3396115fb, type: 3} + m_Name: p0003_skeletondata + m_EditorClassIdentifier: + atlasAssets: + - {fileID: 11400000, guid: d9414a9c46bd7674baf38504624642f7, type: 2} + scale: 0.01 + skeletonJSON: {fileID: 4900000, guid: 970d36de7e83c6c409b24b89d6c38815, type: 3} + isUpgradingBlendModeMaterials: 0 + blendModeMaterials: + requiresBlendModeMaterials: 0 + applyAdditiveMaterial: 0 + additiveMaterials: [] + multiplyMaterials: [] + screenMaterials: [] + skeletonDataModifiers: [] + fromAnimation: [] + toAnimation: [] + duration: [] + defaultMix: 0.2 + controller: {fileID: 0} diff --git a/Assets/arts/spines/characters/p0003/p0003_skeletondata.asset.meta b/Assets/arts/spines/characters/p0003/p0003_skeletondata.asset.meta new file mode 100644 index 000000000..5523648c8 --- /dev/null +++ b/Assets/arts/spines/characters/p0003/p0003_skeletondata.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7e79fad60ed672143851509cc068d9f5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/arts/spines/characters/p0004.meta b/Assets/arts/spines/characters/p0004.meta new file mode 100644 index 000000000..2ce2dc87d --- /dev/null +++ b/Assets/arts/spines/characters/p0004.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a0b280cc67946724ea7c632c4e2f4d14 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/arts/spines/characters/p0004/p0004.atlas.txt b/Assets/arts/spines/characters/p0004/p0004.atlas.txt new file mode 100644 index 000000000..59cec164e --- /dev/null +++ b/Assets/arts/spines/characters/p0004/p0004.atlas.txt @@ -0,0 +1,41 @@ +p0004.png +size:512,512 +filter:Linear,Linear +1 +bounds:130,101,27,60 +2 +bounds:130,101,27,60 +3 +bounds:130,39,27,60 +4 +bounds:281,204,33,60 +clothes +bounds:154,179,85,125 +rotate:90 +clothes1 +bounds:189,266,106,130 +rotate:90 +hand_l +bounds:154,274,39,33 +rotate:90 +hand_r +bounds:154,274,39,33 +rotate:90 +head +bounds:2,2,126,159 +hit_yan1 +bounds:494,492,16,18 +spine +bounds:327,386,124,139 +rotate:90 +weapon_1 +bounds:468,434,76,24 +rotate:90 +yan01 +bounds:2,315,185,195 +yan02 +bounds:189,374,136,136 +yan03 +bounds:2,163,150,150 +zui +bounds:468,400,24,32 diff --git a/Assets/arts/spines/characters/p0004/p0004.atlas.txt.meta b/Assets/arts/spines/characters/p0004/p0004.atlas.txt.meta new file mode 100644 index 000000000..38dea7a2c --- /dev/null +++ b/Assets/arts/spines/characters/p0004/p0004.atlas.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6bf3bba9658ee3c45b7586cb517fcdd8 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/arts/spines/characters/p0004/p0004.png b/Assets/arts/spines/characters/p0004/p0004.png new file mode 100644 index 000000000..b137e3990 Binary files /dev/null and b/Assets/arts/spines/characters/p0004/p0004.png differ diff --git a/Assets/arts/spines/characters/p0004/p0004.png.meta b/Assets/arts/spines/characters/p0004/p0004.png.meta new file mode 100644 index 000000000..382834b43 --- /dev/null +++ b/Assets/arts/spines/characters/p0004/p0004.png.meta @@ -0,0 +1,120 @@ +fileFormatVersion: 2 +guid: a50d77477b2c3a5418eb6dbfc1456170 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 47 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 50 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/arts/spines/characters/p0004/p0004.skel.bytes b/Assets/arts/spines/characters/p0004/p0004.skel.bytes new file mode 100644 index 000000000..09c6cdfb5 Binary files /dev/null and b/Assets/arts/spines/characters/p0004/p0004.skel.bytes differ diff --git a/Assets/arts/spines/characters/p0004/p0004.skel.bytes.meta b/Assets/arts/spines/characters/p0004/p0004.skel.bytes.meta new file mode 100644 index 000000000..4443d83a5 --- /dev/null +++ b/Assets/arts/spines/characters/p0004/p0004.skel.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e30d4da4709b86c4cb41c8347140c3fa +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/arts/spines/characters/p0004/p0004_atlas.asset b/Assets/arts/spines/characters/p0004/p0004_atlas.asset new file mode 100644 index 000000000..e978d4e78 --- /dev/null +++ b/Assets/arts/spines/characters/p0004/p0004_atlas.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a6b194f808b1af6499c93410e504af42, type: 3} + m_Name: p0004_atlas + m_EditorClassIdentifier: + atlasFile: {fileID: 4900000, guid: 6bf3bba9658ee3c45b7586cb517fcdd8, type: 3} + materials: + - {fileID: 2100000, guid: d187a32b2a9da26498eecbaa1ef24c99, type: 2} diff --git a/Assets/arts/spines/characters/p0004/p0004_atlas.asset.meta b/Assets/arts/spines/characters/p0004/p0004_atlas.asset.meta new file mode 100644 index 000000000..7e5a2919d --- /dev/null +++ b/Assets/arts/spines/characters/p0004/p0004_atlas.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 73fdd949e68836447b83f91fdbff0e2e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/arts/spines/characters/p0004/p0004_material.mat b/Assets/arts/spines/characters/p0004/p0004_material.mat new file mode 100644 index 000000000..a047d0a85 --- /dev/null +++ b/Assets/arts/spines/characters/p0004/p0004_material.mat @@ -0,0 +1,40 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: p0004_material + m_Shader: {fileID: 4800000, guid: b2f91ac81daca8e4392188a2ba68c1e3, type: 3} + m_ShaderKeywords: _STRAIGHT_ALPHA_INPUT _USE8NEIGHBOURHOOD_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 2800000, guid: a50d77477b2c3a5418eb6dbfc1456170, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _Cutoff: 0.1 + - _OutlineMipLevel: 0 + - _OutlineOpaqueAlpha: 1 + - _OutlineReferenceTexWidth: 1024 + - _OutlineSmoothness: 1 + - _OutlineWidth: 3 + - _StencilComp: 8 + - _StencilRef: 1 + - _StraightAlphaInput: 1 + - _ThresholdEnd: 0.25 + - _Use8Neighbourhood: 1 + m_Colors: + - _OutlineColor: {r: 1, g: 1, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/arts/spines/characters/p0004/p0004_material.mat.meta b/Assets/arts/spines/characters/p0004/p0004_material.mat.meta new file mode 100644 index 000000000..99fd7d650 --- /dev/null +++ b/Assets/arts/spines/characters/p0004/p0004_material.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d187a32b2a9da26498eecbaa1ef24c99 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/arts/spines/characters/p0004/p0004_skeletondata.asset b/Assets/arts/spines/characters/p0004/p0004_skeletondata.asset new file mode 100644 index 000000000..de9ff88da --- /dev/null +++ b/Assets/arts/spines/characters/p0004/p0004_skeletondata.asset @@ -0,0 +1,31 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1b3b4b945939a54ea0b23d3396115fb, type: 3} + m_Name: p0004_skeletondata + m_EditorClassIdentifier: + atlasAssets: + - {fileID: 11400000, guid: 73fdd949e68836447b83f91fdbff0e2e, type: 2} + scale: 0.01 + skeletonJSON: {fileID: 4900000, guid: e30d4da4709b86c4cb41c8347140c3fa, type: 3} + isUpgradingBlendModeMaterials: 0 + blendModeMaterials: + requiresBlendModeMaterials: 0 + applyAdditiveMaterial: 0 + additiveMaterials: [] + multiplyMaterials: [] + screenMaterials: [] + skeletonDataModifiers: [] + fromAnimation: [] + toAnimation: [] + duration: [] + defaultMix: 0.2 + controller: {fileID: 0} diff --git a/Assets/arts/spines/characters/p0004/p0004_skeletondata.asset.meta b/Assets/arts/spines/characters/p0004/p0004_skeletondata.asset.meta new file mode 100644 index 000000000..790780e10 --- /dev/null +++ b/Assets/arts/spines/characters/p0004/p0004_skeletondata.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 946b79f032c464846aa86eba53ab2626 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/lua/app/bf/unity/character_spine_object.lua.bytes b/Assets/lua/app/bf/unity/character_spine_object.lua.bytes index 8fff26bec..f48d075f8 100644 Binary files a/Assets/lua/app/bf/unity/character_spine_object.lua.bytes and b/Assets/lua/app/bf/unity/character_spine_object.lua.bytes differ diff --git a/Assets/lua/app/module/battle/battle_manager.lua.bytes b/Assets/lua/app/module/battle/battle_manager.lua.bytes index 0fae66955..289f2de48 100644 Binary files a/Assets/lua/app/module/battle/battle_manager.lua.bytes and b/Assets/lua/app/module/battle/battle_manager.lua.bytes differ diff --git a/Assets/lua/app/module/battle/component/battle_unit_comp.lua.bytes b/Assets/lua/app/module/battle/component/battle_unit_comp.lua.bytes index e71d47323..18f9d5862 100644 Binary files a/Assets/lua/app/module/battle/component/battle_unit_comp.lua.bytes and b/Assets/lua/app/module/battle/component/battle_unit_comp.lua.bytes differ diff --git a/Assets/lua/app/ui/battle/battle_ui.lua.bytes b/Assets/lua/app/ui/battle/battle_ui.lua.bytes index 7988db05c..fa25f382e 100644 Binary files a/Assets/lua/app/ui/battle/battle_ui.lua.bytes and b/Assets/lua/app/ui/battle/battle_ui.lua.bytes differ diff --git a/Assets/prefabs/spine/ui/characters/p0002.prefab b/Assets/prefabs/spine/ui/characters/p0002.prefab index 5a8680007..6b1ea7c91 100644 --- a/Assets/prefabs/spine/ui/characters/p0002.prefab +++ b/Assets/prefabs/spine/ui/characters/p0002.prefab @@ -156,7 +156,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - skeletonDataAsset: {fileID: 11400000, guid: 1c7297de721c6b84b8cb96644f5fd288, type: 2} + skeletonDataAsset: {fileID: 11400000, guid: 172156a70a38fef4585d133365f0170c, type: 2} additiveMaterial: {fileID: 0} multiplyMaterial: {fileID: 0} screenMaterial: {fileID: 0} diff --git a/Assets/prefabs/spine/ui/characters/p0003.prefab b/Assets/prefabs/spine/ui/characters/p0003.prefab index ae040b421..a9023f015 100644 --- a/Assets/prefabs/spine/ui/characters/p0003.prefab +++ b/Assets/prefabs/spine/ui/characters/p0003.prefab @@ -156,7 +156,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - skeletonDataAsset: {fileID: 11400000, guid: 1c7297de721c6b84b8cb96644f5fd288, type: 2} + skeletonDataAsset: {fileID: 11400000, guid: 7e79fad60ed672143851509cc068d9f5, type: 2} additiveMaterial: {fileID: 0} multiplyMaterial: {fileID: 0} screenMaterial: {fileID: 0} diff --git a/Assets/prefabs/spine/ui/characters/p0004.prefab b/Assets/prefabs/spine/ui/characters/p0004.prefab index 31bf37da4..2b945196d 100644 --- a/Assets/prefabs/spine/ui/characters/p0004.prefab +++ b/Assets/prefabs/spine/ui/characters/p0004.prefab @@ -156,7 +156,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - skeletonDataAsset: {fileID: 11400000, guid: 1c7297de721c6b84b8cb96644f5fd288, type: 2} + skeletonDataAsset: {fileID: 11400000, guid: 946b79f032c464846aa86eba53ab2626, type: 2} additiveMaterial: {fileID: 0} multiplyMaterial: {fileID: 0} screenMaterial: {fileID: 0} diff --git a/Assets/prefabs/ui/battle/battle_ui.prefab b/Assets/prefabs/ui/battle/battle_ui.prefab index 9b7b946f6..419b9b720 100644 --- a/Assets/prefabs/ui/battle/battle_ui.prefab +++ b/Assets/prefabs/ui/battle/battle_ui.prefab @@ -1800,7 +1800,7 @@ GameObject: - component: {fileID: 2011156105034962007} - component: {fileID: 3907747409906925605} m_Layer: 5 - m_Name: atk_slider_yellow + m_Name: def_slider_yellow m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -4613,12 +4613,12 @@ MonoBehaviour: hashName: 988391161 objectType: 0 gameObject: {fileID: 7634601474060982406} - - name: battle_ui.top_node.bg_r.atk_slider_yellow - hashName: 307025348 + - name: battle_ui.top_node.bg_r.def_slider_yellow + hashName: 192240753 objectType: 0 gameObject: {fileID: 4186263092656945545} - - name: battle_ui.top_node.bg_r.atk_slider_red - hashName: 1603750209 + - name: battle_ui.top_node.bg_r.def_slider_red + hashName: 3842705844 objectType: 0 gameObject: {fileID: 8984854456205409131} - name: battle_ui.bg_2.board_node.ani_node.grid_cell_1 @@ -4653,7 +4653,7 @@ GameObject: - component: {fileID: 3595613301038347339} - component: {fileID: 1478988063561627093} m_Layer: 5 - m_Name: atk_slider_red + m_Name: def_slider_red m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0