/// <summary> /// // DontDestroyOnLoad用 /// </summary> private void OnDestroy() { if (this == Instance) { mainCameraManager = null; } }
void Start() { mainCamera.SetActive(true); playerCamera.SetActive(false); mcm = mainCamera.GetComponent <MainCameraManager> (); // pcm = playerCamera.GetComponent<PlayerCamera> (); }
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; }
void Awake() { if (mainCameraManager == null) { mainCameraManager = this; } else if (mainCameraManager != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
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; }
void Awake() { instance = this; }
private void Start() { mainCameraManager = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <MainCameraManager>(); playerT = GameObject.FindGameObjectWithTag("Player").transform; UpdateSpawn(); }
private void OnZoom(float obj) { // 在这里接受广播 调用摄像机管理器的方法,当然,摄像机订阅事件也可以 MainCameraManager.GetInstance().Zoom(obj); }
private void OnDrag(PointerEventData obj) { MainCameraManager.GetInstance().Drag(obj); }
void Awake() { elevatorRig = transform.parent; mainCameraManager = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <MainCameraManager>(); elevatorRigRB = elevatorRig.GetComponent <Rigidbody>(); }