public void ShowSelection(bool state)
        {
            Selection.gameObject.SetActive(state);
            Selection.gameObject.transform.DOPunchScale(new Vector3(0.1f, 0.1f, 0), 0.5f);

            if (state)
            {
                audio.PlaySelect();
            }
        }
Example #2
0
        private void OnEntitySelected(Entity selectedEntity, bool isSelected)
        {
            Selection.gameObject.SetActive(isSelected);

            if (isSelected)
            {
                Selection.gameObject.transform.DOPunchScale(new Vector3(0.1f, 0.1f, 0), 0.5f);
                audio.PlaySelect();

                levelService.HideAllBreadCrumbs();
                foreach (var moveTargetPosition in selectedEntity.possibleMoveTargets)
                {
                    levelService.SetBreadCrumbVisible(moveTargetPosition.x, moveTargetPosition.y, true);
                }
            }
        }