示例#1
0
 public static void DestroyNpcCamera()
 {
     if (CurModeShow == null)
     {
         return;
     }
     Destroy(CurModeShow.gameObject);
     CurModeShow = null;
 }
示例#2
0
        public static void ShowModel(string path)
        {
            if (CurModeShow == null)
            {
                GameObject prefab = (GameObject)CoreEntry.gResLoader.Load(PrefabPath, typeof(GameObject));
                if (prefab == null)
                {
                    return;
                }
                GameObject obj = Instantiate(prefab) as GameObject;
                CurModeShow = obj.GetComponent <NpcCameraShow>();
                DontDestroyOnLoad(CurModeShow);
                CurModeShow.transform.localPosition = new Vector3(0, -1000, 0);
                CurModeShow.transform.localScale    = Vector3.one;
                //   CurModeShow.transform.forward = Vector3.forward;
            }

            if (!CurModeShow.gameObject.activeSelf)
            {
                CurModeShow.gameObject.SetActive(true);
            }
            CurModeShow.Show(path);
        }