void OnParticleCollision(GameObject other) { if (other.gameObject.tag == "Player") { Player pl = ht.GetComponent <Player>(); ParticlePlaying pp = ht.GetComponent <ParticlePlaying>(); if (pl.faint == false) { pl.FaintCheck(); pp.PlayParticle(); } } }
void RevivalFaint() { revivalCount += 1 * Time.deltaTime; if (revivalCount >= revivalLine) { ParticlePlaying pp = pl.GetComponent <ParticlePlaying>(); faint = false; revivalCount = 0; pp.isPlaying = false; PlayerAnim pAnim = pig.GetComponent <PlayerAnim>(); pAnim.FiantAnimOff(); rigid.velocity = Vector3.zero; } }