From e78c1338e8bc5f09726210acb0245822436c805f Mon Sep 17 00:00:00 2001 From: s402520 <sven.gerlach@stud-mail.uni-wuerzburg.de> Date: Fri, 5 May 2023 13:33:07 +0200 Subject: [PATCH] Refactoring --- Assets/UI/DialogueBox/DialogueBox.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/UI/DialogueBox/DialogueBox.cs b/Assets/UI/DialogueBox/DialogueBox.cs index b398374..ae23e65 100644 --- a/Assets/UI/DialogueBox/DialogueBox.cs +++ b/Assets/UI/DialogueBox/DialogueBox.cs @@ -39,8 +39,9 @@ public void OnEnable() { public void ClearUI() { SetActor(string.Empty); SetText(string.Empty); - for (var i = 0; i < buttons.Length; i++) - buttons[i].visible = false; + foreach (var button in buttons) { + button.visible = false; + } } public void SetActor(string actor) { -- GitLab