Пример #1
0
        protected internal override void OnRemoveChild(Entity entity)
        {
            base.OnRemoveChild(entity);
            LogicParameter logicParameter = entity as LogicParameter;

            if (logicParameter != null)
            {
                this.parameters.Remove(logicParameter);
            }
        }
Пример #2
0
        public LogicParameter CreateParameter(Type type, string name)
        {
            LogicParameter logicParameter = this.GetParameterByName(name);

            if (logicParameter != null)
            {
                Log.Fatal("LogicMethod: parameter with name \"{0}\" already created", name);
                return(null);
            }
            logicParameter = (LogicParameter)Entities.Instance.Create(EntityTypes.Instance.GetByName("LogicParameter"), this);
            logicParameter.parameterType = type;
            logicParameter.parameterName = name;
            logicParameter.PostCreate();
            this.parameters.Add(logicParameter);
            return(logicParameter);
        }