public void ShowExplicitThis(string key) { AudioCollector.PlayOneShot("ClickWoodSubtle", 0); _rectTransform.position = Hoverable.MousePositionTowardsScreenCenter(); _text.text = key; showedAt = Time.time; }
public void Show(Vector3 pos, string key) { AudioCollector.PlayOneShot("ClickWoodSubtle", 0); _key = key; _msg = Languages.ReturnString(key + ".HoverSmall"); _rectTransform.position = Hoverable.MousePositionTowardsScreenCenter(); _text.text = _msg; showedAt = Time.time; }
/// < /// summary> /// For unity eventTrigger /// /// </summary> private void PublicSpawnHelp() { var pos = Hoverable.MousePositionTowardsScreenCenter(); if (IsAProductHover) { hoverWindow.ShowMsg(MyMsg()); } else { hoverWindow.Show(MyMsg()); } }
/// <summary> /// This one is a simple message /// </summary> /// <param name="pos"></param> /// <param name="msg"></param> public void ShowMsg(string msg) { //_rectTransform.SetAsLastSibling(); AudioCollector.PlayOneShot("ClickWoodSubtle", 0); _key = ""; _msg = Languages.ReturnString(msg); _rectTransform.position = Hoverable.MousePositionTowardsScreenCenter(); _text.text = _msg; showedAt = Time.time; }
// Update is called once per frame void Update() { //means is hiding. if (_rectTransform.position.x < -80000) { return; } _rectTransform.position = Hoverable.MousePositionTowardsScreenCenter(); //after 3 seconds of being show //if key = "" is a simple msg with out key if (Time.time > showedAt + .7 && !string.IsNullOrEmpty(_key)) { SpawnMedHover(); } }