예제 #1
0
		/// <summary>Creates a new UI Batch which will be rendered with the given renderer.</summary>
		/// <param name="renderer">The renderer that will render this batch.</param>
		public UIBatch(Renderman renderer){
			
			Mesh=new DynamicMesh(this);
			
			ChangeRenderer(renderer);
			
		}
예제 #2
0
        /// <summary>Permanently destroys this UI batch.</summary>
        public void Destroy()
        {
            if (Renderer == null)
            {
                return;
            }

            if (IsolatedProperty != null)
            {
                IsolatedProperty.Isolated = false;
                IsolatedProperty.OnBatchDestroy();
                IsolatedProperty = null;
            }

            if (Mesh != null)
            {
                Mesh.Destroy();
                Mesh = null;
            }

            Renderer = null;
        }
예제 #3
0
        /// <summary>Creates a new UI Batch which will be rendered with the given renderer.</summary>
        /// <param name="renderer">The renderer that will render this batch.</param>
        public UIBatch(Renderman renderer)
        {
            Mesh = new DynamicMesh(this);

            ChangeRenderer(renderer);
        }
예제 #4
0
		/// <summary>Creates a new block that belongs to a given mesh.</summary>
		/// <param name="parentMesh">The mesh the block will belong to.</param>
		public MeshBlock(DynamicMesh parentMesh){
			ParentMesh=parentMesh;
			Colour=Color.white;
		}
예제 #5
0
 /// <summary>Sets an index in a batch. Used in paint mode.</summary>
 public void SetBatchIndex(UIBatch batch, int blockIndex)
 {
     Buffer     = null;
     Mesh       = batch.Mesh;
     BlockIndex = blockIndex;
 }
예제 #6
0
		/// <summary>Permanently destroys this UI batch.</summary>
		public void Destroy(){
			if(Renderer==null){
				return;
			}
			
			if(IsolatedProperty!=null){
				IsolatedProperty.Isolated=false;
				IsolatedProperty.OnBatchDestroy();
				IsolatedProperty=null;
			}
			
			if(Mesh!=null){
				Mesh.Destroy();
				Mesh=null;
			}
			
			Renderer=null;
		}
예제 #7
0
 /// <summary>Creates a new block that belongs to a given mesh.</summary>
 /// <param name="parentMesh">The mesh the block will belong to.</param>
 public MeshBlock(DynamicMesh parentMesh)
 {
     ParentMesh = parentMesh;
     Colour     = Color.white;
 }