|
|
@ -25,6 +25,15 @@ public class ParentBehaviour : MonoBehaviour |
|
|
|
public Texture2D parentFaceAngry; |
|
|
|
public Texture2D parentFaceTalk; |
|
|
|
|
|
|
|
public GameObject parentBodyObj; |
|
|
|
public GameObject parentFaceObj; |
|
|
|
public GameObject parentDialougeObj; |
|
|
|
|
|
|
|
private void Start() |
|
|
|
{ |
|
|
|
parentBodyObj.GetComponent<MeshRenderer>().material.mainTexture = parentBases[Random.Range(0, parentBases.Length)]; |
|
|
|
parentFaceObj.GetComponent<MeshRenderer>().material.mainTexture = parentFaceNeutral; |
|
|
|
} |
|
|
|
|
|
|
|
[ContextMenu("Get Random Child")] |
|
|
|
public void GetRandomChild() |
|
|
@ -126,6 +135,7 @@ public class ParentBehaviour : MonoBehaviour |
|
|
|
{ |
|
|
|
Texture _displayGraphic = GiveDetails(other.gameObject); |
|
|
|
//display the display graphic
|
|
|
|
parentDialougeObj.GetComponent<MeshRenderer>().material.mainTexture = _displayGraphic; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|