public void ActiveDingDianBuMiaoZhunCamera(Transform tranCamPoint) { CamState = CartoonShootCamState.DingDianBuMiaoZhunCamera; MainCamTran.parent = null; MainCamTran.position = tranCamPoint.position; MainCamTran.rotation = tranCamPoint.rotation; }
public void ActiveGenSuiCamera(Transform tran) { CamState = CartoonShootCamState.GenSuiCamera; GenSuiCamTran = tran; MainCamTran.parent = GenSuiCamTran; MainCamTran.localPosition = Vector3.zero; MainCamTran.localEulerAngles = Vector3.zero; }
public void CheckGenSuiCamTranStartGame() { if (GenSuiCamTran != null) { CamState = CartoonShootCamState.GenSuiCamera; MainCamTran.parent = GenSuiCamTran; MainCamTran.localPosition = Vector3.zero; MainCamTran.localEulerAngles = Vector3.zero; } }
public void ActiveZiYouYiDongCamera(Transform tranCamPath) { CamState = CartoonShootCamState.ZiYouYiDongCamera; if (tranCamPath.childCount < 1) { Debug.LogError("ActiveZiYouYiDongCamera -> childCount was wrong!"); return; } MainCamTran.parent = null; MarkCurrentIndex = 0; MainCamTran.position = tranCamPath.GetChild(MarkCurrentIndex).position; MainCamTran.rotation = tranCamPath.GetChild(MarkCurrentIndex).rotation; ZiYouYiDongCamPtahTran = tranCamPath; CartoonShootPathScript = tranCamPath.GetComponent <CartoonShootPathCtrl>(); MoveCameraByZiYouYiDongPath(); }
void OnFinishMoveCameraByZiYouYiDongPath() { if (CartoonShootPathScript.IsMoveByPathSpeed) { Debug.Log("OnFinishMoveCameraByZiYouYiDongPath..."); CamState = CartoonShootCamState.NULL; return; } else { if (MarkCurrentIndex >= ZiYouYiDongCamPtahTran.childCount - 2) { Debug.Log("OnFinishMoveCameraByZiYouYiDongPath..."); CamState = CartoonShootCamState.NULL; return; } MarkCurrentIndex++; MoveCameraByZiYouYiDongPath(); } }