示例#1
0
        void Start()
        {
            moveCtrl    = GetComponentInParent <MoveCtrl>();
            mgr         = GameObject.FindGameObjectWithTag(Tags.Player).GetComponent <Manager>();
            fRotSpeed   = Camera.main.GetComponent <FollowCam>().fMouseRotSpeed;
            basicAttack = GameObject.FindGameObjectWithTag(Tags.Player).GetComponent <BasicAttack>();
            animator    = GameObject.FindGameObjectWithTag(Tags.Player).GetComponentInChildren <Animator>();
            fAngleY     = transform.eulerAngles.x;
            fAngleX     = transform.eulerAngles.y;

            fStartY = fAngleY;
        }
示例#2
0
    void Start()
    {
        fDist          = DIST;
        zoomOutDist    = DIST;
        fRight         = RIGHT;
        fDampTrace     = DAMP_TRACE;
        trTarget       = GameObject.FindGameObjectWithTag(Tags.CameraTarget).GetComponent <Transform>();
        trPlayerModel  = GameObject.FindGameObjectWithTag(Tags.PlayerModel).transform;
        lookAt         = GameObject.FindGameObjectWithTag(Tags.PlayerModel).GetComponent <LookAtIK>();
        lookAt.enabled = false;

        moveCtrl = GameObject.FindGameObjectWithTag(Tags.Player).GetComponent <T2.MoveCtrl>();

        vTarget = trTarget.position + (trTarget.forward * 30.0f);

        fCamDist = 0.1f;
    }