Esempio n. 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);
        }
Esempio n. 3
0
        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);
        }