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); } }
public TargetIndicator CreateTargetIndicator(GridPosition position, Color color, bool display) { TargetIndicator go = GameObject.Instantiate <TargetIndicator>(TargetMarker); go.SetTarget(position); go.SetColor(color); return(go); }
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; }
public TargetIndicator CreateIndicator(GridPosition pos, Color color) { TargetIndicator targerIndicator = UIManager._instance.CreateTargetIndicator(pos, color, true); return(targerIndicator); }