コード例 #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
ファイル: ConfigItem.Properties.cs プロジェクト: s72785/des
        /// <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