public static void ShowImage(ui::Image image) { message_body.text = ""; message_title.text = ""; message_image = image; message_image.enabled = true; Pathways.GameState = GameStates.Msgs; Pathways.window.gameObject.SetActive(true); Pathways.window.StartCoroutine( Pathways.window.BeginDisplay(delay)); }
void Awake() { Pathways.StateChange += this.EventListener; Pathways.window = this; foreach (var child in GetComponentsInChildren<ui::Text>()) if (child.name=="Title") message_title = child; else if (child.name=="Body") message_body = child; foreach (var child in GetComponentsInChildren<ui::Image>()) if (child.name=="Image") message_image = child; if (!message_title || !message_body) Debug.LogError("missing title / body"); }
void Awake() { image = GetComponent<ui::Image>(); image.sprite = null; image.color = new Color(255,255,255,0); }