Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class FifthKey : MonoBehaviour
  5. {
  6.  
  7. private bool key = true;
  8. public GameObject UI;
  9. public GameObject FifthText;
  10. public GameObject Cam;
  11.  
  12. // Use this for initialization
  13. void Start()
  14. {
  15. Cam = GameObject.FindWithTag("MainCamera");
  16. }
  17.  
  18.  
  19. void OnTriggerEnter(Collider col)
  20. {
  21.  
  22. FifthText.SetActive(true);
  23. UI.GetComponent<FifthDoor>().CheckFifthKey();
  24. Cam.GetComponent<Colorful.Wiggle>().enabled = true;
  25. Cam.GetComponent<Colorful.DoubleVision>().enabled = true;
  26. Destroy(gameObject);
  27.  
  28. }
  29.  
  30.  
  31. // Update is called once per frame
  32. void Update()
  33. {
  34.  
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement