summaryrefslogtreecommitdiff
path: root/Assets/Scripts/BaseGroundScript.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/BaseGroundScript.cs')
-rwxr-xr-xAssets/Scripts/BaseGroundScript.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Assets/Scripts/BaseGroundScript.cs b/Assets/Scripts/BaseGroundScript.cs
new file mode 100755
index 0000000..f0ccd2b
--- /dev/null
+++ b/Assets/Scripts/BaseGroundScript.cs
@@ -0,0 +1,12 @@
+using UnityEngine;
+using System.Collections;
+
+public class BaseGroundScript : MonoBehaviour {
+
+ void OnTriggerEnter2D(Collider2D other)
+ {
+ var player = other.gameObject.GetComponentInParent<PlayerHealthScript>();
+ if(player!= null)
+ player.TakeDamage(100f);
+ }
+} \ No newline at end of file