Unity - A计划(永久有效期) 扫二维码继续学习 二维码时效为半小时

(197评价)
价格: 4431.00元
unity人物二段跳的问题,无法跳跃,debug没有error
Siliconvalley发起了话题2017-09-01
0
回复
484
浏览
if (cc.isGrounded) { moveDirection = new Vector3(0, 0, Input.GetAxis("Horizontal")); moveDirection = transform.TransformDirection(moveDirection); moveDirection *= speed; if (Input.GetKeyDown(KeyCode.Space)) { animator.SetBool("jump01",true); moveDirection = new Vector3 (0, 0, h); moveDirection.y = jumpspeed; num = 1; } else if (Input.GetKeyDown(KeyCode.Space)) { if (num == 1) { animator.SetBool("jump02", true); moveDirection.y = jumpspeed; } } moveDirection.y -= gravity * Time.deltaTime; cc.SimpleMove(moveDirection * Time.deltaTime); animator.SetBool("jump02",false); }
发表回复
你还没有登录,请先 登录或 注册!