public void BankruptOnPlayer (GamePlayer player) { Debug.Log (playerName+": Bankrupt on Player"); #if UNITY_EDITOR //UnityEditor.EditorApplication.isPaused = true; #endif for(int i=0;i<ownedProperties.Count;i++){ // remove all houses on that property ownedProperties[i].RemoveHouseUpgrade(999); // add our property to that player player.AddProperty(ownedProperties[i]); // remove property from our player RemoveProperty(ownedProperties[i]); // go back a step in the list i--; } }