public void SwitchCharacter(int inID) { reserveUnits.Add(currentID, inBattleUnits[currentID]); inBattleUnits.Add(inID, reserveUnits[inID]); reserveUnits.Remove(inID); inBattleUnits.Remove(currentID); turnSystem.RemoveUnit(currentID); turnSystem.AddUnit(inBattleUnits[inID].GetComponent <PlayerUnit>()); targetSystem.ChangeInBattleTargets(currentID, inID); Vector3 tempPos = reserveUnits[currentID].transform.position; reserveUnits[currentID].transform.position = inBattleUnits[inID].transform.position; inBattleUnits[inID].transform.position = tempPos; reserveUnits[currentID].GetComponent <PlayerUnit>().OnSwitch(); onTurnEnd.Raise(); }