using UnityEngine;using System.Collections;
public class DeathSpot : MonoBehaviour {
{
void OnTriggerEnter( Collider hitObj )
{
if ( hitObj.tag == "Player" )
{
hitObj.gameObject.BroadcastMessage("Died");
}
}
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
This is the script we hope to use for our Methane Field. When the player enters the 'deathspot'/ methane field, their health will depleat.
No comments:
Post a Comment