示例#1
0
 public override string EncodeValues(plyVar wrapper)
 {
     if (this._baseType != null && this._plyVarType != null)
     {
         this.baseTypeName   = this._baseType.AssemblyQualifiedName;
         this.plyVarTypeName = this._plyVarType.AssemblyQualifiedName;
         if (typeof(UnityEngine.Object).IsAssignableFrom(this._baseType))
         {
             this.storedEntriesData = new string[0];
         }
         else
         {
             this.storedEntriesData = new string[this.variables.Count];
             for (int i = 0; i < this.variables.Count; i++)
             {
                 this.storedEntriesData[i] = this.variables[i].ValueHandler.EncodeValues(wrapper);
             }
         }
         return(base.EncodeValues(wrapper));
     }
     Debug.LogError("The List's generic type or plyVar type was not set.");
     return("");
 }
示例#2
0
 public override void SetValue(plyVar wrapper, object v)
 {
     if (v == null)
     {
         throw new Exception("Can't convert null to Color32.");
     }
     if (v.GetType() == typeof(Color32))
     {
         this.storedValue = (Color32)v;
     }
     else if (v.GetType() == typeof(Color))
     {
         this.storedValue = (Color)v;
     }
     else
     {
         if (v.GetType() != typeof(Vector4))
         {
             throw new Exception("Can't convert " + v.GetType().Name + " to Color32.");
         }
         this.storedValue = (Color32)v;
     }
 }
示例#3
0
 public override void SetValue(plyVar wrapper, object v)
 {
     if (v == null)
     {
         throw new Exception("Can't convert null to Vector2.");
     }
     if (v.GetType() == typeof(Vector2))
     {
         this.storedValue = (Vector2)v;
         return;
     }
     if (v.GetType() == typeof(Vector3))
     {
         this.storedValue = (Vector3)v;
         return;
     }
     if (v.GetType() == typeof(Vector4))
     {
         this.storedValue = (Vector4)v;
         return;
     }
     throw new Exception("Can't convert " + v.GetType().Name + " to Vector2.");
 }
示例#4
0
 public override object GetValue(plyVar wrapper)
 {
     return(this.list);
 }
 public virtual void DecodeValues(plyVar wrapper, string data)
 {
     JsonUtility.FromJsonOverwrite(data, this);
 }
示例#6
0
 public override void ClearValue(plyVar wrapper)
 {
     this.storedValue = Color.black;
 }
 public override string EncodeValues(plyVar wrapper)
 {
     this.cachedWrapper = wrapper;
     return("");
 }
示例#8
0
 public override void ClearValue(plyVar wrapper)
 {
     this.cachedWrapper = wrapper;
     wrapper.objRefs    = null;
 }
示例#9
0
 public override void ClearValue(plyVar wrapper)
 {
     this.storedValue = Vector3.zero;
 }
示例#10
0
 public override string EncodeValues(plyVar wrapper)
 {
     this.cachedWrapper  = wrapper;
     this.storedTypeName = this.objectType.AssemblyQualifiedName;
     return(base.EncodeValues(wrapper));
 }
示例#11
0
 public override void SetValue(plyVar wrapper, object v)
 {
     this.storedValue = v;
 }
示例#12
0
 public override void ClearValue(plyVar wrapper)
 {
     this.storedValue = new AnimationCurve();
 }
示例#13
0
 public override void ClearValue(plyVar wrapper)
 {
     this.storedEntriesDataData = null;
     this.arr = ((this._baseType == null) ? null : Array.CreateInstance(this._baseType, 0));
 }
示例#14
0
 public override void ClearValue(plyVar wrapper)
 {
     this.storedValue = Quaternion.identity;
 }
示例#15
0
 public override void ClearValue(plyVar wrapper)
 {
     this.storedValue = "";
 }
示例#16
0
 public override void ClearValue(plyVar wrapper)
 {
     this.storedValue = new Gradient();
 }
示例#17
0
 public virtual object GetValue(plyVar wrapper)
 {
     return(null);
 }
示例#18
0
 public override object GetValue(plyVar wrapper)
 {
     return(this.storedValue);
 }
示例#19
0
 public virtual void SetValue(plyVar wrapper, object v)
 {
 }
示例#20
0
 public override void ClearValue(plyVar wrapper)
 {
     this.storedValue = default(Color32);
 }
示例#21
0
 public virtual string EncodeValues(plyVar wrapper)
 {
     return(JsonUtility.ToJson(this));
 }
示例#22
0
 public override void DecodeValues(plyVar wrapper, string data)
 {
     this.cachedWrapper = wrapper;
 }
示例#23
0
 public virtual void ClearValue(plyVar wrapper)
 {
 }