コード例 #1
0
 /// <summary>
 /// // DontDestroyOnLoad用
 /// </summary>
 private void OnDestroy()
 {
     if (this == Instance)
     {
         mainCameraManager = null;
     }
 }
コード例 #2
0
    void Start()
    {
        mainCamera.SetActive(true);
        playerCamera.SetActive(false);
        mcm = mainCamera.GetComponent <MainCameraManager> ();
//		pcm = playerCamera.GetComponent<PlayerCamera> ();
    }
コード例 #3
0
 public void UpCamera()
 {
     status = CameraStatus.Moving;
     // カメラの視点をあわせる
     mainCamera.transform.rotation = playerCamera.transform.rotation;
     mainCamera.SetActive(true);
     mcm = mainCamera.GetComponent <MainCameraManager> ();
     playerCamera.SetActive(false);
     mcm.PlayUpAnimation();
     isUp = true;
 }
コード例 #4
0
 void Awake()
 {
     if (mainCameraManager == null)
     {
         mainCameraManager = this;
     }
     else if (mainCameraManager != this)
     {
         Destroy(gameObject);
     }
     DontDestroyOnLoad(gameObject);
 }
コード例 #5
0
 void Awake()
 {
     // Initialisierungen
     cameraManager = GameObject.Find("MainCamera").GetComponent <MainCameraManager>();
     player        = GameObject.Find("Player").GetComponent <PlayerInfo>();
     spawns        = new Transform[transform.childCount];
     for (int i = 0; i < transform.childCount; i++)
     {
         spawns[i] = transform.GetChild(i);
     }
     CCC_Client.Instance.OnPlayerJoin += ConnectOnlinePlayer;
     CCC_Client.Instance.OnSync       += OnSync;
 }
コード例 #6
0
ファイル: MainCameraManager.cs プロジェクト: wbwerner92/Psych
 void Awake()
 {
     instance = this;
 }
コード例 #7
0
 private void Start()
 {
     mainCameraManager = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <MainCameraManager>();
     playerT           = GameObject.FindGameObjectWithTag("Player").transform;
     UpdateSpawn();
 }
コード例 #8
0
 private void OnZoom(float obj)
 {   // 在这里接受广播 调用摄像机管理器的方法,当然,摄像机订阅事件也可以
     MainCameraManager.GetInstance().Zoom(obj);
 }
コード例 #9
0
 private void OnDrag(PointerEventData obj)
 {
     MainCameraManager.GetInstance().Drag(obj);
 }
コード例 #10
0
 void Awake()
 {
     elevatorRig       = transform.parent;
     mainCameraManager = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <MainCameraManager>();
     elevatorRigRB     = elevatorRig.GetComponent <Rigidbody>();
 }