コード例 #1
0
ファイル: Cell.cs プロジェクト: Hengle/cavesnez
 /// <summary>
 /// Sets the element in this cell and adds the element to the cell's table. If null, removes any current element.
 /// </summary>
 /// <returns>The element.</returns>
 /// <param name="newelement">New element.</param>
 public Cell setElement(Element newElement)
 {
     if (element != newElement)
     {
         if (element != null)
         {
             element.remove();
         }
         element = newElement;
         if (newElement != null)
         {
             table.addElement(newElement);
         }
     }
     return(this);
 }