Hero.duplicateCell C# (CSharp) Method

duplicateCell() private method

private duplicateCell ( ) : void
return void
  void duplicateCell()
  {
      if(null != _lastNewCell)
      {
        Destroy (_lastNewCell);
      }
      else
      {
        ModalManager.setModal("FirstCheckpoint");
      }

      _lastNewCell = (GameObject)Instantiate(this.gameObject);

      SavedCell savedCell = (SavedCell)_lastNewCell.AddComponent<SavedCell>();
      savedCell.initialize(this, _lastCheckpoint.transform.position);

      StartCoroutine(popEffectCoroutine(savedCell));
  }