This commit is contained in:
s-prechtl 2022-06-10 09:14:04 +02:00
parent 0ff64fd318
commit 8698df1ed2
3 changed files with 240 additions and 12 deletions

View file

@ -27,12 +27,12 @@ public class MessageView : MonoBehaviour
messageView.SetActive(false);
}
public void sendMessage(String msg, float duration) {
public void SendMessage(String msg, float duration) {
message.text = msg;
StartCoroutine(showForSeconds(duration));
StartCoroutine(ShowForSeconds(duration));
}
private IEnumerator showForSeconds(float duration) {
private IEnumerator ShowForSeconds(float duration) {
messageView.SetActive(true);
yield return new WaitForSeconds(duration);
messageView.SetActive(false);