public void OnVariableRegistered(CRegistry registry, CVar cvar) { try { m_args5[0] = jval(cvar.Id); m_args5[1] = jval(cvar.Name); m_args5[2] = jval(cvar.Type.ToString()); m_args5[3] = jval(cvar.Value); m_args5[4] = jval(cvar.DefaultValue); CallStaticVoidMethod(m_methodRegisterVariable, m_args5); AndroidJNI.DeleteLocalRef(m_args5[1].l); AndroidJNI.DeleteLocalRef(m_args5[2].l); AndroidJNI.DeleteLocalRef(m_args5[3].l); AndroidJNI.DeleteLocalRef(m_args5[4].l); } catch (Exception e) { Debug.LogError("Exception while calling 'LunarConsole.OnVariableRegistered': " + e.Message); } }
public void NotifyValueChanged(CVar cvar) { try { Lock(); int elementsCount = list.Count; for (int i = 0; i < elementsCount; ++i) // do not update added items on that tick { try { list[i](cvar); } catch (Exception e) { Log.e(e, "Exception while calling value changed delegate for '{0}'", cvar.Name); } } } finally { Unlock(); } }
public void OnVariableRegistered(CRegistry registry, CVar cvar) { __lunar_console_cvar_register(cvar.Id, cvar.Name, cvar.Type.ToString(), cvar.Value, cvar.DefaultValue); }
static void NullCVarChangedDelegate(CVar cvar) { }