Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class FifthKey : MonoBehaviour
- {
- private bool key = true;
- public GameObject UI;
- public GameObject FifthText;
- public GameObject Cam;
- // Use this for initialization
- void Start()
- {
- Cam = GameObject.FindWithTag("MainCamera");
- }
- void OnTriggerEnter(Collider col)
- {
- FifthText.SetActive(true);
- UI.GetComponent<FifthDoor>().CheckFifthKey();
- Cam.GetComponent<Colorful.Wiggle>().enabled = true;
- Cam.GetComponent<Colorful.DoubleVision>().enabled = true;
- Destroy(gameObject);
- }
- // Update is called once per frame
- void Update()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement