상속: CatPaw.TerrainData
예제 #1
0
        protected override void OnShow(object userData)
        {
            base.OnShow(userData);

            m_TerrainCubeData = userData as TerrainCubeData;
            if (m_TerrainCubeData == null)
            {
                throw new GameFrameworkException();
            }

            if (m_TerrainCubeData.Y == 1)
            {
                if (m_TerrainCubeData.Z == 0)
                {
                    var r = GetComponent <Renderer>();
                    var m = r.material;
                    var c = m.color;
                    m.color = new Color(c.r, c.g, c.b, c.a * 0.3f);
                    m.SetRenderingMode(RenderingMode.Transparent);
                }
            }
        }
예제 #2
0
        protected override void OnHide(object userData)
        {
            m_TerrainCubeData = null;

            base.OnHide(userData);
        }