少年修仙传客户端代码仓库
client_linchunjie
2019-05-17 49cffc5af1c7d3ce7a8244302f5492304d3225ad
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
1个文件已修改
2个文件已添加
74 ■■■■■ 已修改文件
UI/Common/UI3DModelExhibition.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DModelShowSpecialNPC.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DModelShowSpecialNPC.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DModelExhibition.cs
@@ -466,7 +466,15 @@
            ResetCameraColor(_gray);
            m_CameraColor.saturation = _gray ? 0.08f : 1f;
            BindGestureCatcher(_rawImage, interactable);
            if (_npcId == 10104001)
            {
                _rawImage.gameObject.SetActive(false);
                UI3DModelShowSpecialNPC.Display(npcModel);
            }
            else
            {
                BindGestureCatcher(_rawImage, interactable);
            }
        }
        public void StopShow()
@@ -550,6 +558,7 @@
                godWeaponEffect = null;
            }
            UI3DModelShowSpecialNPC.Dispose();
            interactable = false;
        }
@@ -643,6 +652,7 @@
            rawImage.rectTransform.sizeDelta = new Vector2(x, y);
            rawImage.texture = m_ShowCamera.targetTexture;
            rawImage.material = MaterialUtility.GetGUIRenderTextureMaterial();
            rawImage.gameObject.SetActive(true);
            if (interable)
            {
UI/Common/UI3DModelShowSpecialNPC.cs
New file
@@ -0,0 +1,50 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Friday, May 17, 2019
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
namespace Snxxz.UI
{
    /// <summary>
    /// 这个仅仅是给仙皇残魂用的
    /// </summary>
    public class UI3DModelShowSpecialNPC : MonoBehaviour
    {
        [SerializeField] Transform m_StandPoint;
        public Transform standPoint { get { return m_StandPoint; } }
        static UI3DModelShowSpecialNPC showPlatform;
        public static void Display(GameObject model)
        {
            if (showPlatform == null)
            {
                var prefab = BuiltInLoader.LoadPrefab("UI3DModelShowSpecialNPC");
                var instance = Instantiate(prefab);
                instance.transform.position = new Vector3(1000, 3000, 5000);
                showPlatform = instance.GetComponent<UI3DModelShowSpecialNPC>();
                showPlatform.gameObject.name = "UI3DModelShowSpecialNPC";
            }
            model.transform.SetParentEx(showPlatform.standPoint, Vector3.zero, Quaternion.identity, Vector3.one);
        }
        public static void Dispose()
        {
            if (showPlatform != null)
            {
                DestroyImmediate(showPlatform);
                showPlatform = null;
            }
        }
    }
}
UI/Common/UI3DModelShowSpecialNPC.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f7b8d7e81351bcd4d909f10df6a26ee1
timeCreated: 1558072373
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant: