public static TalkFactory GetInstance() { if (instance == null) { instance = new TalkFactory(); } return(instance); }
private void talk() { TK = TalkFactory.GetInstance(); reset(); if (TK.talk[current].speaker == "Wolf") { Animator WolfAni = WolfBubble.GetComponent <Animator>(); WolfText.text = TK.talk[current].content; WolfAni.SetBool("big", true); } else if (TK.talk[current].speaker == "Squirrel") { Animator SquirrelAni = SquirrelBubble.GetComponent <Animator>(); SquirrelText.text = TK.talk[current].content; SquirrelAni.SetBool("big", true); } else if (TK.talk[current].speaker == "Hare") { Animator HareAni = HareBubble.GetComponent <Animator>(); HareText.text = TK.talk[current].content; HareAni.SetBool("big", true); } else if (TK.talk[current].speaker == "Fox") { Animator FoxAni = FoxBubble.GetComponent <Animator>(); FoxText.text = TK.talk[current].content; FoxAni.SetBool("big", true); } else if (TK.talk[current].speaker == "Deer") { Animator DeerAni = DeerBubble.GetComponent <Animator>(); DeerText.text = TK.talk[current].content; DeerAni.SetBool("big", true); } else if (TK.talk[current].speaker == "Boar") { Animator BoarAni = BoarBubble.GetComponent <Animator>(); BoarText.text = TK.talk[current].content; BoarAni.SetBool("big", true); } else if (TK.talk[current].speaker == "Bear") { Animator BearAni = BearBubble.GetComponent <Animator>(); BearText.text = TK.talk[current].content; BearAni.SetBool("big", true); } }