| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 | 
							- using DG.Tweening;
 
- using System.Collections;
 
- using System.Collections.Generic;
 
- using UnityEngine;
 
- using UnityEngine.UI;
 
- public class ThreeDNav : MonoBehaviour
 
- {
 
-     public Vector2[] targetPos;
 
-     public Image s_image;
 
-     public List<Button> btns;
 
-     public List<RectTransform> layers;
 
-     public GameObject content;
 
-     public RectTransform znz;
 
-     private void Start()
 
-     {
 
-         CameraManager.SwitchCamera(0);
 
-         InitButton();
 
-     }
 
-     void InitButton()
 
-     {
 
-         btns = new List<Button>();
 
-         Button[] bts = this.GetComponentsInChildren<Button>();
 
-         for (int i = 0; i < bts.Length; i++)
 
-         {
 
-             btns.Add(bts[i]);
 
-         }
 
-         layers = new List<RectTransform>();
 
-         for (int i = 0; i < content.transform.childCount; i++)
 
-         {
 
-             layers.Add(content.transform.GetChild(i).GetComponent<RectTransform>());
 
-         }
 
-         for (int i = 0; i < btns.Count; i++)
 
-         {
 
-             int index = i;
 
-             btns[index].onClick.AddListener(() =>
 
-             {
 
-                 for (int j = 0; j < layers.Count; j++)
 
-                 {
 
-                     layers[j].gameObject.SetActive(false);
 
-                 }
 
-                 for (int j = 0; j < btns.Count; j++)
 
-                 {
 
-                     btns[j].GetComponentInChildren<Text>().color = new Color32(137, 147, 173, 255);
 
-                 }
 
-                 btns[index].GetComponentInChildren<Text>().color = Color.white;
 
-                 Tweener tw = s_image.GetComponent<RectTransform>().DOLocalMoveX(targetPos[index].x, 0.3f);
 
-                 tw.SetEase(Ease.OutBack);
 
-                 if (index < layers.Count)
 
-                     layers[index].gameObject.SetActive(true);
 
-             });
 
-         }
 
-     }
 
-     private void Update()
 
-     {
 
-         znz.transform.rotation = Quaternion.Lerp(znz.transform.rotation, Quaternion.Euler(0, 0, CameraManager.instance.mainCamera.transform.localEulerAngles.y), Time.deltaTime * 4);
 
-     }
 
- }
 
 
  |