} // func InvokeAction private DEConfigAction CompileTypeAction(string actionName) { var cac = ConfigDescriptionCache.Get(GetType()); if (cac == null) { return(DEConfigAction.Empty); } return(cac.GetConfigAction(actionName, out var ca) ? CompileTypeAction(ref ca) : DEConfigAction.Empty); } // func CompileTypeAction
/// <summary>Initialisiert die Eigenschaften, an einem Knoten.</summary> private void InitTypeProperties() { valueChangedHandler = ValueChangedHandler; var cdc = ConfigDescriptionCache.Get(GetType()); if (cdc != null) { foreach (var pi in cdc.Properties) { RegisterProperty(new ConfigItemProperty(this, pi)); } } } // proc InitTypeProperties
} // proc AttachedScriptCompiled /// <summary>Sammelt alle für diesen Knoten vorhande Aktionen.</summary> protected virtual void CollectActions() { // Suche alle Type Actions CompileTypeActions(ConfigDescriptionCache.Get(GetType())); // Suche alle Lua Actions var table = GetActionTable(); if (table != null) { foreach (var c in table) { if (c.Key is string actionId && !actions.Contains(actionId)) { actions[actionId] = CompileLuaAction(actionId, c.Value as LuaTable); } } } } // proc CollectActions
} // func InvokeAction private DEConfigAction CompileTypeAction(string sAction) { ConfigDescriptionCache cac = ConfigDescriptionCache.Get(GetType()); if (cac == null) { return(DEConfigAction.Empty); } ConfigAction ca; if (cac.GetConfigAction(sAction, out ca)) { return(CompileTypeAction(ref ca)); } else { return(DEConfigAction.Empty); } } // func CompileTypeAction
} // proc AttachedScriptCompiled /// <summary>Sammelt alle für diesen Knoten vorhande Aktionen.</summary> protected virtual void CollectActions() { // Suche alle Type Actions CompileTypeActions(ConfigDescriptionCache.Get(GetType())); // Suche alle Lua Actions var table = GetActionTable(); if (table != null) { foreach (var c in table) { string sAction = c.Key as string; if (sAction == null || actions.Contains(sAction)) { continue; } actions[sAction] = CompileLuaAction(sAction, c.Value as LuaTable); } } } // proc CollectActions