コード例 #1
0
        /// <summary>
        /// コンテントの追加
        /// </summary>
        private void AddContent(PolyPartsObject polyObj)
        {
            HierarchyUIContent content = InstantiateContent(polyObj);

            //コンテントの追加
            polyObjTable.Add(polyObj, content);
        }
コード例 #2
0
        /// <summary>
        /// コンテント内のポリゴンの頂点変更
        /// </summary>
        private void PolyObjVertexChanged(PolyPartsObject polyObj)
        {
            if (!polyObjTable.ContainsKey(polyObj))
            {
                return;
            }
            HierarchyUIContent content = polyObjTable[polyObj];

            //コンテントのメッシュを再設定
            content.meshImage.SetEasyMesh(polyObj.GetPolygonEasyMesh());
        }
コード例 #3
0
        /// <summary>
        /// コンテントの削除
        /// </summary>
        private void DelteContent(PolyPartsObject polyObj)
        {
            if (!polyObjTable.ContainsKey(polyObj))
            {
                return;
            }
            polyObjTable.Remove(polyObj);
            //コンテントの削除
            HierarchyUIContent content = polyObjTable[polyObj];

            Destroy(content.gameObject);
        }
コード例 #4
0
        /// <summary>
        /// コンテント内のポリゴンの色変更
        /// </summary>
        private void PolyObjColorChanged(PolyPartsObject polyObj)
        {
            //Contentの取得
            if (!polyObjTable.ContainsKey(polyObj))
            {
                return;
            }
            HierarchyUIContent content = polyObjTable[polyObj];

            //コンテントのメッシュの色を再設定
            content.meshImage.SetColor(polyObj.GetPolygonColor());
        }
コード例 #5
0
        /// <summary>
        /// Contentの生成
        /// </summary>
        private HierarchyUIContent InstantiateContent(PolyPartsObject polyObj)
        {
            HierarchyUIContent content = Instantiate(prefab);

            content.SetPolyObj(polyObj);
            content.meshImage.SetEasyMesh(polyObj.GetPolygonEasyMesh());
            //transformの設定
            RectTransform rectTrans = (RectTransform)content.transform;

            rectTrans.SetParent(contentsParent, false);
            //上に追加
            rectTrans.SetAsFirstSibling();
            return(content);
        }
コード例 #6
0
 /// <summary>
 /// コンテントのクリック
 /// </summary>
 private void OnContentClick(HierarchyUIContent content)
 {
 }