示例#1
0
 public void Init()
 {
     Value = Create <T>(nameof(Value));
     Value.IsSerialized = true;
     Point = Create <CFloat>(nameof(Point));
     Point.IsSerialized = true;
 }
        public override CVariable SetValue(object val)
        {
            this.Value = val switch
            {
                float o => o,
                CFloat cvar => cvar.Value,
                      _ => this.Value
            };

            return(this);
        }
示例#3
0
文件: CFloat.cs 项目: q4a/Wolven-kit
        public override CVariable SetValue(object val)
        {
            this.IsSerialized = true;
            this.Value        = val switch
            {
                string s => float.Parse(s),
                float o => o,
                CFloat cvar => cvar.Value,
                _ => this.Value
            };

            return(this);
        }