static int InitVars(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); PlayerAttribe obj = (PlayerAttribe)ToLua.CheckObject <PlayerAttribe>(L, 1); obj.InitVars(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
private void AttachAttribeToSpriteMovement() { PlayerAttribe attribe = this.Attribe; if (attribe == null) { return; } SpriteMovement movement = this.Movement; if (movement == null) { return; } movement.StartVec = attribe.StateStartVec; }
static int get_Attribe(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); PlayerDisplay obj = (PlayerDisplay)o; PlayerAttribe ret = obj.Attribe; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index Attribe on a nil value")); } }
static int set_StateStartVec(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); PlayerAttribe obj = (PlayerAttribe)o; UnityEngine.Vector2 arg0 = ToLua.ToVector2(L, 2); obj.StateStartVec = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index StateStartVec on a nil value")); } }
static int set_Ctrl(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); PlayerAttribe obj = (PlayerAttribe)o; int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.Ctrl = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index Ctrl on a nil value")); } }
static int set_StandType(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); PlayerAttribe obj = (PlayerAttribe)o; Mugen.Cns_Type arg0 = (Mugen.Cns_Type)ToLua.CheckObject(L, 2, typeof(Mugen.Cns_Type)); obj.StandType = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index StandType on a nil value")); } }
static int SetIntVars(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); PlayerAttribe obj = (PlayerAttribe)ToLua.CheckObject <PlayerAttribe>(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); int arg1 = (int)LuaDLL.luaL_checknumber(L, 3); bool o = obj.SetIntVars(arg0, arg1); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_IsAlive(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); PlayerAttribe obj = (PlayerAttribe)o; bool ret = obj.IsAlive; LuaDLL.lua_pushboolean(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index IsAlive on a nil value")); } }
static int get_StateStartVec(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); PlayerAttribe obj = (PlayerAttribe)o; UnityEngine.Vector2 ret = obj.StateStartVec; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index StateStartVec on a nil value")); } }
static int get_Ctrl(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); PlayerAttribe obj = (PlayerAttribe)o; int ret = obj.Ctrl; LuaDLL.lua_pushinteger(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index Ctrl on a nil value")); } }
static int get_StandType(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); PlayerAttribe obj = (PlayerAttribe)o; Mugen.Cns_Type ret = obj.StandType; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index StandType on a nil value")); } }
private void AttachAttribeFromStateDef(CNSStateDef def) { if (def == null) { return; } /* * 设置属性 */ PlayerAttribe attribe = this.Attribe; if (attribe != null) { //attribe.StandType = def.MoveType; attribe.Power += def.PowerAdd; attribe.Ctrl = def.Ctrl; // 状态开始的速度 attribe.StateStartVec = new Vector2(def.Velset_x, def.Velset_y); AttachAttribeToSpriteMovement(); } }