예제 #1
0
파일: UBlood.cs 프로젝트: zwong91/Titan
        private void CreatBillBoard()
        {
            if (!bInit)
            {
                return;
            }

            if (null == BloodMaterial)
            {
                BloodMaterial = new Material(AssetBundleManager.GetShader("Effect/BillBorad"));
                BloodMaterial.SetTexture("_MainTex", UBloodManager.Instance.BloodRenderTexture);
                BloodMaterial.name = "BloodMaterial";
                //BloodMaterial.hideFlags = HideFlags.HideAndDontSave;
            }
            else
            {
                BloodMaterial.SetTexture("_MainTex", UBloodManager.Instance.BloodRenderTexture);
            }

            if (null == m_BillBoard)
            {
                m_BillBoard = UBillBoard.CreateBillBorad((int)m_CanvasNode.vSize.x, (int)m_CanvasNode.vSize.y, BloodMaterial, "Blood -- temp");
            }

            if (null != m_BillBoard)
            {
                m_BillBoard.gameObject.SetActive(m_FinalVisible);
            }
        }
예제 #2
0
파일: UTopName.cs 프로젝트: zwong91/Titan
 public void Clear(bool fullClear = false)
 {
     if (fullClear)
     {
         m_ID    = -1;
         resNode = null;
     }
     if (m_BillBoard)
     {
         m_BillBoard.Clear();
         m_BillBoard = null;
     }
 }
예제 #3
0
파일: UBlood.cs 프로젝트: zwong91/Titan
        public void Clear()
        {
            if (!bInit)
            {
                return;
            }

            ResetData();
            if (m_BillBoard)
            {
                m_BillBoard.Clear();
                m_BillBoard = null;
            }
            m_ID    = -1;
            resNode = null;
            bInit   = false;
        }
예제 #4
0
파일: UTopName.cs 프로젝트: zwong91/Titan
        public void CreatBillBoard()
        {
            if (null == TopNameMaterial)
            {
                TopNameMaterial = new Material(AssetBundleManager.GetShader("Effect/BillBorad"));
                TopNameMaterial.SetTexture("_MainTex", UTopNameManager.Instance.TopNameRenderTexture);
                TopNameMaterial.name = "TopNameMaterial";
                //TopNameMaterial.hideFlags = HideFlags.HideAndDontSave;
            }
            else
            {
                TopNameMaterial.SetTexture("_MainTex", UTopNameManager.Instance.TopNameRenderTexture);
            }

            if (m_BillBoard == null)
            {
                m_BillBoard = UBillBoard.CreateBillBorad((int)m_CanvasNode.vSize.x, (int)m_CanvasNode.vSize.y, TopNameMaterial, "TopName -- temp");
            }
        }
예제 #5
0
파일: UBlood.cs 프로젝트: zwong91/Titan
        public void RefreshTexture()
        {
            if (null != m_BillBoard)
            {
                m_BillBoard.Clear();
                m_BillBoard = null;
            }

            if (!EntityView.isNullOrEmpty(m_Entity))
            {
                CreatBillBoard();
                ChangeCanvasNode();

                bool bShow = m_bVisible && !m_IsOutOfVisibleDistance && m_bEnable && !m_IsClosed && !m_bDead;
                if (m_BillBoard != null)
                {
                    m_BillBoard.gameObject.SetActive(bShow);
                }
            }
        }