Exemplo n.º 1
0
        public object Clone()
        {
            ConcretePrototype pNewObj = new ConcretePrototype();

            pNewObj.Name = this.Name;
            return(pNewObj);
        }
Exemplo n.º 2
0
	void UnitTest () {

		// 原始物件
		ConcretePrototype Obj =new ConcretePrototype();
		Obj.Name = "ConcreteObj1";

		// 複製物件
		ConcretePrototype CloneObj = Obj.Clone() as ConcretePrototype;

		// 顯示
		Debug.Log("原始物件:"+Obj.Name);
		Debug.Log("複製物件:"+CloneObj.Name);

	
	}
Exemplo n.º 3
0
		public object Clone()
		{
			ConcretePrototype pNewObj = new ConcretePrototype();
			pNewObj.Name = this.Name;
			return pNewObj;
		}