protected override void OnPlayerEnteredBuilding(FireStation station) { base.OnPlayerEnteredBuilding(station); PlayerManager.Instance.SetPlayerToState(PlayerStateType.Firefighter); roleSelectionScreen = new FireStationRoleSelectionScreen(station); roleSelectionScreen.RoleSelected += OnFirefighterRoleSelected; FireCalloutsManager.Instance.StartNewCalloutsAutomatically = false; }
private void OnFirefighterRoleSelected(FirefighterRole role) { Game.LogTrivial("Player selected firefighter role: " + role); PlayerManager.Instance.FirefighterRole = role; if (roleSelectionScreen != null) { Vehicle v = roleSelectionScreen.Station.GetVehicleForRole(role); if (v) { Game.LocalPlayer.Character.Position = v.FrontPosition + v.ForwardVector * 5.0f; Game.LocalPlayer.Character.Heading = MathHelper.ConvertDirectionToHeading((v.Position - Game.LocalPlayer.Character.Position).ToNormalized()); } roleSelectionScreen.CleanUp(); } roleSelectionScreen = null; FireCalloutsManager.Instance.StartNewCalloutsAutomatically = true; }