void clear() { active = null; left.clear(); left.gameObject.SetActive(false); right.clear(); right.gameObject.SetActive(false); center.clear(); center.gameObject.SetActive(false); }
public override void initSingleton() { left = transform.Find("left").GetComponent <GameMsgBoxTextUI>(); left.setPivot(new Vector2(0.0f, 0.0f)); right = transform.Find("right").GetComponent <GameMsgBoxTextUI>(); right.setPivot(new Vector2(1.0f, 0.0f)); center = transform.Find("center").GetComponent <GameMsgBoxTextUI>(); center.setPivot(new Vector2(1.0f, 0.0f)); }
public void showText(int face, int type, int side, string str, OnEventOver over) { bool bs = IsShow; clear(); show(); onEventOver = over; switch (side) { case -1: active = center; break; case 0: active = left; break; case 1: active = right; break; default: active = left; break; } active.gameObject.SetActive(true); active.showText(face, type, str); if (!bs) { showFade(); } time = 0.0f; }