编译
This commit is contained in:
parent
b93b195341
commit
eebce5736f
51
Assets/Editor/InspectorTools/BattleUnitAttrInspector.cs
Normal file
51
Assets/Editor/InspectorTools/BattleUnitAttrInspector.cs
Normal file
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Editor/InspectorTools/BattleUnitAttrInspector.cs.meta
Normal file
11
Assets/Editor/InspectorTools/BattleUnitAttrInspector.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 478c022f705744249a7cf2aafa7c3b75
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
69
Assets/Scripts/Component/Battle/BattleUnitAttr.cs
Normal file
69
Assets/Scripts/Component/Battle/BattleUnitAttr.cs
Normal file
@ -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<int> LuaGetAttributeFunc;
|
||||
public int Side = 1;
|
||||
private void Start()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
TryBindCharacter();
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 尝试在lua端找到并绑定对应角色
|
||||
/// </summary>
|
||||
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<int> getFunc)
|
||||
{
|
||||
LuaGetAttributeFunc = getFunc;
|
||||
}
|
||||
|
||||
public void TryGetAttributeFromLua()
|
||||
{
|
||||
int hashCode = gameObject.GetHashCode(); // 该脚本绑定的角色的hashcode
|
||||
|
||||
if (LuaGetAttributeFunc != null)
|
||||
{
|
||||
LuaGetAttributeFunc(hashCode);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从lua端获取并刷新属性(lua调用的CS方法)
|
||||
/// </summary>
|
||||
public void GetAttribute(string attr)
|
||||
{
|
||||
UnitAttribute = JsonUtility.FromJson<BattleUnitAttribute>(attr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
263
Assets/XLua/Gen/BF_BattleUnitAttrWrap.cs
Normal file
263
Assets/XLua/Gen/BF_BattleUnitAttrWrap.cs
Normal file
@ -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<int> _getFunc = translator.GetDelegate<System.Action<int>>(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<System.Action<int>>(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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
|
||||
|
||||
|
||||
@ -122,10 +122,10 @@
|
||||
<type fullname="BF.BattleControlWarning" preserve="all"/>
|
||||
<type fullname="BF.BattleControlWarningCollider" preserve="all"/>
|
||||
<type fullname="BF.BattleEffectNumber" preserve="all"/>
|
||||
<type fullname="BF.BattleHeroAttr" preserve="all"/>
|
||||
<type fullname="BF.BattleHpBar" preserve="all"/>
|
||||
<type fullname="BF.BattleRewardIconHelper" preserve="all"/>
|
||||
<type fullname="BF.BattleSkillToast" preserve="all"/>
|
||||
<type fullname="BF.BattleUnitAttr" preserve="all"/>
|
||||
<type fullname="BF.BaseSortingOrderHelper" preserve="all"/>
|
||||
<type fullname="BF.CameraHelper" preserve="all"/>
|
||||
<type fullname="BF.CanvasSortingOrderHelper" preserve="all"/>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user