示例#1
0
 private void ShowCredit(WWWItem _item, object _param)
 {
     Main_UI_SystemMessage.CloseUI();
     if (this == null)
     {
         return;
     }
     if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset)
     {
         GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;
         if (null != gameObject)
         {
             this.rootGameObject = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
             if (this == null)
             {
                 UnityEngine.Object.DestroyImmediate(this.rootGameObject);
                 return;
             }
             Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
             Vector3 effectUIPos = base.GetEffectUIPos(screenPos);
             effectUIPos.z = 90f;
             this.rootGameObject.transform.position = effectUIPos;
             NkUtil.SetAllChildLayer(this.rootGameObject, GUICamera.UILayer);
             this.childGameObject = NkUtil.GetChild(this.rootGameObject.transform, "fx_ending").gameObject;
             if (TsPlatform.IsMobile && TsPlatform.IsEditor)
             {
                 NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.rootGameObject);
             }
         }
     }
 }
    private void NewRecordEffectPlay(WWWItem _item, object _param)
    {
        if (_item.GetSafeBundle() == null || _item.GetSafeBundle().mainAsset == null)
        {
            Debug.LogError("ERROR, Battle_MythRaidBattleInfo_DLG.cs, NewRecordEffectPlay(), _item.GetSafeBundle() is Null ");
            return;
        }
        GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;

        if (gameObject == null)
        {
            return;
        }
        GameObject gameObject2 = UnityEngine.Object.Instantiate(gameObject) as GameObject;
        Vector2    screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
        Vector3    effectUIPos = base.GetEffectUIPos(screenPos);

        effectUIPos.z = 500f;
        gameObject2.transform.position = effectUIPos;
        NkUtil.SetAllChildLayer(gameObject2, GUICamera.UILayer);
        if (TsPlatform.IsMobile && TsPlatform.IsEditor)
        {
            NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref gameObject2);
        }
    }
示例#3
0
    private Texture2D SaveBundleImage(WWWItem item, object param)
    {
        if (item.GetSafeBundle() == null || item.GetSafeBundle().mainAsset == null)
        {
            return(null);
        }
        if (item.GetSafeBundle().mainAsset == null)
        {
            return(null);
        }
        Texture2D texture2D = item.GetSafeBundle().mainAsset as Texture2D;

        if (texture2D == null)
        {
            return(null);
        }
        if (!(param is string))
        {
            return(null);
        }
        string imageKey = (string)param;

        if (NrTSingleton <UIImageBundleManager> .Instance.GetTexture(imageKey) == null)
        {
            NrTSingleton <UIImageBundleManager> .Instance.AddTexture(imageKey, texture2D);
        }
        return(texture2D);
    }
示例#4
0
    private void SetBackImage(WWWItem _item, object _param)
    {
        if (null == _item.GetSafeBundle())
        {
            return;
        }
        if (null == _item.GetSafeBundle().mainAsset)
        {
            return;
        }
        GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;

        if (null != gameObject)
        {
            this.m_rootGameObject     = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
            this.m_rootGameObject.tag = NrTSingleton <UIDataManager> .Instance.UIBundleTag;
            Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
            Vector3 effectUIPos = base.GetEffectUIPos(screenPos);
            effectUIPos.z = 300f;
            this.m_rootGameObject.transform.position = effectUIPos;
            NkUtil.SetAllChildLayer(this.m_rootGameObject, GUICamera.UILayer);
            this.m_goldenEgg = NkUtil.GetChild(this.m_rootGameObject.transform, "fx_goldegg").gameObject;
            this.m_whiiteEgg = NkUtil.GetChild(this.m_rootGameObject.transform, "fx_whiteegg").gameObject;
            if (TsPlatform.IsMobile && TsPlatform.IsEditor)
            {
                NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_rootGameObject);
            }
        }
    }
示例#5
0
 private void Effect_Fade(WWWItem _item, object _param)
 {
     if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset)
     {
         GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;
         if (null != gameObject)
         {
             this.m_gbEffect_Fade = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
             if (this == null)
             {
                 UnityEngine.Object.DestroyImmediate(this.m_gbEffect_Fade);
                 return;
             }
             Vector2 size = this.m_DrawTexture_Main_BG.GetSize();
             this.m_gbEffect_Fade.transform.parent        = this.m_DrawTexture_Main_BG.gameObject.transform;
             this.m_gbEffect_Fade.transform.localPosition = new Vector3(size.x / 2f, -size.y / 2f, this.m_DrawTexture_Main_BG.gameObject.transform.localPosition.z - 0.1f);
             NkUtil.SetAllChildLayer(this.m_gbEffect_Fade, GUICamera.UILayer);
             this.m_gbEffect_Fade.SetActive(false);
             if (TsPlatform.IsMobile && TsPlatform.IsEditor)
             {
                 NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_gbEffect_Fade);
             }
         }
     }
 }
 private void SolComposeSuccess(WWWItem _item, object _param)
 {
     Main_UI_SystemMessage.CloseUI();
     if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset)
     {
         GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;
         if (null != gameObject)
         {
             this.rootGameObject = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
             if (null == this.rootGameObject)
             {
                 return;
             }
             Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
             Vector3 effectUIPos = base.GetEffectUIPos(screenPos);
             effectUIPos.z = 300f;
             this.rootGameObject.transform.position = effectUIPos;
             NkUtil.SetAllChildLayer(this.rootGameObject, GUICamera.UILayer);
             this.aniGameObject = this.rootGameObject.GetComponentInChildren <Animation>();
             if (null == this.aniGameObject)
             {
                 return;
             }
             this.bUpdate   = true;
             this.startTime = Time.realtimeSinceStartup;
             if (TsPlatform.IsMobile && TsPlatform.IsEditor)
             {
                 NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.rootGameObject);
             }
             this.Show();
         }
     }
 }
示例#7
0
 private void SetActionReforge(WWWItem _item, object _param)
 {
     Main_UI_SystemMessage.CloseUI();
     if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset)
     {
         GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;
         if (null != gameObject)
         {
             this.rootGameObject = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
             Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
             Vector3 effectUIPos = base.GetEffectUIPos(screenPos);
             effectUIPos.z = 300f;
             this.rootGameObject.transform.position = effectUIPos;
             NkUtil.SetAllChildLayer(this.rootGameObject, GUICamera.UILayer);
             base.InteractivePanel.MakeChild(this.rootGameObject);
             this.aniGameObject      = this.rootGameObject.GetComponentInChildren <Animation>();
             this.bLoadActionReforge = true;
             if (TsPlatform.IsMobile && TsPlatform.IsEditor)
             {
                 NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.rootGameObject);
             }
             TsAudio.StoreMuteAllAudio();
             TsAudio.SetExceptMuteAllAudio(EAudioType.UI, true);
             TsAudio.RefreshAllMuteAudio();
             NkInputManager.IsInputMode = false;
         }
     }
 }
    public static void CharPortraitBundleCallback(WWWItem item, object param)
    {
        if (item.isCanceled)
        {
            return;
        }
        if (item.GetSafeBundle() == null)
        {
            return;
        }
        Texture2D texture2D = item.GetSafeBundle().mainAsset as Texture2D;

        if (texture2D == null)
        {
            return;
        }
        object[] array = param as object[];
        if (array == null || array.Length != 2)
        {
            Debug.Log("NORMAL, NkUtil.cs, CharPortraitBundleCallback(). parameters is strange");
            return;
        }
        NkUtil.RequestCharPortraitCallback requestCharPortraitCallback = array[0] as NkUtil.RequestCharPortraitCallback;
        if (requestCharPortraitCallback != null)
        {
            requestCharPortraitCallback(texture2D);
        }
        string text = array[1] as string;

        if (!string.IsNullOrEmpty(text))
        {
            NrTSingleton <UIImageBundleManager> .Instance.AddTexture(text, texture2D);
        }
    }
示例#9
0
 private void EquipItem(WWWItem _item, object _param)
 {
     Main_UI_SystemMessage.CloseUI();
     if (this == null)
     {
         return;
     }
     if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset)
     {
         GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;
         if (null != gameObject)
         {
             this.m_RootObject     = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
             this.m_RootObject.tag = NrTSingleton <UIDataManager> .Instance.UIBundleTag;
             if (this == null)
             {
                 UnityEngine.Object.Destroy(this.m_RootObject);
                 return;
             }
             this.m_AniObject = NkUtil.GetChild(this.m_RootObject.transform, "fx_direct_weapon").gameObject;
             Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
             Vector3 effectUIPos = base.GetEffectUIPos(screenPos);
             effectUIPos.z = 100f;
             this.m_RootObject.transform.position = effectUIPos;
             NkUtil.SetAllChildLayer(this.m_RootObject, GUICamera.UILayer);
             this.m_fStartTime = Time.realtimeSinceStartup;
             if (TsPlatform.IsMobile && TsPlatform.IsEditor)
             {
                 NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_RootObject);
             }
         }
     }
 }
示例#10
0
    private void Effect_Set(WWWItem _item, object _param)
    {
        AutoSpriteControlBase autoSpriteControlBase = _param as AutoSpriteControlBase;

        if (null != _item.GetSafeBundle() && autoSpriteControlBase != null && autoSpriteControlBase.gameObject != null && null != _item.GetSafeBundle().mainAsset)
        {
            GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;
            if (null != gameObject)
            {
                this.m_gbEffect_Set = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
                if (this == null)
                {
                    UnityEngine.Object.DestroyImmediate(this.m_gbEffect_Set);
                    return;
                }
                Vector2 size = autoSpriteControlBase.GetSize();
                this.m_gbEffect_Set.transform.parent        = autoSpriteControlBase.gameObject.transform;
                this.m_gbEffect_Set.transform.localPosition = new Vector3(size.x / 2f, -size.y / 2f, autoSpriteControlBase.gameObject.transform.localPosition.z + 1.05f);
                NkUtil.SetAllChildLayer(this.m_gbEffect_Set, GUICamera.UILayer);
                this.m_gbEffect_Set.SetActive(true);
                if (TsPlatform.IsMobile && TsPlatform.IsEditor)
                {
                    NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_gbEffect_Set);
                }
            }
        }
    }
示例#11
0
    private void Effect_Wakeup_Change(WWWItem _item, object _param)
    {
        if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset)
        {
            GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;
            if (null != gameObject)
            {
                this.m_gbWakeup_Change_1 = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
                this.m_gbWakeup_Change_2 = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
                this.m_gbWakeup_Change_3 = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
                if (this == null)
                {
                    UnityEngine.Object.DestroyImmediate(this.m_gbWakeup_Change_1);
                    UnityEngine.Object.DestroyImmediate(this.m_gbWakeup_Change_2);
                    UnityEngine.Object.DestroyImmediate(this.m_gbWakeup_Change_3);
                    return;
                }
                NkUtil.SetAllChildLayer(this.m_gbWakeup_Change_1, GUICamera.UILayer);
                NkUtil.SetAllChildLayer(this.m_gbWakeup_Change_2, GUICamera.UILayer);
                NkUtil.SetAllChildLayer(this.m_gbWakeup_Change_3, GUICamera.UILayer);
                this.m_gbWakeup_Change_1.SetActive(false);
                this.m_gbWakeup_Change_2.SetActive(false);
                this.m_gbWakeup_Change_3.SetActive(false);
                if (TsPlatform.IsMobile && TsPlatform.IsEditor)
                {
                    NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_gbWakeup_Change_1);

                    NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_gbWakeup_Change_2);

                    NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_gbWakeup_Change_3);
                }
            }
        }
    }
    private void SetBundleImage(WWWItem _item, object _param)
    {
        if (_item.GetSafeBundle() == null)
        {
            return;
        }
        if (_item.GetSafeBundle().mainAsset == null)
        {
            return;
        }
        Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D;

        if (texture2D == null)
        {
            return;
        }
        string imageKey = string.Empty;

        if (_param is string)
        {
            imageKey = (string)_param;
            NrTSingleton <UIImageBundleManager> .Instance.AddTexture(imageKey, texture2D);

            for (int i = 0; i < this.solSettingList.Count; i++)
            {
                this.solSettingList[i].TextureLoaded(imageKey);
            }
        }
    }
示例#13
0
 private void Effect_Wakeup_Text(WWWItem _item, object _param)
 {
     if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset)
     {
         GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;
         if (null != gameObject)
         {
             this.m_gbWakeup_Text = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
             if (this == null)
             {
                 UnityEngine.Object.DestroyImmediate(this.m_gbWakeup_Text);
                 return;
             }
             Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
             Vector3 effectUIPos = base.GetEffectUIPos(screenPos);
             this.m_gbWakeup_Text.transform.position = effectUIPos;
             NkUtil.SetAllChildLayer(this.m_gbWakeup_Text, GUICamera.UILayer);
             this.m_gbWakeup_Text.SetActive(false);
             if (TsPlatform.IsMobile && TsPlatform.IsEditor)
             {
                 NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_gbWakeup_Text);
             }
         }
     }
 }
示例#14
0
        private void SetImage(WWWItem _item, object _param)
        {
            if (null == this)
            {
                return;
            }
            if (_item.isCanceled)
            {
                this.reserve = true;
                return;
            }
            if (_item.GetSafeBundle() != null)
            {
                Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D;
                if (null != texture2D)
                {
                    base.SetTexture(texture2D);
                    string text = string.Empty;
                    if (_param is string)
                    {
                        text = (string)_param;
                        NrTSingleton <UIImageBundleManager> .Instance.AddTexture(text, texture2D);

                        return;
                    }
                }
            }
            this.reserve = true;
        }
示例#15
0
    private void SetImage(WWWItem _item, object _param)
    {
        if (this == null)
        {
            return;
        }
        if (_item.isCanceled)
        {
            return;
        }
        if (_item.GetSafeBundle() != null)
        {
            Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D;
            if (null != texture2D)
            {
                this.m_DtSoldierImg.SetTexture(texture2D);
                string imageKey = string.Empty;
                if (_param is string)
                {
                    imageKey = (string)_param;
                    NrTSingleton <UIImageBundleManager> .Instance.AddTexture(imageKey, texture2D);

                    return;
                }
            }
        }
    }
 private void SetBundleImage(WWWItem _item, object _param)
 {
     if (_item.GetSafeBundle() != null)
     {
         if (null != _item.GetSafeBundle().mainAsset)
         {
             Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D;
             if (null != texture2D)
             {
                 string imageKey = string.Empty;
                 if (_param is string)
                 {
                     imageKey = (string)_param;
                     NrTSingleton <UIImageBundleManager> .Instance.AddTexture(imageKey, texture2D);
                 }
             }
         }
     }
     else if (this.m_goSummonEffect != null)
     {
         UnityEngine.Object.Destroy(this.m_goSummonEffect);
         this.m_goSummonEffect = null;
         this.m_fSummonEndTime = 0f;
     }
 }
    private void SolRecruitSuccess(WWWItem _item, object _param)
    {
        Main_UI_SystemMessage.CloseUI();
        if (this == null)
        {
            return;
        }
        if (null == _item.GetSafeBundle())
        {
            return;
        }
        if (null == _item.GetSafeBundle().mainAsset)
        {
            return;
        }
        GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;

        if (null == gameObject)
        {
            return;
        }
        this.rootGameObject     = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
        this.rootGameObject.tag = NrTSingleton <UIDataManager> .Instance.UIBundleTag;
        if (this == null)
        {
            UnityEngine.Object.DestroyImmediate(this.rootGameObject);
            return;
        }
        Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
        Vector3 effectUIPos = base.GetEffectUIPos(screenPos);

        effectUIPos.z = 300f;
        this.rootGameObject.transform.position = effectUIPos;
        NkUtil.SetAllChildLayer(this.rootGameObject, GUICamera.UILayer);
        if (TsPlatform.IsMobile && TsPlatform.IsEditor)
        {
            NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.rootGameObject);
        }
        Animation[] componentsInChildren = this.rootGameObject.GetComponentsInChildren <Animation>();
        Animation[] array = componentsInChildren;
        for (int i = 0; i < array.Length; i++)
        {
            Animation animation = array[i];
            if (animation != null && animation.cullingType != AnimationCullingType.AlwaysAnimate)
            {
                animation.cullingType = AnimationCullingType.AlwaysAnimate;
            }
        }
        this.baseAnimation = componentsInChildren[0];
        this.Show();
        this.SettingImages(this.rootGameObject.transform.FindChild("fx_direct_hire_renewal"));
    }
示例#18
0
    private void SolRecruitDummySuccess(WWWItem _item, object _param)
    {
        Main_UI_SystemMessage.CloseUI();
        if (this == null)
        {
            return;
        }
        if (_item.GetSafeBundle() == null || _item.GetSafeBundle().mainAsset == null)
        {
            return;
        }
        GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;

        if (gameObject == null)
        {
            return;
        }
        this._directionObj     = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
        this._directionObj.tag = NrTSingleton <UIDataManager> .Instance.UIBundleTag;
        Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
        Vector3 effectUIPos = base.GetEffectUIPos(screenPos);

        effectUIPos.z = base.InteractivePanel.transform.position.z - 10f;
        this._directionObj.transform.position = effectUIPos;
        NkUtil.SetAllChildLayer(this._directionObj, GUICamera.UILayer);
        GameObject gameObject2 = NkUtil.GetChild(this._directionObj.transform, "fx_direct_dragonhero").gameObject;

        if (gameObject2 != null)
        {
            gameObject2.SetActive(true);
        }
        if (TsPlatform.IsMobile && TsPlatform.IsEditor)
        {
            NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this._directionObj);
        }
        Animation[] componentsInChildren = this._directionObj.GetComponentsInChildren <Animation>();
        Animation[] array = componentsInChildren;
        for (int i = 0; i < array.Length; i++)
        {
            Animation animation = array[i];
            if (!(animation == null))
            {
                if (animation.cullingType != AnimationCullingType.AlwaysAnimate)
                {
                    animation.cullingType = AnimationCullingType.AlwaysAnimate;
                }
            }
        }
        this.CreateCloseButton();
        this.SetDirectionDummySoldier();
    }
    private void PlayAni(WWWItem _item, object _param)
    {
        Main_UI_SystemMessage.CloseUI();
        if (this == null)
        {
            return;
        }
        if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset)
        {
            GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;
            if (null != gameObject)
            {
                this.m_goPlayAni = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
                if (this == null)
                {
                    UnityEngine.Object.DestroyImmediate(this.m_goPlayAni);
                    return;
                }
                Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
                Vector3 effectUIPos = base.GetEffectUIPos(screenPos);
                effectUIPos.z = 300f;
                this.m_goPlayAni.transform.position = effectUIPos;
                NkUtil.SetAllChildLayer(this.m_goPlayAni, GUICamera.UILayer);
                this.m_goAnimation   = NkUtil.GetChild(this.m_goPlayAni.transform, "fx_dungeon").gameObject;
                this.m_goBackTexture = NkUtil.GetChild(this.m_goPlayAni.transform, "fx_plan_background").gameObject;
                if (this.m_goBackTexture != null && !string.IsNullOrEmpty(this.m_szBackImage))
                {
                    Texture2D texture = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_szBackImage);

                    if (texture == null)
                    {
                        NrTSingleton <UIImageBundleManager> .Instance.RequestBundleImage(this.m_szBackImage, new PostProcPerItem(this.SetBundleImage));
                    }
                    else
                    {
                        Renderer component = this.m_goBackTexture.GetComponent <Renderer>();
                        if (component != null)
                        {
                            component.material.mainTexture = texture;
                        }
                    }
                }
                this.m_goPlayAni.SetActive(false);
                if (TsPlatform.IsMobile && TsPlatform.IsEditor)
                {
                    NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_goPlayAni);
                }
            }
        }
    }
示例#20
0
 private void EffectLoad(WWWItem _item, object _param)
 {
     if (!NrTSingleton <FormsManager> .Instance.IsForm(G_ID.CHARCHANGEMAIN_DLG))
     {
         return;
     }
     if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset)
     {
         GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;
         if (null != gameObject)
         {
             this.m_gbEffect = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
         }
     }
 }
示例#21
0
 private void SetBundleImage(WWWItem _item, object _param)
 {
     if (_item.GetSafeBundle() != null && null != _item.GetSafeBundle().mainAsset)
     {
         Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D;
         if (null != texture2D)
         {
             string imageKey = string.Empty;
             if (_param is string)
             {
                 imageKey = (string)_param;
                 NrTSingleton <UIImageBundleManager> .Instance.AddTexture(imageKey, texture2D);
             }
         }
     }
 }
示例#22
0
    private void SetImage(WWWItem _item, object _param)
    {
        if (_item.GetSafeBundle() == null)
        {
            return;
        }
        if (_item.GetSafeBundle().mainAsset == null)
        {
            return;
        }
        Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D;

        if (texture2D != null && _param is ItemTexture)
        {
            ItemTexture itemTexture = _param as ItemTexture;
            itemTexture.SetTexture(texture2D);
        }
    }
 private void SetBackImage(WWWItem _item, object _param)
 {
     if (_item.GetSafeBundle() != null && null != _item.GetSafeBundle().mainAsset)
     {
         Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D;
         if (null != texture2D)
         {
             this.bgImage.SetSize(GUICamera.width, GUICamera.height);
             this.bgImage.SetTexture(texture2D);
             string imageKey = string.Empty;
             if (_param is string)
             {
                 imageKey = (string)_param;
                 NrTSingleton <UIImageBundleManager> .Instance.AddTexture(imageKey, texture2D);
             }
         }
     }
 }
 public void SetBG(WWWItem _item, object _param)
 {
     if (this == null)
     {
         return;
     }
     if (_item.isCanceled)
     {
         return;
     }
     if (_item.GetSafeBundle() != null && null != _item.GetSafeBundle().mainAsset)
     {
         Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D;
         if (null != texture2D)
         {
             this.Drawtexture_DTBG03.SetTexture(texture2D);
         }
     }
 }
 public void SetBG(WWWItem _item, object _param)
 {
     if (this == null)
     {
         return;
     }
     if (_item.isCanceled)
     {
         return;
     }
     if (_item.GetSafeBundle() != null && null != _item.GetSafeBundle().mainAsset)
     {
         Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D;
         if (null != texture2D)
         {
             this.bgImage.SetSize(GUICamera.width, GUICamera.height);
             this.bgImage.SetTexture(texture2D);
         }
     }
 }
 private void SolComposeExtractResult(WWWItem _item, object _param)
 {
     Main_UI_SystemMessage.CloseUI();
     if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset)
     {
         GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;
         if (null != gameObject)
         {
             this.ExtractResultrootGameObject = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
             if (null == this.ExtractResultrootGameObject)
             {
                 return;
             }
             Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
             Vector3 effectUIPos = base.GetEffectUIPos(screenPos);
             effectUIPos.z = 300f;
             this.ExtractResultrootGameObject.transform.position = effectUIPos;
             NkUtil.SetAllChildLayer(this.ExtractResultrootGameObject, GUICamera.UILayer);
             this.SetExtractBundlePlay();
         }
     }
 }
    private void SetBundleImage(WWWItem _item, object _param)
    {
        if (_item.GetSafeBundle() != null && null != _item.GetSafeBundle().mainAsset)
        {
            Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D;
            if (null != texture2D)
            {
                string imageKey = string.Empty;
                if (_param is string)
                {
                    imageKey = (string)_param;
                    NrTSingleton <UIImageBundleManager> .Instance.AddTexture(imageKey, texture2D);

                    Renderer component = this.m_goBackTexture.GetComponent <Renderer>();
                    if (component != null)
                    {
                        component.material.mainTexture = texture2D;
                    }
                }
            }
        }
    }
 private void SolRecruitSuccess(WWWItem _item, object _param)
 {
     Main_UI_SystemMessage.CloseUI();
     if (this == null)
     {
         return;
     }
     if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset)
     {
         GameObject gameObject = _item.mainAsset as GameObject;
         if (null == gameObject)
         {
             return;
         }
         if (null != this.rootEffectGameObject)
         {
             UnityEngine.Object.Destroy(this.rootEffectGameObject);
         }
         this.rootEffectGameObject = (GameObject)UnityEngine.Object.Instantiate(gameObject, Vector3.zero, Quaternion.identity);
         if (null == this.rootEffectGameObject)
         {
             return;
         }
         Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
         Vector3 effectUIPos = base.GetEffectUIPos(screenPos);
         effectUIPos.z = 300f;
         this.rootEffectGameObject.transform.position = effectUIPos;
         NkUtil.SetAllChildLayer(this.rootEffectGameObject, GUICamera.UILayer);
         this.rootEffectGameObject.SetActive(false);
         this.SetTextureBundle();
         this.SetElementSuccessDlgGUI();
         this.bEffectUpdate = true;
         if (TsPlatform.IsMobile && TsPlatform.IsEditor)
         {
             NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.rootEffectGameObject);
         }
     }
 }
示例#29
0
 private void SetActionDirection(WWWItem _item, object _param)
 {
     if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset)
     {
         GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;
         if (null != gameObject)
         {
             this.m_EffectDirection = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
             Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
             Vector3 effectUIPos = base.GetEffectUIPos(screenPos);
             effectUIPos.z = 300f;
             this.m_EffectDirection.transform.position = effectUIPos;
             NkUtil.SetAllChildLayer(this.m_EffectDirection, GUICamera.UILayer);
             base.InteractivePanel.MakeChild(this.m_EffectDirection);
             this.fStartTime_ShowEffect  = Time.realtimeSinceStartup;
             this.m_bActionShowDirection = true;
             if (TsPlatform.IsMobile && TsPlatform.IsEditor)
             {
                 NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_EffectDirection);
             }
         }
     }
 }
示例#30
0
        private void ShowSolCombinationDirectionEffect(WWWItem item, object param)
        {
            if (item == null || item.GetSafeBundle() == null)
            {
                return;
            }
            if (item.GetSafeBundle().mainAsset == null)
            {
                return;
            }
            GameObject original = item.GetSafeBundle().mainAsset as GameObject;

            this._directionEffect = (UnityEngine.Object.Instantiate(original) as GameObject);
            if (this._directionEffect == null)
            {
                return;
            }
            this.SettingDirectionAni();
            this.SettingEffectPos();
            this.SettingSolCombinationLabel();
            this.DisableDirectionCharPortrait();
            this.SettingDirectionCharPortrait();
        }