Advertisement
Guest User

Untitled

a guest
May 29th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class a : MonoBehaviour
  6. {
  7.     public GameObject ob;
  8.     public bool isShowing = false;
  9.     public void Start()
  10.     {
  11.         ob.SetActive(isShowing);
  12.     }
  13.    public void pdate()
  14.     {
  15.      
  16.             isShowing = !isShowing;
  17.             ob.SetActive(isShowing);
  18.             print("space key is being held down");
  19.         }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement