// Start is called before the first frame update void Start() { collider2d = GetComponent <Collider2D>(); owner = transform.parent.gameObject.GetComponent <HitboxOwner>(); Hitbox[] hitboxes = FindObjectsOfType <Hitbox>(); foreach (Hitbox hitbox in hitboxes) { if ((type == hitbox.Type || owner == hitbox.Owner) && hitbox.Collider2D != null) { Physics2D.IgnoreCollision(collider2d, hitbox.Collider2D); } } }
public override void Land(Hitbox mine, Hitbox other) { grounded = true; lastplat = other.Owner; currentStateScript.OnLand(); }