Exemplo n.º 1
0
 void PlayGridEffect()
 {
     if ((mItemTex.enabled == true && mItemTex.mainTexture != null) || (mItemspr.enabled == true && mItemspr.spriteName != "Null"))
     {
         GameObject obj = GameObject.Instantiate(UIGridEffectPrefab) as GameObject;
         obj.transform.parent        = this.transform.parent;
         obj.transform.localPosition = new Vector3(transform.localPosition.x, transform.localPosition.y, -5);
         obj.transform.localScale    = new Vector3(48, 48, 1);
         effect = obj.GetComponentInChildren <PeUIEffect.UIGridEffect>();
         if (effect != null)
         {
             effect.e_OnEnd += EffectEnd;
         }
     }
 }
Exemplo n.º 2
0
    public void PlayGridEffect()
    {
        if (gridEffectPrefab == null)
        {
            return;
        }
        if (_effectGo != null)
        {
            Destroy(_effectGo);
            effect = null;
        }

        _effectGo = GameObject.Instantiate(gridEffectPrefab) as GameObject;
        _effectGo.transform.parent        = this.transform.parent;
        _effectGo.transform.localPosition = new Vector3(transform.localPosition.x, transform.localPosition.y, -5);
        _effectGo.transform.localScale    = new Vector3(48, 48, 1);
        effect = _effectGo.GetComponentInChildren <PeUIEffect.UIGridEffect>();
        if (effect != null)
        {
            effect.e_OnEnd += EffectEnd;
        }
    }
Exemplo n.º 3
0
 void EffectEnd(PeUIEffect.UIEffect _effect)
 {
     effect = null;
 }