From 68d2750ff18570d9fc65bbd19c70dbcfe6babf3b Mon Sep 17 00:00:00 2001 From: Philip White Date: Sun, 14 Nov 2021 12:00:11 +0000 Subject: [PATCH] Added Fechting Scores Animation --- .../FetchingScoresAnimation.cs | 30 +++++++++++++++++++ .../FetchingScoresAnimation.cs.meta | 11 +++++++ 2 files changed, 41 insertions(+) create mode 100644 Unity-Files/Assets/Animations/Game Over Screen/FetchingScoresAnimation.cs create mode 100644 Unity-Files/Assets/Animations/Game Over Screen/FetchingScoresAnimation.cs.meta diff --git a/Unity-Files/Assets/Animations/Game Over Screen/FetchingScoresAnimation.cs b/Unity-Files/Assets/Animations/Game Over Screen/FetchingScoresAnimation.cs new file mode 100644 index 0000000..b5cd7d6 --- /dev/null +++ b/Unity-Files/Assets/Animations/Game Over Screen/FetchingScoresAnimation.cs @@ -0,0 +1,30 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System.Threading.Tasks; +using UnityEngine.UI; + +public class FetchingScoresAnimation : MonoBehaviour +{ + + void Update() + { + AnimateText(); + } + + private async void AnimateText() + { + Text text = GetComponent(); + while (true) + { + await Task.Run(async () => { + text.text = "Fetching Scores."; + await Task.Delay(1000); + text.text = "Fetching Scores.."; + await Task.Delay(1000); + text.text = "Fetching Scores..."; + await Task.Delay(1000); + }); + } + } +} diff --git a/Unity-Files/Assets/Animations/Game Over Screen/FetchingScoresAnimation.cs.meta b/Unity-Files/Assets/Animations/Game Over Screen/FetchingScoresAnimation.cs.meta new file mode 100644 index 0000000..7dd191b --- /dev/null +++ b/Unity-Files/Assets/Animations/Game Over Screen/FetchingScoresAnimation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5b53f28e9e952b644890fd1bc631a6d6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: