private void ShowTachie(string speaker, string panel, WhichImage which) { Sprite tachie = null; if (DBManager.Instance.TachieDict.ContainsKey(speaker)) { tachie = DBManager.Instance.TachieDict[speaker]; } var useImage = (which == WhichImage.LeftImage ? leftImage : rightImage); var otherImage = (useImage == leftImage ? rightImage : leftImage); if (otherImage.sprite != null) { otherImage.color = defaultColor; } useImage.sprite = tachie; if (DBManager.Instance.TachieDict.ContainsKey(panel)) { dialogPanelImage.sprite = DBManager.Instance.TachieDict[panel]; } if (tachie == null) { useImage.color = hideColor; } else { useImage.color = hightLightColor; } }
public void ShowTachie(string speaker, WhichImage which) { Sprite tachie = null; if (TachieDict.ContainsKey(speaker)) { tachie = TachieDict[speaker]; } var useImage = (which == WhichImage.LeftImage ? leftImage : rightImage); var otherImage = (useImage == leftImage ? rightImage : leftImage); if (otherImage.sprite != null) { otherImage.color = new Color(1f, 1f, 1f, 0.5f); } useImage.sprite = tachie; if (tachie == null) { useImage.color = new Color(1f, 1f, 1f, 0f); } else { useImage.color = new Color(1f, 1f, 1f, 1f); } }
private void ShowDialog(string speaker, string panel, string content, WhichImage which = WhichImage.LeftImage) { activeDialogPanel(); ShowTachie(speaker, panel, which); // // add Name // string text = "<b>" + speaker + "</b>: "; dialogText.text = ""; dialogTypewriter.SetText(content); }
public void ShowDialog(string speaker, string content, WhichImage which = WhichImage.LeftImage) { characterAvatar.sprite = AvatarDict.ContainsKey(speaker) ? AvatarDict[speaker] : null; ShowTachie(speaker, which); string text = "<b>" + speaker + "</b>: "; dialogText.text = text; // dialogText.text = text; dialogPanel.SetActive(true); dialogTypewriter.SetText(content, true); }