コード例 #1
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();
    }
コード例 #2
0
    void OnDrawGizmosSelected()
    {
        if (!enabled)
        {
            return;
        }

        Transform parTran = transform.parent;

        if (parTran == null)
        {
            return;
        }

        CartoonShootPathCtrl pathScript = parTran.GetComponent <CartoonShootPathCtrl>();

        pathScript.DrawPath();
    }