Пример #1
0
        }         // 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
Пример #2
0
        /// <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
Пример #3
0
        }         // 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
Пример #4
0
        }         // 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
Пример #5
0
        }         // 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