Exemple #1
0
        public bool AddProperty(ScriptProperty prop)
        {
            if (Properties.Exists(x => x.Name == prop.Name)) return false;

            Properties.Add(prop);

            return true;
        }
Exemple #2
0
        public bool AddProperty(ScriptProperty prop)
        {
            if (Properties.Exists(x => x.Name == prop.Name))
            {
                return(false);
            }

            Properties.Add(prop);

            return(true);
        }
Exemple #3
0
        private void DeclareConditionProperties(Condition c)
        {
            if (c == null || c.IsEmpty) return;

            foreach (var condition in c.Inactives)
            {
                ScriptProperty property = new ScriptProperty(condition.Flag, "bool", false);
                property.IsPublic = true;
                property.IsStatic = true;

                if (!state.Properties.Exists(x => x.Name == condition.Flag)) state.Properties.Add(property);
            }

            foreach (var condition in c.Actives)
            {
                ScriptProperty property = new ScriptProperty(condition.Flag, "bool", false);
                property.IsPublic = true;
                property.IsStatic = true;

                if (!state.Properties.Exists(x => x.Name == condition.Flag)) state.Properties.Add(property);
            }


        }