Created
June 20, 2012 20:07
-
-
Save samneirinck/2961901 to your computer and use it in GitHub Desktop.
CryMono async support
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
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