예제 #1
0
    public override void OnEnterState(GameController gameController)
    {
        arrow = gameController.GetArrow();
        //arrow.SetActive(true);
        arrow.SetActive(false);
        direction   = Camera.main.transform.forward;
        direction.y = 0;
        direction.Normalize();

        Disc disc = gameController.GetDisc();

        disc.SetColliderEnabled(false);
        ThrowController throwController = gameController.GetThrowController();

        disc.Grab(throwController.heldTransform);

        Vector3 holePosition = gameController.GetCurrentHole().HoleTrigger.transform.position;

        throwController.SetTargetPosition(holePosition + new Vector3(0, 1, 0));
        SetArrowTransform(gameController);
    }
예제 #2
0
 public void StartThrow(GvrControllerInputDevice controller)
 {
     discVelocity = Vector3.zero;
     disc.Grab(heldTransform);
     Zeros(accelMag);
 }