Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using UnityEngine.UI;
- public class ModifierPanel : MonoBehaviour {
- public GameObject Orienation;
- public GameObject Direction;
- public GameObject Spin;
- public GameObject Power;
- public bool UsesOrientation;
- public bool UsesDirection;
- public bool UsesSpin;
- public bool UsesPower;
- public int NumberOpened;
- // Use this for initialization
- void Start () {
- }
- // Update is called once per frame
- void Update ()
- {
- Orienation.SetActive(UsesOrientation);
- Direction.SetActive(UsesDirection);
- Spin.SetActive(UsesSpin);
- Power.SetActive(UsesPower);
- NumberOpened = 0;
- if (UsesOrientation)
- NumberOpened++;
- if (UsesDirection)
- NumberOpened++;
- if (UsesSpin)
- NumberOpened++;
- if (UsesPower)
- NumberOpened++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement