示例#1
0
 /// <summary>
 /// Sets a new value for a upvalue.
 /// </summary>
 /// <param name="functionIndex">?</param>
 /// <param name="var">Variable that was returned by GetUpValues.</param>
 /// <param name="newValue">New value. The type don't have to match.</param>
 /// <remarks>
 /// Not tested.
 /// </remarks>
 public void SetUpValue(int functionIndex, ref LuaVar var, object newValue)
 {
     if (m_State == LuaDebuggerState.Stoped)
     {
         var.Value = newValue;
         m_Lua.Push(newValue);
         m_Lua.SetUpValue(functionIndex, var.Index);
     }
 }
示例#2
0
 /// <summary>
 /// Sets a new value for a local variable.
 /// </summary>
 /// <param name="luaDebug">Current LuaDebug structure.</param>
 /// <param name="var">Variable that was returned by GetLocalVars.</param>
 /// <param name="newValue">New value. The type don't have to match.</param>
 public void SetLocalVar(LuaDebug luaDebug, ref LuaVar var, object newValue)
 {
     if (m_State == LuaDebuggerState.Stoped)
     {
         var.Value = newValue;
         m_Lua.Push(newValue);
         m_Lua.SetLocal(luaDebug, var.Index);
     }
 }
 /// <summary>
 /// Sets a new value for a upvalue.
 /// </summary>
 /// <param name="functionIndex">?</param>
 /// <param name="var">Variable that was returned by GetUpValues.</param>
 /// <param name="newValue">New value. The type don't have to match.</param>
 /// <remarks>
 /// Not tested.
 /// </remarks>
 public void SetUpValue(int functionIndex, ref LuaVar var, object newValue)
 {
     if (m_State == LuaDebuggerState.Stoped)
      {
     var.Value = newValue;
     m_Lua.Push(newValue);
     m_Lua.SetUpValue(functionIndex, var.Index);
      }
 }
 /// <summary>
 /// Sets a new value for a local variable.
 /// </summary>
 /// <param name="luaDebug">Current LuaDebug structure.</param>
 /// <param name="var">Variable that was returned by GetLocalVars.</param>
 /// <param name="newValue">New value. The type don't have to match.</param>
 public void SetLocalVar(LuaDebug luaDebug, ref LuaVar var, object newValue)
 {
     if (m_State == LuaDebuggerState.Stoped)
      {
     var.Value = newValue;
     m_Lua.Push(newValue);
     m_Lua.SetLocal(luaDebug, var.Index);
      }
 }