Пример #1
0
    public void ActiveDingDianBuMiaoZhunCamera(Transform tranCamPoint)
    {
        CamState = CartoonShootCamState.DingDianBuMiaoZhunCamera;

        MainCamTran.parent   = null;
        MainCamTran.position = tranCamPoint.position;
        MainCamTran.rotation = tranCamPoint.rotation;
    }
Пример #2
0
    public void ActiveGenSuiCamera(Transform tran)
    {
        CamState = CartoonShootCamState.GenSuiCamera;

        GenSuiCamTran                = tran;
        MainCamTran.parent           = GenSuiCamTran;
        MainCamTran.localPosition    = Vector3.zero;
        MainCamTran.localEulerAngles = Vector3.zero;
    }
Пример #3
0
    public void CheckGenSuiCamTranStartGame()
    {
        if (GenSuiCamTran != null)
        {
            CamState = CartoonShootCamState.GenSuiCamera;

            MainCamTran.parent           = GenSuiCamTran;
            MainCamTran.localPosition    = Vector3.zero;
            MainCamTran.localEulerAngles = Vector3.zero;
        }
    }
Пример #4
0
    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();
    }
Пример #5
0
 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();
     }
 }