Round end cinematic, CoroutineManager deltatime

This commit is contained in:
Regalis11
2015-12-26 19:33:23 +02:00
parent b2d5704f7e
commit 064e2eadd0
18 changed files with 138 additions and 38 deletions

View File

@@ -16,6 +16,8 @@ namespace Barotrauma
{
static List<IEnumerator<object>> Coroutines = new List<IEnumerator<object>>();
public static float DeltaTime;
// Starting a coroutine just means adding an enumerator to the list.
// You might also want to be able to stop coroutines or delete them,
// which might mean putting them into a dictionary
@@ -42,6 +44,8 @@ namespace Barotrauma
// Updating just means stepping through all the coroutines
public static void Update(float deltaTime)
{
DeltaTime = deltaTime;
for (int i = Coroutines.Count-1; i>=0; i--)
{
if (Coroutines[i].Current != null)