private void Die() { PlayerDeadStruct playerDeadStruct = new PlayerDeadStruct(); playerDeadStruct.layer = gameObject.layer; EventManager.Instance.PlayerDead.Invoke(playerDeadStruct); Punch.Instance.PlayPunch(); }
// Update is called once per frame void OnDead(PlayerDeadStruct pds) { if (pds.layer != gameObject.layer) { PlayerPrefs.SetInt(hashKey, PlayerPrefs.GetInt(hashKey) + 1); myScoreText.text = PlayerPrefs.GetInt(hashKey).ToString(); } }
void OnDead(PlayerDeadStruct pds) { Destroy(this); }
// Update is called once per frame void OnHit(PlayerDeadStruct pos) { SlomoHandler.Instance.StartSlomo(); StartCoroutine(OnPlaerDead()); StartCoroutine(Desaturate()); }
private void OnDead(PlayerDeadStruct psd) { GetComponent <AudioSource>().Play(); }
// Update is called once per frame void OnHit(PlayerDeadStruct pos) { cmvStandard.enabled = false; cmvClose.enabled = true; }
private void OnPlayerDead(PlayerDeadStruct pos) { this.enabled = false; }