Skip to content

Instantly share code, notes, and snippets.

@samneirinck
Created June 20, 2012 19:40
Show Gist options
  • Save samneirinck/2961764 to your computer and use it in GitHub Desktop.
Save samneirinck/2961764 to your computer and use it in GitHub Desktop.
Async
using System;
using CryEngine;
namespace CryGameCode.Entities.AngryBoids
{
[Entity(Category = "AngryBoids")]
public class TheBoringOne : AngryBoid
{
public TheBoringOne()
: base()
{
}
protected override void OnReset(bool enteringGame)
{
if (enteringGame)
Test();
base.OnReset(enteringGame);
}
public async void Test()
{
Debug.LogAlways("Begin waiting");
await Delay.TimeDelay(TimeSpan.FromSeconds(5));
Debug.LogAlways("Done waiting, do something next frame");
await Delay.FrameDelay(1);
Debug.LogAlways("Now ready!");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment