Wind blows over gaps

This commit is contained in:
2018-04-21 15:03:13 +10:00
parent ed67e81098
commit 7d10afcbf9
7 changed files with 176 additions and 1 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ using UnityEngine;
//shootable
public class WindDamager : DamagerBase {
void OnTriggerEnter2D(Collider2D collider) {
if (collider.gameObject.GetComponent<WindDamager> () == null) { //pass through other instances of self
if (collider.gameObject.GetComponent<WindDamager> () == null && collider.gameObject.GetComponent<BlockGap> () == null) {
Destroy (gameObject);
}
}