public void FireCrewMember(PlayerShip player, SpaceStation atStation, CrewMember crewMember) { var ship = player.Ship; Debug.Assert(ship != null, "can't sell stuff without a ship"); Debug.Assert(crewMember == ship.GetCaptain() || ship.GetPassengers().Contains(crewMember), "can't fire someone who doesn't work for you"); atStation.AvailableCrew.Add(crewMember); crewMember.Unassign(); }
private void CrewField(CrewMember crewMember, CrewAssignment assignment) { var selected = EditorGUILayout.ObjectField(crewMember, typeof(CrewMember), true) as CrewMember; if (crewMember != selected) { if (crewMember) { crewMember.Unassign(); } if (selected) { selected.Assign(target as Ship, assignment); } } }