void respawnCoroutine(CellControl cc) { enableEyes(true); foreach (GameObject flagellum in _flagella) { flagellum.SetActive(true); } _flagella.Clear(); iTween.ScaleTo(gameObject, _optionsIn); safeFadeTo(_optionsInAlpha); cc.enabled = true; foreach (PushableBox box in FindObjectsOfType(typeof(PushableBox))) { box.resetPos(); } MineManager.isReseting = true; SavedCell savedCell = null; if (null != _lastNewCell) { savedCell = (SavedCell)_lastNewCell.GetComponent <SavedCell>(); savedCell.resetCollisionState(); gameObject.transform.position = _lastNewCell.transform.position; gameObject.transform.rotation = _lastNewCell.transform.rotation; } _isAlive = true; cc.reset(); setLife(1f); StartCoroutine(popEffectCoroutine(savedCell)); }
void respawnCoroutine(CellControl cc) { enableEyes(true); foreach(GameObject flagellum in _flagella) { flagellum.SetActive(true); } _flagella.Clear(); iTween.ScaleTo(gameObject, _optionsIn); safeFadeTo(_optionsInAlpha); cc.enabled = true; foreach (PushableBox box in FindObjectsOfType(typeof(PushableBox))) { box.resetPos(); } MineManager.isReseting = true; SavedCell savedCell = null; if(null != _lastNewCell) { savedCell = (SavedCell)_lastNewCell.GetComponent<SavedCell>(); savedCell.resetCollisionState(); gameObject.transform.position = _lastNewCell.transform.position; gameObject.transform.rotation = _lastNewCell.transform.rotation; } _isAlive = true; cc.reset(); setLife(1f); StartCoroutine(popEffectCoroutine(savedCell)); }