From 115f77bda0246a00f6e17469685c67746bdbd29d Mon Sep 17 00:00:00 2001 From: nirav Date: Sat, 12 Dec 2020 07:18:36 +0000 Subject: Initial commit --- Assets/Scripts/BaseGroundScript.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 Assets/Scripts/BaseGroundScript.cs (limited to 'Assets/Scripts/BaseGroundScript.cs') 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(); + if(player!= null) + player.TakeDamage(100f); + } +} \ No newline at end of file -- cgit v1.2.3