Advertisement
Guest User

Untitled

a guest
Aug 18th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class ControlTurbine : MonoBehaviour {
  6.  
  7. private bool isHere = false;
  8.  
  9. // Use this for initialization
  10. void Start()
  11. {
  12.  
  13.  
  14. }
  15.  
  16. // Update is called once per frame
  17. void Update()
  18. {
  19.  
  20. }
  21.  
  22. void OnTriggerEnter(Collider entity)
  23. {
  24. if (entity.tag == "Player")
  25. {
  26. isHere = true;
  27.  
  28.  
  29.  
  30. }
  31. Debug.Log("The player has entered the volume");
  32. }
  33. void OnTriggerExit(Collider entity)
  34. {
  35. if (entity.tag == "Player")
  36. {
  37. isHere = false;
  38.  
  39.  
  40. }
  41. Debug.Log("The player has entered the volume");
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement