protected void Update()
 {
     if (this.splitGroups.Count > 0)
     {
         for (int i = 0; i < this.splitGroups.Count; i++)
         {
             SplitGroup group = this.splitGroups[i];
             if (group.elapsedTime < 1f)
             {
                 group.owner.transform.position = Vector3.Lerp(group.center, group.ownerTarget, group.elapsedTime);
                 group.clone.transform.position = Vector3.Lerp(group.center, group.cloneTarget, group.elapsedTime);
                 group.elapsedTime  += Time.deltaTime;
                 this.splitGroups[i] = group;
                 //TODO(Thompson): Test to see if "ref" keyword works.
                 //MovePosition(ref group);
                 //UpdateTime(ref group);
             }
             else
             {
                 if (!this.removeList.Contains(group))
                 {
                     this.removeList.Add(group);
                 }
             }
         }
     }
     if (this.removeList.Count > 0)
     {
         foreach (SplitGroup group in this.removeList)
         {
             if (this.splitGroups.Contains(group))
             {
                 CommonUnit unit = group.owner.GetComponent <CommonUnit>();
                 unit.EnableSelection();
                 unit.SetNotSplitting();
                 unit = group.clone.GetComponent <CommonUnit>();
                 unit.EnableSelection();
                 unit.SetNotSplitting();
                 this.splitGroups.Remove(group);
             }
         }
         this.removeList.Clear();
     }
 }
 public void UpdateTime(ref SplitGroup group)
 {
     group.elapsedTime += Time.deltaTime;
 }
 public void MovePosition(ref SplitGroup group)
 {
     group.owner.transform.position = Vector3.Lerp(group.center, group.ownerTarget, group.elapsedTime);
     group.clone.transform.position = Vector3.Lerp(group.center, group.cloneTarget, group.elapsedTime);
 }