/// <summary> /// Uses the currently selected enemy to attack the currently seleccted enemy /// </summary> public void Attack() { if (selectedUnit != null && selectedEnemy != null) { selectedEnemy.takeDamage(selectedUnit.Damage, selectedUnit.DamageType); display.refreshDisplay(); DeselectTiles(); selectionState = SelectionState.Unit; selectedUnit.currentMoveRange = 0; attackButton.SetActive(false); } else { Debug.Log("Called attack when there is no selected unit / enemy"); } }