|
@ -168,6 +168,7 @@ public class ParentBehaviour : MonoBehaviour |
|
|
{ |
|
|
{ |
|
|
if (CheckChild(collision.collider.gameObject)) |
|
|
if (CheckChild(collision.collider.gameObject)) |
|
|
{ |
|
|
{ |
|
|
|
|
|
print("correct child"); |
|
|
//this is the correct child
|
|
|
//this is the correct child
|
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
@ -175,6 +176,9 @@ public class ParentBehaviour : MonoBehaviour |
|
|
Texture _displayGraphic = GiveDetails(collision.collider.gameObject); |
|
|
Texture _displayGraphic = GiveDetails(collision.collider.gameObject); |
|
|
//display the display graphic
|
|
|
//display the display graphic
|
|
|
parentDialougeObj.GetComponent<Image>().sprite = Sprite.Create((Texture2D)_displayGraphic, new Rect(0.0f, 0.0f, _displayGraphic.width, _displayGraphic.height), new Vector2(0.5f, 0.5f), 100.0f); |
|
|
parentDialougeObj.GetComponent<Image>().sprite = Sprite.Create((Texture2D)_displayGraphic, new Rect(0.0f, 0.0f, _displayGraphic.width, _displayGraphic.height), new Vector2(0.5f, 0.5f), 100.0f); |
|
|
|
|
|
|
|
|
|
|
|
//yeet child back to centre of room
|
|
|
|
|
|
//child = collision.collider.gameObject
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|