private void Awake() { if (instance == null) { instance = this; } }
public static void Main (string[] args) { Mpq mpq = new MpqDirectory (args[0]); RunAnimation la = new RunAnimation (mpq); Events.Quit += Quit; Events.Run (); }
public static void Main(string[] args) { Mpq mpq = new MpqDirectory(args[0]); RunAnimation la = new RunAnimation(mpq); Events.Quit += Quit; Events.Run(); }
private async Task WaitAnimations(List <RunAnimation> animations) { Task[] tasks = new Task[animations.Count]; for (int i = 0; i < animations.Count; i++) { RunAnimation animation = animations[i]; tasks[i] = animation(); } try { await Task.WhenAll(tasks); } catch (Exception e) { Debug.LogError("problem playing end game animations"); Debug.LogError(e); } }
private static void SystemMenu() { Console.WriteLine("\n-----What do you want to do?-----\n"); Console.WriteLine("ENTER 1 to Area calculator\n "); Console.WriteLine("ENTER 2 to Show animation\n "); Console.WriteLine("ENTER 3 Out of the system\n "); Console.WriteLine("ENTER 4 to show lists\n "); var userAnswer = int.Parse(Console.ReadLine()); switch (userAnswer) { case 1: AreaCalculator(); SystemMenu(); break; case 2: RunAnimation.StartAnimation(); SystemMenu(); break; case 3: ShowLists.RunLists(); SystemMenu(); break; case 4: Console.Clear(); Console.WriteLine("Finishing..."); Thread.Sleep(1842); return; default: Console.WriteLine("Type a valid number to proceed"); break; } }
public void RegisterOnLossAnimations(RunAnimation animation) { onLossAnimations.Add(animation); }