void OnCollisionEnter2D(Collision2D _colInfo) { PPlayerHealth _player = _colInfo.collider.GetComponent <PPlayerHealth>(); if (_player != null) { _player.TakeDamage(stats.damage); //TakeDamage(999999); } }
void Awake() { playerhealth = FindObjectOfType <PPlayerHealth>(); try { healthbar = GameObject.FindGameObjectWithTag("HealthBar").GetComponent <PHealthBar>(); } catch { } }
public static void KillPlayer(PPlayerHealth player) { Destroy(player.gameObject); }
void Awake() { playerhealth = FindObjectOfType <PPlayerHealth>(); }