Exemplo n.º 1
0
        public void Initialize(Vector3 position, Vector3 direction, DescriptionData data)
        {
            Title.text      = data.Title;
            Text.text       = data.Text;
            ActionText.text = data.ActionText;

            StartCoroutine(
                setPositionRoutine(
                    position,
                    direction,
                    () => FadeManager.I.Fade(0f, Constants.HOVER_TRANSITION_TIME, setAlpha)));
        }
Exemplo n.º 2
0
        private void createHoverOverlay()
        {
            hoverOverlay = UnityHelper.Instantiate(HelperObjects.HoverOverlayPrefab).GetComponent <HoverOverlay>();

            var position  = GameOverlay ? Input.mousePosition : transform.position;
            var direction = new Vector3(ShowOnLeft ? -1 : 1, ShowUnder ? -1 : 1);
            var data      = new DescriptionData {
                Title      = Title,
                Text       = Text,
                ActionText = Formatter.BuildActionText(ActionText)
            };

            hoverOverlay.Initialize(position, direction, data);
        }