示例#1
0
        public override dynamic ValueToData(ValueElement element, string value)
        {
            float fData = actorValueEnum.ValueToData(element, value);

            byte[] bytes = BitConverter.GetBytes(fData);
            return(BitConverter.ToUInt32(bytes));
        }
示例#2
0
        public override dynamic ValueToData(ValueElement element, string value)
        {
            var n = value.IndexOf(':');

            if (n == -1)
            {
                return(0);
            }
            var fnString = value.Substring(0, n - 1);
            var mbString = value.Substring(n + 1);

            return(eventMemberEnum.ValueToData(element, mbString) << 16 +
                   eventFunctionEnum.ValueToData(element, fnString));
        }
示例#3
0
        public override dynamic ValueToData(ValueElement element, string value)
        {
            var match = valueExpr.Match(value);

            if (match == null)
            {
                return(0);
            }
            var enumData  = ctdaTypeEnum.ValueToData(element, match.Groups[1].Value);
            var flagsData = match.Groups.Count > 2
                ? ctdaTypeFlags.ValueToData(element, match.Groups[2].Value)
                : 0;

            return(enumData + flagsData);
        }