Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class ControlTurbine : MonoBehaviour {
- private bool isHere = false;
- // Use this for initialization
- void Start()
- {
- }
- // Update is called once per frame
- void Update()
- {
- }
- void OnTriggerEnter(Collider entity)
- {
- if (entity.tag == "Player")
- {
- isHere = true;
- }
- Debug.Log("The player has entered the volume");
- }
- void OnTriggerExit(Collider entity)
- {
- if (entity.tag == "Player")
- {
- isHere = false;
- }
- Debug.Log("The player has entered the volume");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement