private void Start() { _hoverText = HUD.Instance.CreateMenu <HoverText>(); _hoverText.SetVisible(false); _hoverText.SetText(Util.Localisation.LocManager.GetTranslation(TeleporterPrompt)); _hoverText.SetTrackedObject(transform, new Vector3(0.0f, 5.0f, 0.0f)); }
private void MouseLeftClick(Transform point) { BaseComponent baseComponent = point.GetComponent <BaseComponent>(); if (baseComponent != null && baseComponent.HasTag(Tag.Radio)) { if (_audio.isPlaying) { _audio.Stop(); _shake.enabled = false; _hoverText.SetText("Įjungti muziką"); } else { PlaySong(); _hoverText.SetText("Išjungti muziką/\nPerjungti dainą"); } } }
public void OnTriggerEnter2D(Collider2D other) { if (!other.gameObject.CompareTag("Player")) { return; } m_playerInside = true; if (RopeReel.Instance.Active) { return; } m_hoverText.Show(); m_hoverText.SetText("[Press Q to pick up cable]"); }
private void Start() { _audio = GetComponent <AudioSource>(); _shake = GetComponent <Shake>(); _shake.enabled = false; _hoverText = GetComponent <HoverText>(); _hoverText.SetText("Įjungti muziką"); if (_songs.Any()) { _audio.clip = _songs[0]; } SubscribeEvents(); }
private void HandleDogs(InputManager input) { CursorStatus cursorStatus = new CursorStatus(Inventory, Scene, input); if (!cursorStatus.HasDog) { HoverText.UnSetText(); return; } HoverText.SetText(cursorStatus.Dog.Name); if (cursorStatus.RightClicked) { GameManager.Instance.StartDialog(); } }