/// public NarrativeCharacter(string n, bool enableOnStart = true) { NarrativeCharacterManager ncm = NarrativeCharacterManager.instance; GameObject ncprefab = Resources.Load("NarrativeDummyCharacters/Char[" + n + "]") as GameObject; GameObject gob = GameObject.Instantiate(ncprefab, ncm.charPanel); root = gob.GetComponent <RectTransform>(); charname = n; renderers.singlayer = gob.GetComponentInChildren <RawImage>(); if (isMultiLayerCharacter) { renderers.body = gob.transform.Find("BodyLayer").GetComponentInChildren <Image>(); renderers.expression = gob.transform.Find("ExpressionLayer").GetComponentInChildren <Image>(); renderers.allBodies.Add(renderers.body); renderers.allExpressions.Add(renderers.expression); } nd = NarrativeDialogue.instance; enabled = enableOnStart; }
void Awake() { instance = this; }