Esempio n. 1
0
 void Cloning.ICloneable.CopyDataTo(object targetObj, Cloning.CloneProvider provider)
 {
     Layer targetLayer = targetObj as Layer;
     targetLayer.width = this.width;
     targetLayer.height = this.height;
     targetLayer.data = this.data == null ? null : this.data.Clone() as ColorRgba[];
 }
Esempio n. 2
0
		protected override void OnCopyTo(Component target, Cloning.CloneProvider provider)
		{
			base.OnCopyTo(target, provider);
			ProfileRenderer t = target as ProfileRenderer;
			t.textReportStat		= this.textReportStat;
			t.textReportPerf		= this.textReportPerf;
			t.textReportOptions		= this.textReportOptions;
			t.drawGraphs			= this.drawGraphs;
			t.counterGraphs			= this.counterGraphs;
			t.textReportOptions		= this.textReportOptions;
			t.updateInterval		= this.updateInterval;
			t.keyToggleGraph		= this.keyToggleGraph;
			t.keyToggleTextPerf		= this.keyToggleTextPerf;
			t.keyToggleTextStat		= this.keyToggleTextStat;
		}
Esempio n. 3
0
			void ICloneExplicit.CopyDataTo(object targetObj, Cloning.CloneProvider provider)
			{
				Source newSrc = targetObj as Source;
				newSrc.sound			= this.sound;
				newSrc.looped			= this.looped;
				newSrc.paused			= this.paused;
				newSrc.volume			= this.volume;
				newSrc.pitch			= this.pitch;
				newSrc.offset			= this.offset;
				newSrc.hasBeenPlayed	= this.hasBeenPlayed;
				newSrc.instance			= null;
			}
Esempio n. 4
0
        void Cloning.ICloneable.CopyDataTo(object targetObj, Cloning.CloneProvider provider)
        {
            PrefabLink castObj = targetObj as PrefabLink;

            castObj.prefab = this.prefab;
            castObj.obj = this.obj;
            castObj.changes = null;

            if (this.changes != null)
            {
                castObj.changes = new List<VarMod>(this.changes.Count);
                for (int i = 0; i < this.changes.Count; i++)
                {
                    VarMod newVarMod = this.changes[i];
                    newVarMod.childIndex = new List<int>(newVarMod.childIndex);
                    castObj.changes.Add(newVarMod);
                }
            }
        }
Esempio n. 5
0
		void Cloning.ICloneable.CopyDataTo(object targetObj, Cloning.CloneProvider provider)
		{
			ShapeInfo targetShape = targetObj as ShapeInfo;
			this.OnCopyTo(targetShape);
		}
Esempio n. 6
0
 void Cloning.ICloneable.CopyDataTo(object targetObj, Cloning.CloneProvider provider)
 {
     JointInfo targetJoint = targetObj as JointInfo;
     this.CopyTo(targetJoint);
 }
Esempio n. 7
0
 protected override void OnCopyTo(Component target, Cloning.CloneProvider provider)
 {
     base.OnCopyTo(target, provider);
     RigidBodyRenderer t = target as RigidBodyRenderer;
     t.areaMaterial			= this.areaMaterial;
     t.outlineMaterial		= this.outlineMaterial;
     t.customAreaMaterial	= this.customAreaMaterial;
     t.customOutlineMaterial	= this.customOutlineMaterial;
     t.colorTint				= this.colorTint;
     t.offset				= this.offset;
     t.wrapTexture			= this.wrapTexture;
 }
Esempio n. 8
0
 public void StringIsClonable()
 {
     Assert.Equal("foo", Cloning.Clone("foo"));
 }
Esempio n. 9
0
 public void IntIsClonable()
 {
     Assert.Equal(42, Cloning.Clone(42));
 }