Created
June 20, 2012 19:40
-
-
Save samneirinck/2961764 to your computer and use it in GitHub Desktop.
Async
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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