Exemple #1
0
        public LongRunningAction Reboot(string toLevel)
        {
            Reboot reboot = new Reboot(this.Game, toLevel);

            ServiceHelper.AddComponent((IGameComponent)reboot);
            bool disposed = false;

            reboot.Disposed += (EventHandler <EventArgs>)((_, __) => disposed = true);
            return(new LongRunningAction((Func <float, float, bool>)((_, __) => disposed)));
        }
Exemple #2
0
 public LongRunningAction Reboot(string toLevel)
 {
   Reboot reboot = new Reboot(this.Game, toLevel);
   ServiceHelper.AddComponent((IGameComponent) reboot);
   bool disposed = false;
   reboot.Disposed += (EventHandler<EventArgs>) ((_, __) => disposed = true);
   return new LongRunningAction((Func<float, float, bool>) ((_, __) => disposed));
 }