예제 #1
0
 // Update is called once per frame
 void Update()
 {
     if (target != null && introPan == false)
     {
         PlaneSize size = FindObjectOfType <GameManager>().currentPlaneSize;
         transform.position = target.transform.position + Vector3.up * planeCameraInfo[(int)size].x - Vector3.forward * planeCameraInfo[(int)size].y;
         // transform.rotation = Quaternion.Euler(23, transform.rotation.y, transform.rotation.z);
     }
 }
예제 #2
0
    IEnumerator IntroPanRoutine()
    {
        PlaneSize size = FindObjectOfType <GameManager>().currentPlaneSize;

        transform.position = target.transform.position + Vector3.up * planeCameraInfo[(int)size].x - Vector3.forward * planeCameraInfo[(int)size].y;

        while (introPan == true)
        {
            transform.RotateAround(target.transform.position, target.transform.up, panSpeed);
            yield return(null);
        }
    }
예제 #3
0
    public TypingEngine()
    {
      Methods = new List<TypingMethod>();
      Methods.Add(new ABCTypingMethod());
      Methods.Add(new QwertyTypingMethod());
      Methods.Add(new SplitQwertyTypingMethod());
      Methods.Add(new FitalyTypingMethod());
      Methods.Add(new CircularTypingMethod());
      Methods.Add(new TahnuTypingMethod());
      Methods.Add(new LabyrinthTypingMethod());
      Methods.Add(new SeatoTypingMethod());
      Methods.Add(new BoxTypingMethod());

      TypingMethod = Methods.Last();
      secTypingMethod = new SecondHandSelectionTypingMethod();

      Recognizer = new GestureRecognizer();
      PropertyChanged += new PropertyChangedEventHandler(Recognizer.TypingEngine_PropertyChanged);

      CursorLocation = new Point3D(0, 0, 0);
      secCursorLocation = new Point3D(0, 0, 0);
      planeSize = PlaneSize.p35x35;
      SelectionMethod = ArmText.Typing.SelectionMethod.Click;
      Dexterity = TypingDexterity.Right;
    }
예제 #4
0
    IEnumerator StopPanRoutine()
    {
        if (introPan == true)
        {
            PlaneSize size = FindObjectOfType <GameManager>().currentPlaneSize;

            FindObjectOfType <PlayerController>().enabled = false;


            /*
             * Vector3 startPos = transform.position;
             * Vector3 targetPos = target.transform.position + Vector3.up * planeCameraInfo[(int)size].x - Vector3.forward * planeCameraInfo[(int)size].y;
             *
             * Vector3 startRotation = transform.rotation.eulerAngles;
             * Vector3 targetRotation = target.transform.eulerAngles;
             *
             * Vector3 deltaPosition = (targetPos - startPos) / 30;
             *
             *
             * while (transform.position != targetPos) {// && (transform.rotation.eulerAngles) != targetRotation) {
             *
             *  float distance = Vector3.Distance(targetPos, transform.position);
             *
             *  if(distance > 2)
             *  {
             *      transform.position += deltaPosition;
             *  }else
             *  {
             *      transform.position = targetPos;
             *  }
             *
             *  /*
             *
             *  float distanceRot = Vector3.Distance(targetRotation, startRotation);
             *
             *  Vector3 deltaQuat = (targetRotation - startRotation) / 30;
             *  if (distanceRot > 2)
             *  {
             *      transform.Rotate(deltaQuat);// += deltaQuat;
             *  }else
             *  {
             *      transform.rotation = Quaternion.Euler(targetRotation);
             *  }
             *
             *  yield return null;
             * }
             */



            //PlaneSize size = FindObjectOfType<GameManager>().currentPlaneSize;
            //FindObjectOfType<PlayerController>().enabled = false;
            Vector3 targetPos = target.transform.position + Vector3.up * planeCameraInfo[(int)size].x - Vector3.forward * planeCameraInfo[(int)size].y;



            while (Vector3.Distance(transform.position, targetPos) > 1)
            {
                transform.RotateAround(target.transform.position, target.transform.up, panSpeed * 12);
                yield return(null);
            }
        }
        FindObjectOfType <PlayerController>().enabled = true;

        introPan = false;


        transform.rotation = defaultrotation;
    }