Three kinds of bullets are firing, bomb breaks the wall
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class BlockCracked : MonoBehaviour {
|
||||
void OnCollisionEnter2D(Collision2D collision) {
|
||||
//TODO: use durability class?
|
||||
ExplosionDamager exp = collision.gameObject.GetComponent<ExplosionDamager> ();
|
||||
if (exp != null) {
|
||||
Destroy (gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user