private void TryMoveAttack(Unit unit, Vector3 point, int speed, Targeter.AttackType attackType, GameObject main) { //Debug.Log($"AI Combat TryMoveAttack enemy: {unit}, main: {main}, attack pos: {point} , unit.GetTargeter() {unit.GetTargeter()}"); //unit.GetTargeter().CmdSetTarget(main, attackType); //Debug.Log($"unit.GetUnitMovement(): {unit.GetUnitMovement().name} "); //unit.GetUnitMovement().CmdMoveAttack(point, speed); //unit.GetUnitMovement().unitNetworkAnimator.SetTrigger("run"); }
private void TryTarget(Targetable target, Targeter.AttackType attackType) { foreach (Unit unit in unitSelectionHandler.SelectedUnits) { //Debug.Log($"Try Target {target.gameObject} , {attackType}"); unit.GetTargeter().CmdSetTarget(target.gameObject, attackType); } }
private void TryAttack(Unit unit, Targetable target, Targeter.AttackType attackType) { //foreach (Unit unit in unitSelectionHandler.SelectedUnits) //{ unit.GetTargeter().CmdSetTarget(target.gameObject, attackType); // Set or unset the attack animation unit.GetUnitMovement().unitNetworkAnimator.SetTrigger("attack"); //} }
private void TryMoveAttack(Unit unit, Vector3 point, int speed, Targeter.AttackType attackType) { //Debug.Log($"Move Attack selected unit {unit} , point {point} "); //foreach (Unit unit in unitSelectionHandler.SelectedUnits) //{ unit.GetTargeter().CmdSetTarget(target.gameObject, attackType); unit.GetUnitMovement().CmdMoveAttack(point, speed); unit.GetUnitMovement().unitNetworkAnimator.SetTrigger("run"); //} }
private void TryMove(Vector3 point, Targeter.AttackType attackType) { //Debug.Log($" unitSelectionHandler.SelectedUnits try move {unitSelectionHandler.SelectedUnits.Count}"); foreach (Unit unit in unitSelectionHandler.SelectedUnits) { //Debug.Log($" unit {unit} to point {point}"); unit.GetTargeter().CmdSetAttackType(attackType); unit.GetUnitMovement().CmdMove(point); unit.GetUnitMovement().unitNetworkAnimator.SetTrigger("run"); } }