Beispiel #1
0
 public Object(UnitBuffDisplayNode.Param param)
 {
     this.paramlist.Add(param);
     this.dispType   = param.dispType;
     this.effectType = param.effectType;
     this.node       = (UnitBuffDisplayNode)null;
 }
        public void Setup(UnitBuffDisplayNode.Param param)
        {
            this.m_DispType   = param.dispType;
            this.m_EffectType = param.effectType;
            if (Object.op_Inequality((Object)this.Icon, (Object)null) && this.m_DispType != UnitBuffDisplayNode.DispType.NONE)
            {
                if (param.data != null)
                {
                    Image component = (Image)this.Icon.GetComponent <Image>();
                    if (Object.op_Inequality((Object)component, (Object)null))
                    {
                        component.set_sprite(param.data.sprite);
                        this.Icon.SetActive(true);
                    }
                }
                else
                {
                    this.Icon.SetActive(false);
                }
            }
            if (!Object.op_Inequality((Object)this.Arrows, (Object)null) || this.m_EffectType == UnitBuffDisplayNode.EffectType.NONE)
            {
                return;
            }
            string    str       = "arrow_" + this.m_EffectType.ToString().ToLower();
            Transform transform = this.Arrows.get_transform();
            int       num       = 0;

            for (int childCount = transform.get_childCount(); num < childCount; ++num)
            {
                Transform child = transform.GetChild(num);
                if (((Object)child).get_name() == str)
                {
                    ((Component)child).get_gameObject().SetActive(true);
                }
                else
                {
                    ((Component)child).get_gameObject().SetActive(false);
                }
            }
        }