예제 #1
0
 public CSectorDataResource(IRed3EngineFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     box0 = new CFloat(cr2w, this, nameof(box0))
     {
         IsSerialized = true
     };
     box1 = new CFloat(cr2w, this, nameof(box1))
     {
         IsSerialized = true
     };
     box2 = new CFloat(cr2w, this, nameof(box2))
     {
         IsSerialized = true
     };
     box3 = new CFloat(cr2w, this, nameof(box3))
     {
         IsSerialized = true
     };
     box4 = new CFloat(cr2w, this, nameof(box4))
     {
         IsSerialized = true
     };
     box5 = new CFloat(cr2w, this, nameof(box5))
     {
         IsSerialized = true
     };
     pathHash = new CString(cr2w, this, nameof(pathHash))
     {
         IsSerialized = true
     };
 }
예제 #2
0
        public override CVariable SetValue(object val)
        {
            this.IsSerialized = true;
            this.Value        = val switch
            {
                string s => s,
                CString cvar => cvar.Value,
                       _ => this.Value
            };

            return(this);
        }