public void Move() { if (m == null) { m = MovePattern.getInstance(); } else { m.Move(this); } }
// 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); }
void Update() { MovePattern.Move(controller, transform); }