Advertisement
Guest User

reeee

a guest
Jun 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class ActivatorScript : MonoBehaviour {
  6. public GameObject activateMe;
  7. float activateDelay = 0.5f;
  8.  
  9. void Start () {
  10. activateMe.SetActive(false);
  11. }
  12.  
  13.  
  14. void Update () {
  15. if (activateDelay > 0f) {
  16. activateDelay = activateDelay - Time.deltaTime;
  17. if (activateDelay <= 0f) {
  18. activateMe.SetActive(true);
  19. }
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement