Exemplo n.º 1
0
 public void AddUISort(UIEffectSort uiSort)
 {
     if (this.container.Contains(uiSort))
     {
         return;
     }
     this.container.Add(uiSort);
 }
 private void SetEffectParam()
 {
     if (null != this.RootGoObj)
     {
         UIEffectSort component = this.go_Effect.GetComponent <UIEffectSort>();
         component.panel = this.RootGoObj.GetComponent <UIPanel>();
         component.UpdateSortUI();
     }
 }
    private void LoadEffect(string _path)
    {
        GameObject gameObject = Resources.Load <GameObject>(_path);

        if (gameObject == null)
        {
            ClientLogger.Error(_path + " Rank Effect Path Error.");
            return;
        }
        this.effectPrefabRefBuffer = NGUITools.AddChild(base.gameObject, gameObject);
        this.effectPrefabRefBuffer.SetActive(false);
        this.renderCtrl = this.effectPrefabRefBuffer.GetComponent <UIEffectSort>();
        this.activeCtrl = this.effectPrefabRefBuffer.GetComponent <EffectDelayActive>();
    }
        public void Init(List <int> digits, int idx)
        {
            base.StopAllCoroutines();
            this.ues              = base.transform.GetComponent <UIEffectSort>();
            this.levelBG          = base.transform.parent.parent.Find("LevelBG");
            this.gpu              = base.GetComponent <_GPUParticleCtrl>();
            this.parPanel         = base.GetComponentInParent <UIPanel>();
            this.ues.panel        = this.parPanel;
            this.ues.widgetInBack = this.levelBG.GetComponent <UISprite>();
            this.oriPos           = base.transform.localPosition;
            int num = 0;

            this.sr  = base.GetComponent <SpriteRenderer>();
            this.num = (BottleSystemDigit.Num)idx;
            if (digits != null)
            {
                this.digit = digits[idx];
            }
            this.mat = (Resources.Load("Prefab/UI/Bottle/ShinedFigures" + idx) as Material);
            Sprite sprite = Resources.Load <Sprite>("Texture/MagicBottle/Shined_figures_" + this.digit);

            this.sr.sprite        = sprite;
            this.sr.material      = this.mat;
            this.tweenPos         = base.GetComponent <TweenPosition>();
            this.tweenAlp         = base.GetComponent <TweenAlpha>();
            this.tweenPos.from    = this.oriPos;
            this.tweenPos.to      = this.oriPos;
            this.tweenAlp.from    = 1f;
            this.tweenAlp.to      = 1f;
            this.tweenPos.enabled = false;
            for (int i = digits.Count - 1; i >= 0; i--)
            {
                if (digits[i] != 0)
                {
                    num = i;
                    break;
                }
            }
            base.transform.gameObject.SetActive(true);
            if (this.num > (BottleSystemDigit.Num)num)
            {
                base.transform.gameObject.SetActive(false);
            }
        }
Exemplo n.º 5
0
 public void RemoveUISort(UIEffectSort uiSort)
 {
     this.container.Remove(uiSort);
 }