Browse Source

parent visual stuff

develop
Jordan 3 years ago
parent
commit
52985187c8
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      Assets/ParentBehaviour.cs

+ 10
- 0
Assets/ParentBehaviour.cs View File

@ -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;
}
}
}

Loading…
Cancel
Save