Advertisement
MrKubic

Win

May 17th, 2016
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.UI;
  4.  
  5. public class Win : MonoBehaviour {
  6.     public Button A;
  7.     public Button B;
  8.  
  9.     void OnEnable(){
  10.         A.gameObject.SetActive (true);
  11.         B.gameObject.SetActive (false);
  12.     }
  13.  
  14.     void OnTriggerEnter2D(Collider2D other)
  15.     {
  16.         if(other.tag == "Player")
  17.         {
  18.             B.gameObject.SetActive(true);
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement