public void switchPlayerControl(PlayerControllable playerControllable) { if (curPlayerControllable) { curPlayerControllable.ReleaseControl(true, () => { setCurPlayerControllable(playerControllable); }); } else { setCurPlayerControllable(playerControllable); } }