Commit 85c3fea0 authored by Cethin's avatar Cethin

Fixed a small problem with borders.

parent 9d269d1e
......@@ -38,19 +38,19 @@ public class Borders : MonoBehaviour
World.setup();
}
if(!World.posInBounds(pos + Vector3.up) || World.posIsThis(pos + Vector3.up, (GameObject)PrefabUtility.GetPrefabObject(this)))
if(!World.posIsThis(pos + Vector3.up, (GameObject)PrefabUtility.GetPrefabParent(gameObject)))
{
d |= Direction.t;
}
if(!World.posInBounds(pos + Vector3.left) ||World.posIsThis(pos + Vector3.left, (GameObject)PrefabUtility.GetPrefabObject(this)))
if(!World.posIsThis(pos + Vector3.left, (GameObject)PrefabUtility.GetPrefabParent(gameObject)))
{
d |= Direction.r;
}
if(!World.posInBounds(pos + Vector3.down) ||World.posIsThis(pos + Vector3.down, (GameObject)PrefabUtility.GetPrefabObject(this)))
if(!World.posIsThis(pos + Vector3.down, (GameObject)PrefabUtility.GetPrefabParent(gameObject)))
{
d |= Direction.b;
}
if(!World.posInBounds(pos + Vector3.right) ||World.posIsThis(pos + Vector3.right, (GameObject)PrefabUtility.GetPrefabObject(this)))
if(!World.posIsThis(pos + Vector3.right, (GameObject)PrefabUtility.GetPrefabParent(gameObject)))
{
d |= Direction.l;
}
......
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