public void OnCollisionEnter(Collision other) { if (other.gameObject.CompareTag("Blast")) { _shot = other.transform.GetComponent <BlastMovement>(); _health -= _shot.damage; Explosion(); //DamageCalculator(); } }
//detects what laser type and damage amount public void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("Blast")) { _shot = other.transform.GetComponent <BlastMovement>(); _health -= _shot.damage; if (!_shot.IsABombExplosion) { Destroy(_shot.gameObject); } Explosion(); //DamageCalculator(); } }
private void Awake() { blastMovement = GetComponent <BlastMovement>(); blastTriumph = GetComponent <BlastTriumph>(); blastTransform = GetComponent <BlastTransform>(); }