Advertisement
CassataGames

Untitled

Jan 10th, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.UI;
  4.  
  5. public class ModifierPanel : MonoBehaviour {
  6.  
  7.     public GameObject Orienation;
  8.     public GameObject Direction;
  9.     public GameObject Spin;
  10.     public GameObject Power;
  11.  
  12.     public bool UsesOrientation;
  13.     public bool UsesDirection;
  14.     public bool UsesSpin;
  15.     public bool UsesPower;
  16.  
  17.     public int NumberOpened;
  18.  
  19.     // Use this for initialization
  20.     void Start () {
  21.    
  22.     }
  23.    
  24.     // Update is called once per frame
  25.     void Update ()
  26.     {
  27.         Orienation.SetActive(UsesOrientation);
  28.         Direction.SetActive(UsesDirection);
  29.         Spin.SetActive(UsesSpin);
  30.         Power.SetActive(UsesPower);
  31.  
  32.         NumberOpened = 0;
  33.         if (UsesOrientation)
  34.             NumberOpened++;
  35.         if (UsesDirection)
  36.             NumberOpened++;
  37.         if (UsesSpin)
  38.             NumberOpened++;
  39.         if (UsesPower)
  40.             NumberOpened++;
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement