Three kinds of bullets are firing, bomb breaks the wall
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class DamagerBase : MonoBehaviour {
|
||||
public int value = 1;
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9df83cc686946cc4ab603daa3ea5a871
|
||||
timeCreated: 1524276968
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ExplosionDamager : DamagerBase {
|
||||
//simply causes damage and then disappears
|
||||
void Awake() {
|
||||
StartCoroutine (DestroyAfter (0.5f));
|
||||
}
|
||||
|
||||
IEnumerator DestroyAfter(float delay) {
|
||||
yield return new WaitForSeconds (delay);
|
||||
Destroy (gameObject);
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd95736c14a0eac4aa8f5d682f624d9d
|
||||
timeCreated: 1524276953
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
//shootable
|
||||
public class FireDamager : DamagerBase {
|
||||
void OnTriggerEnter2D(Collider2D collider) {
|
||||
if (collider.gameObject.GetComponent<FireDamager> () == null) { //pass through other instances of self
|
||||
Destroy (gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 310ee2a5851703045af5c47b1b760328
|
||||
timeCreated: 1524278769
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,12 @@
|
||||
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
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b0265e5d9f1a804aaa77a77754f51e0
|
||||
timeCreated: 1524281573
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
//shootable
|
||||
public class WindDamager : DamagerBase {
|
||||
void OnTriggerEnter2D(Collider2D collider) {
|
||||
if (collider.gameObject.GetComponent<WindDamager> () == null) { //pass through other instances of self
|
||||
Destroy (gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 36f760a1dbdd6254fa3dc2394e2bf8fb
|
||||
timeCreated: 1524281586
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user