1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- using UnityEngine;
- public class UIWFHitMasks : MonoBehaviour
- {
- public void Start()
- {
- UIWidget component = base.GetComponent<UIWidget>();
- if (component != null)
- {
- foreach (BoxCollider boxCollider in this.Masks)
- {
- if (!(boxCollider == null))
- {
- UIWidget component2 = boxCollider.gameObject.GetComponent<UIWidget>();
- if (component2 != null)
- {
- component2.depth = component.depth;
- }
- }
- }
- }
- }
- public new bool enabled
- {
- get
- {
- return this.enabled_;
- }
- set
- {
- this.enabled_ = value;
- if (this.Masks != null)
- {
- for (int i = 0; i < this.Masks.Length; i++)
- {
- if (this.Masks[i] != null)
- {
- this.Masks[i].enabled = this.enabled_;
- }
- }
- }
- }
- }
- public BoxCollider[] Masks;
- private bool enabled_;
- }
|