void JijiaControl() { if (Input.GetKeyDown(KeyCode.U)) { if (IsCanControl()) { IsNengliangPao = true; _jijiaBody.ShowNengliangPao(); } } if (Input.GetKeyUp(KeyCode.U)) { if (IsCanControl()) { IsNengliangPao = false; _jijiaBody.ShowNengliangPao(false); } } if (Input.GetKey(KeyCode.L) && !IsNengliangPao) { IsInShoubing = false; if (Input.GetKey(KeyCode.J)) { if (IsCanControl()) { _jijiaBody.Jipao(); } } else { if (IsCanControl()) { _jijiaBody.Jipao(false); } } if (Input.GetKey(KeyCode.W)) { IsInShoubing = false; if (IsCanControl()) { _jijiaBody.FlyUp(); } } else if (Input.GetKey(KeyCode.S)) { IsInShoubing = false; if (IsCanControl()) { _jijiaBody.FlyDown(); } } else { if (IsCanControl()) { _jijiaBody.FlyUp(false); } if (IsCanControl()) { _jijiaBody.FlyDown(false); } } if (Input.GetKey(KeyCode.I)) { if (IsCanControl()) { _jijiaBody.Ganraodan(); } } else { if (IsCanControl()) { _jijiaBody.Ganraodan(false); } } if (Input.GetKeyDown(KeyCode.K)) { if (IsCanControl()) { _jijiaBody.GZDaodan(); } } if (Input.GetKeyUp(KeyCode.K)) { if (IsCanControl()) { _jijiaBody.GZDaodan(false); } } IsJiali = true; if (IsCanControl()) { _jijiaBody.GaosuFly(); } return; } else { if (!IsInShoubing) { IsJiali = false; if (IsCanControl()) { _jijiaBody.GaosuFly(false); } } } if (Input.GetKey(KeyCode.J)) { if (IsCanControl()) { _jijiaBody.Jipao(); } } else { if (IsCanControl()) { _jijiaBody.Jipao(false); } } if (Input.GetKey(KeyCode.W)) { if (IsCanControl()) { _jijiaBody.FlyUp(); } } else if (Input.GetKey(KeyCode.S)) { if (IsCanControl()) { _jijiaBody.FlyDown(); } } else { if (IsCanControl()) { _jijiaBody.FlyUp(false); } if (IsCanControl()) { _jijiaBody.FlyDown(false); } } if (Input.GetKey(KeyCode.A)) { if (!IsJiali) { IsInShoubing = false; if (IsCanControl() || !Input.GetKeyDown(KeyCode.J)) { _jijiaBody.FlyHou(); } } } else if (Input.GetKey(KeyCode.D)) { IsInShoubing = false; if (IsCanControl()) { _jijiaBody.FlyQian(); } } else { if (IsCanControl()) { _jijiaBody.FlyHou(false); } if (IsCanControl()) { _jijiaBody.FlyQian(false); } } if (Input.GetKeyDown(KeyCode.I)) { if (IsCanControl()) { _jijiaBody.Ganraodan(); } } if (Input.GetKeyUp(KeyCode.I)) { if (IsCanControl()) { _jijiaBody.Ganraodan(false); } } if (Input.GetKeyDown(KeyCode.K)) { if (IsCanControl()) { _jijiaBody.GZDaodan(); } } if (Input.GetKeyUp(KeyCode.K)) { if (IsCanControl()) { _jijiaBody.GZDaodan(false); } } }
void JijiaControl() { if (Input.GetKeyDown(KeyCode.U)) { if (IsCanControl()) { IsNengliangPao = true; _jijiaBody.ShowNengliangPao(); } } if (Input.GetKeyUp(KeyCode.U)) { if (IsCanControl()) { IsNengliangPao = false; _jijiaBody.ShowNengliangPao(false); } } if (Input.GetKey(KeyCode.L) && !IsNengliangPao) { if (Input.GetKey(KeyCode.J)) { if (IsCanControl()) { _jijiaBody.Jipao(); } } else { if (IsCanControl()) { _jijiaBody.Jipao(false); } } if (Input.GetKey(KeyCode.W)) { if (IsCanControl()) { _jijiaBody.FlyUp(); } } else if (Input.GetKey(KeyCode.S)) { if (IsCanControl()) { _jijiaBody.FlyDown(); } } else { if (IsCanControl()) { _jijiaBody.FlyUp(false); } if (IsCanControl()) { _jijiaBody.FlyDown(false); } } if (Input.GetKey(KeyCode.I)) { if (IsCanControl()) { _jijiaBody.Ganraodan(); } } else { if (IsCanControl()) { _jijiaBody.Ganraodan(false); } } if (Input.GetKeyDown(KeyCode.K)) { if (IsCanControl()) { _jijiaBody.GZDaodan(); } } if (Input.GetKeyUp(KeyCode.K)) { if (IsCanControl()) { _jijiaBody.GZDaodan(false); } } IsJiali = true; if (IsCanControl()) { _jijiaBody.GaosuFly(); } return; } else { IsJiali = false; if (IsCanControl()) { _jijiaBody.GaosuFly(false); } } //if (Input.GetKeyDown(KeyCode.J)) //{ // if (IsCanControl()) _jijiaBody.Jipao(); //} //if (Input.GetKeyUp(KeyCode.J)) //{ // if (IsCanControl()) _jijiaBody.Jipao(false); //} if (Input.GetKey(KeyCode.J)) { if (IsCanControl()) { _jijiaBody.Jipao(); } } else { if (IsCanControl()) { _jijiaBody.Jipao(false); } } //if (Input.GetKeyUp(KeyCode.W)) //{ // Debug.Log("您抬起了W键"); // if (IsCanControl()) _jijiaBody.FlyUp(false); //} //if (Input.GetKeyUp(KeyCode.S)) //{ // Debug.Log("您抬起了S键"); // if (IsCanControl()) _jijiaBody.FlyDown(false); //} //if (Input.GetKeyUp(KeyCode.A)) //{ // Debug.Log("您抬起了A键"); // if (IsCanControl()) _jijiaBody.FlyHou(false); //} //if (Input.GetKeyUp(KeyCode.D)) //{ // Debug.Log("您抬起了D键"); // if (IsCanControl()) _jijiaBody.FlyQian(false); //} if (Input.GetKey(KeyCode.W)) { if (IsCanControl()) { _jijiaBody.FlyUp(); } } else if (Input.GetKey(KeyCode.S)) { if (IsCanControl()) { _jijiaBody.FlyDown(); } } else { if (IsCanControl()) { _jijiaBody.FlyUp(false); } if (IsCanControl()) { _jijiaBody.FlyDown(false); } } if (Input.GetKey(KeyCode.A)) { if (!IsJiali) { if (IsCanControl() || !Input.GetKeyDown(KeyCode.J)) { _jijiaBody.FlyHou(); } } } else if (Input.GetKey(KeyCode.D)) { if (IsCanControl()) { _jijiaBody.FlyQian(); } } else { if (IsCanControl()) { _jijiaBody.FlyHou(false); } if (IsCanControl()) { _jijiaBody.FlyQian(false); } } if (Input.GetKeyDown(KeyCode.I)) { if (IsCanControl()) { _jijiaBody.Ganraodan(); } } if (Input.GetKeyUp(KeyCode.I)) { if (IsCanControl()) { _jijiaBody.Ganraodan(false); } } if (Input.GetKeyDown(KeyCode.K)) { if (IsCanControl()) { _jijiaBody.GZDaodan(); } } if (Input.GetKeyUp(KeyCode.K)) { if (IsCanControl()) { _jijiaBody.GZDaodan(false); } } }