Example #1
0
        public void StartSelection(OnSelection onSelection, EntitySelectionType selectionType, int startIndex, params BattleEntity[] targets)
        {
            StartSelection(onSelection, selectionType, targets);

            //Works with the failsafe in the other overload
            if (Targets != null)
            {
                ChangeSelection(startIndex);
            }
        }
Example #2
0
        public void StartSelection(OnSelection onSelection, EntitySelectionType selectionType, params BattleEntity[] targets)
        {
            Targets       = targets;
            Selection     = onSelection;
            SelectionType = selectionType;

            //Failsafe - end selection immediately if inputs are invalid
            if (Targets == null || Targets.Length == 0)
            {
                Debug.LogError($"Null or empty target array in {nameof(TargetSelectionMenu)}.{nameof(StartSelection)}, ending selection...");
                EndSelection();
            }
        }
Example #3
0
        public void EndSelection()
        {
            CurSelection  = 0;
            Targets       = null;
            Selection     = null;
            SelectionType = EntitySelectionType.Single;

            if (BattleUIManager.Instance.TopMenu != null)
            {
                BattleUIManager.Instance.PopMenu();
            }

            Cursor.Reset();
        }