public void UpdateTargetPointer() { // @TODO: allow for multiple targets/AoE/Line/etc. if (currentCommandTarget == null) { List <BattleActor>[] targets = battleManager.GetAllTargets(); ISelectionItem command = commandStack.Peek().GetSelectedItem(); switch (((ChooseTargetSelectionItem)command).targetType) { case TargetType.Enemy: // @TODO: get last selected enemy, if possible currentCommandTarget = targets[0][0].gameObject; break; case TargetType.Ally: // @TODO: get last selected ally, if possible currentCommandTarget = targets[1][0].gameObject; break; case TargetType.Self: case TargetType.Free: Debug.LogWarning(command.GetSelectionType() + " not yet implemented"); return; } if (currentCommandTarget == null) { throw new System.Exception("Could not find a target"); } } pointer = battleHUD.SetPointerTarget(playerController, currentCommandTarget); }