Пример #1
0
        public string GetVariable(string name)
        {
            PartVariable pv = variables.Find(x => x.Name == name);

            if (pv == null)
            {
                pv = new PartVariable()
                {
                    Name = name
                };
                pv.Value = name.Substring(2, name.Length - 3) + "_" + Larvae.GetId();
                variables.Add(pv);
            }

            return(pv.Value);
        }
Пример #2
0
        public string GetVariable(string name)
        {
            PartVariable pv = variables.Find(x => x.Name == name);

            if (pv == null)
            {
                pv = new PartVariable() { Name = name };
                pv.Value = name.Substring(2, name.Length - 3) + "_" + Larvae.GetId();
                variables.Add(pv);
            }

            return pv.Value;
        }