void Jump(float _power)//Прыжок { Body.AddForce((transform.forward * 0.5f + Vector3.up) * _power, ForceMode.Impulse); Power_jump = 0; Interface_player.Instance.Progress_bar_jump(0); Anim.SetBool("Jump", true); Anim.SetFloat("Jump_power", 0); Sound_control_.Sound_play_1(); }
private void OnTriggerEnter(Collider collision) { if (collision.gameObject.tag == "Ground" && !Grounded) { Grounded = true; Anim.SetBool("Jump", false); Anim.Play("Grounded"); Sound_control_.Sound_play_2(); Instantiate(Landing_particle, transform.position, Landing_particle.transform.rotation); } }