예제 #1
0
        public static void SetTarget(ITargetable target, bool show = true)
        {
            if (indicator == null)
            {
                indicator = UIManager._instance.CreateTargetIndicator(target.getGridPosition(), Color.red, true);
            }
            else
            {
                indicator.SetTarget(target.getGridPosition());
                indicator.SetColor(Color.red);
                indicator.SetShow(show);
            }

            currentTarget       = target;
            currentPosition     = target.getGridPosition();
            CameraFollow.target = target.GetTransform();

            if (Character.GetCharacterAtTile(currentPosition) != null)
            {
                BattleUIContainer.RefreshUnitView(Character.GetCharacterAtTile(currentPosition));
            }

            if (currentTargetList != null && currentTargetList.Contains(target))
            {
                SelectedIndex = currentTargetList.IndexOf(target);
            }
        }
예제 #2
0
        public TargetIndicator CreateTargetIndicator(GridPosition position, Color color, bool display)
        {
            TargetIndicator go = GameObject.Instantiate <TargetIndicator>(TargetMarker);

            go.SetTarget(position);
            go.SetColor(color);

            return(go);
        }
예제 #3
0
        public static void Move(GridPosition position, Color color, bool show = true)
        {
            if (indicator == null)
            {
                indicator = UIManager._instance.CreateTargetIndicator(position, color, true);
            }
            indicator.SetTarget(position);
            indicator.SetColor(color);
            indicator.SetShow(show);

            if (Character.GetCharacterAtTile(position) != null)
            {
                BattleUIContainer.RefreshUnitView(Character.GetCharacterAtTile(position));
            }

            currentPosition = position;
        }
예제 #4
0
        public TargetIndicator CreateIndicator(GridPosition pos, Color color)
        {
            TargetIndicator targerIndicator = UIManager._instance.CreateTargetIndicator(pos, color, true);

            return(targerIndicator);
        }