mirror of
https://github.com/ConjureETS/EscapeTheRoom.git
synced 2026-03-24 01:00:58 +00:00
27 lines
531 B
C#
27 lines
531 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class HoleScript : MonoBehaviour {
|
|
public GameObject floor;
|
|
// Use this for initialization
|
|
private GameObject player;
|
|
void Start () {
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update () {
|
|
|
|
}
|
|
|
|
void OnTriggerEnter(Collider other) {
|
|
if(other.tag == "Player")
|
|
{
|
|
print("floor ded");
|
|
other.GetComponent<Rigidbody>().AddForce(0, 50, 0);
|
|
floor.GetComponent<Collider>().enabled = false;
|
|
}
|
|
}
|
|
|
|
}
|