Created
June 8, 2018 12:32
-
-
Save garrynewman/93c68a38d9d5b46bd9ba2947dc7dbda6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 struct TimeUntil | |
{ | |
float time; | |
public static implicit operator float( TimeUntil ts ) | |
{ | |
return ts.time - Time.time; | |
} | |
public static implicit operator TimeUntil( float ts ) | |
{ | |
return new TimeUntil { time = Time.time + ts }; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment