Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void FixedUpdate()
- {
- isGrounded = Physics2D.OverlapCircle(groundCheck.position, checkRadius, whatIsGround);
- if (JumpEnemy == false)
- {
- rb.velocity = new Vector2(Input.GetAxis("Horizontal") * speed, rb.velocity.y);
- } else
- {
- JumpEnemy = false;
- }
- ....
- }
- private void OnTriggerEnter2D(Collider2D collision)
- {
- if (this.CompareTag("Player") && collision.CompareTag("Damage"))
- {
- JumpEnemy = true;
- }
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment