public void Move()
 {
     if (m == null)
     {
         m = MovePattern.getInstance();
     }
     else
     {
         m.Move(this);
     }
 }
Exemple #2
0
    // private Vector3 moveDirection = Vector3.zero;
    void Update()
    {
        MovePattern.Move(controller, transform);

        // if (controller.isGrounded) {
        // moveDirection.x = Input.GetAxis("Horizontal");
        // moveDirection.y = 0;
        // moveDirection.z = Input.GetAxis("Vertical");

        // moveDirection = transform.TransformDirection(moveDirection);
        // moveDirection *= speed;
        // if (Input.GetButton("Jump"))
        // moveDirection.y = jumpSpeed;

        // }
        // moveDirection.y -= gravity * Time.deltaTime;
        // controller.Move(moveDirection * Time.deltaTime);
    }
Exemple #3
0
 void Update()
 {
     MovePattern.Move(controller, transform);
 }