Quantcast
Viewing latest article 4
Browse Latest Browse All 1488

Why my Player jumps after the enemy has died?

I made a code for killing enemies jumping on them, like in Super Mario, but my Player jumps when he touches the ground, instead of the head of the enemy. This is my code for the enemy: using System.Collections; using System.Collections.Generic; using System.Threading; using UnityEngine; public class Rosa : MonoBehaviour { public Rigidbody2D RBRosa; public BoxCollider2D BCRosa; private Animator Animator; private MovimientoGazz Gazz; // Start is called before the first frame update void Start() { Gazz = FindObjectOfType(); } // Update is called once per frame void Update() { } private void OnTriggerEnter2D(Collider2D collision) { if(collision.gameObject.tag == "Player") { Gazz.Hit = true; BCRosa.enabled = false; } } }

Viewing latest article 4
Browse Latest Browse All 1488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>