// Called every frame protected override void InputUpdate() { if (hudController != null) { hudController.SetPrompts("PRESS " + enterExitInput.GetInputAsString() + " TO ENTER", "PRESS " + enterExitInput.GetInputAsString() + " TO EXIT"); } if (vehicleEnterExitManager.EnterableVehicles.Count > 0) { // Check for input if (enterExitInput.Down()) { Vehicle parent = vehicleEnterExitManager.EnterableVehicles[0].Vehicle; vehicleEnterExitManager.EnterParent(0); gameAgent.EnterVehicle(parent); } } else if (vehicleEnterExitManager.CanExitToChild()) { // Check for input if (enterExitInput.Down()) { Vehicle child = vehicleEnterExitManager.Child.Vehicle; vehicleEnterExitManager.ExitToChild(); gameAgent.EnterVehicle(child); } } }
void Update() { if (vehicleEnterExitManager.CanEnterParent()) { promptText.text = enterPrompt; } else if (vehicleEnterExitManager.CanExitToChild()) { promptText.text = exitPrompt; } else { promptText.text = ""; } }
void Update() { if (vehicleEnterExitManager.EnterableVehicles.Count > 0) { promptText.text = enterPrompt; } else if (vehicleEnterExitManager.CanExitToChild()) { promptText.text = exitPrompt; } else { promptText.text = ""; } }