change MapElement to scriptable object
This commit is contained in:
@@ -95,9 +95,9 @@ public class Character : MonoBehaviour
|
||||
var raycastHit=Physics2D.BoxCast(_boxCollider.bounds.center, _boxCollider.bounds.size, 0f, direction, .1f, _mapLayer);
|
||||
if (raycastHit)
|
||||
{
|
||||
var mapElement = raycastHit.transform.GetComponent<IMapElement>();
|
||||
var mapElement = raycastHit.transform.GetComponent<MapElement>();
|
||||
|
||||
return mapElement == null ? MapElementType.Empty : mapElement.ElementType;
|
||||
return mapElement == null ? MapElementType.Empty : mapElement.ElementSO.ElementType;
|
||||
}
|
||||
else
|
||||
return MapElementType.Empty;
|
||||
|
||||
Reference in New Issue
Block a user