public virtual void OnEvent(ClearGameEvent clearGameEvent) { Debug.Log("game clear!!"); BgmManager.Instance.Play(_stage1Clearbgm, true); _player.transform.GetComponent <PlayerAnimController>().StartToGoToStair(); Pause(); }
protected override IEnumerator DestoySelf(bool isHitted = false, float duration = 1f) { _isAlive = false; _boxColider.isTrigger = true; this.GetComponent <SpriteRenderer>().enabled = false; if (isHitted) { _scoreText.gameObject.SetActive(true); yield return(new WaitForSeconds(duration)); _scoreText.gameObject.SetActive(false); } yield return(new WaitForSeconds(2)); Destroy(this.gameObject); GameManager._totalEnemyCount -= 1; ClearGameEvent.Trigger(); Debug.Log("Call Game clear"); //LoadingSceneManager.LoadScene("공대관"); }