Skip to content

Instantly share code, notes, and snippets.

@samneirinck
Created June 20, 2012 20:07
Show Gist options
  • Save samneirinck/2961901 to your computer and use it in GitHub Desktop.
Save samneirinck/2961901 to your computer and use it in GitHub Desktop.
CryMono async support
public async void Test()
{
var originalPosition = this.Position;
Debug.Log("Wait 1 second before moving");
await Delay.TimeDelay(TimeSpan.FromSeconds(1));
Debug.Log("Starting to move");
await MoveTo(new Vec3(900, 900, 100), TimeSpan.FromSeconds(3));
Debug.LogAlways("Arrived at destination, moving back");
await MoveTo(originalPosition, TimeSpan.FromSeconds(3));
Debug.LogAlways("And back");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment