Blocks are all acting correctly, bomb is acting correctly
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class DamagerBase : MonoBehaviour {
|
||||
public int value = 1;
|
||||
|
||||
void Awake() {
|
||||
StartCoroutine (DestroySelfAfter (30));
|
||||
}
|
||||
|
||||
IEnumerator DestroySelfAfter(float delay) {
|
||||
yield return new WaitForSeconds (delay);
|
||||
Destroy (gameObject);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
//shootable
|
||||
public class IceDamager : DamagerBase {
|
||||
void OnTriggerEnter2D(Collider2D collider) {
|
||||
if (collider.gameObject.GetComponent<IceDamager> () == null) { //pass through other instances of self
|
||||
Destroy (gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b0265e5d9f1a804aaa77a77754f51e0
|
||||
timeCreated: 1524281573
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user