Created
January 12, 2013 00:08
-
-
Save tomspilman/4515095 to your computer and use it in GitHub Desktop.
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
_root = new Sequence | |
{ | |
Call.Void( () => { Program.MineCycles++; Say("Walking to the mine!"); } ), | |
Wait.Seconds( 2 ), | |
Call.Void(() => Say("Entering the mine!")), | |
Wait.Seconds( 1 ), | |
new While( IsNotFatigued ) | |
{ | |
Wait.Seconds( 3 ), | |
Call.Void(() => ++_fatigue), | |
new If(() => _injector.Resolve<Random>().NextDouble() < 0.2) | |
{ | |
Call.Void( () => ++_goldCarried ), | |
Call.Void( () => Say("Got {0} nuggets!", _goldCarried) ), | |
} | |
}, | |
Call.Void( () => Say("Exiting the mine with {0} nuggets!", _goldCarried) ), | |
Wait.Seconds( 1 ), | |
Call.Void( () => Say("Walking home!") ), | |
Wait.Seconds( 3 ), | |
Call.Void( () => Say("Back at the shack!") ), | |
Wait.Seconds( 2 ), | |
Call.Void( () => Say("Dumping {0} nuggets!", _goldCarried) ), | |
Wait.Seconds( 1 ), | |
Call.Void( () => _goldCarried = 0 ), | |
// Tired? | |
new If( NeedsSleep ) | |
{ | |
Call.Void( () => Say("Going to sleep!") ), | |
Wait.Seconds( 2 ), | |
// Sleeping! | |
new While( NeedsSleep ) | |
{ | |
Call.Void( () => Say("ZZZZZZZ...") ), | |
Wait.Seconds( 1 ), | |
Call.Void( () => _fatigue-- ), | |
}, | |
Call.Void( () => Say("Waking up!") ), | |
}, | |
Call.Void( () => Say("Getting ready to mine!") ), | |
Wait.Seconds( 2 ), | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment