Ejemplo n.º 1
0
 public void OnCollisionEnter(Collision other)
 {
     if (other.gameObject.CompareTag("Blast"))
     {
         _shot    = other.transform.GetComponent <BlastMovement>();
         _health -= _shot.damage;
         Explosion();
         //DamageCalculator();
     }
 }
Ejemplo n.º 2
0
 //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();
     }
 }
Ejemplo n.º 3
0
 private void Awake()
 {
     blastMovement  = GetComponent <BlastMovement>();
     blastTriumph   = GetComponent <BlastTriumph>();
     blastTransform = GetComponent <BlastTransform>();
 }