Ejemplo n.º 1
0
    private void SetLodBase(LOD_Base lodbase)
    {
        CustomActiveValueGreeble component = lodbase.GetComponent <CustomActiveValueGreeble>();

        if (component.Data != null && component.Index < component.Data._instancesState.Length)
        {
            base.Data  = component.Data;
            base.Index = component.Index;
            this.InitFromData();
        }
    }
    private void SetLodBase(LOD_Base lodbase)
    {
        CustomActiveValueGreeble component = lodbase.GetComponent <CustomActiveValueGreeble>();

        if (component.Data != null && component.Index < component.Data._instancesState.Length)
        {
            base.Data  = component.Data;
            base.Index = component.Index;
            bool flag = base.Data._instancesState[base.Index] < 252;
            for (int i = 0; i < this._targets.Length; i++)
            {
                bool flag2 = !flag || ((int)base.Data._instancesState[base.Index] & 1 << i) == 0;
                if (this._targets[i] && flag2 != this._targets[i].activeSelf)
                {
                    this._targets[i].SetActive(flag2);
                }
            }
        }
    }