Commit cc0eebdb authored by Sebastian Frey's avatar Sebastian Frey

fixed SliderObject

parent 37e2a6d7
......@@ -12,7 +12,7 @@ namespace _Game.Scripts.Level_Hazards
_rigidbody2D = this.GetComponentInParent<Rigidbody2D>();
}
private void OnCollisionEnter2D(Collision2D other)
private void OnTriggerEnter2D(Collider2D other)
{
if (other.gameObject.layer == LayerMask.NameToLayer("Player") || other.gameObject.layer == LayerMask.NameToLayer("Enemy") ||
other.gameObject.CompareTag("Fire"))
......@@ -22,7 +22,7 @@ namespace _Game.Scripts.Level_Hazards
}
}
private void OnCollisionExit2D(Collision2D other)
private void OnTriggerExit2D(Collider2D other)
{
if (other.gameObject.layer == LayerMask.NameToLayer("Player") || other.gameObject.layer == LayerMask.NameToLayer("Enemy") ||
other.gameObject.CompareTag("Fire"))
......
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment