remove many references to Game.world

This commit is contained in:
Bob
2010-10-11 02:44:16 +13:00
parent f8776d773d
commit 6a25d989a7
10 changed files with 88 additions and 63 deletions

View File

@@ -9,6 +9,7 @@
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
@@ -186,7 +187,7 @@ namespace OpenRA
public static void IssueOrder( Order o ) { orderManager.IssueOrder( o ); } /* avoid exposing the OM to mod code */
public static event Action AfterGameStart = () => {};
public static event Action<World> AfterGameStart = _ => {};
public static event Action BeforeGameStart = () => {};
internal static void StartGame(string map)
{
@@ -200,7 +201,7 @@ namespace OpenRA
orderManager.StartGame();
viewport.RefreshPalette();
AfterGameStart();
AfterGameStart( world );
}
public static void DispatchMouseInput(MouseInputEvent ev, MouseEventArgs e, Modifiers modifierKeys)
@@ -291,7 +292,7 @@ namespace OpenRA
JoinLocal();
StartGame(modData.Manifest.ShellmapUid);
Game.AfterGameStart += world => Widget.OpenWindow("INGAME_ROOT", new Dictionary<string,object>{{"world", world}});
Game.ConnectionStateChanged += () =>
@@ -318,7 +319,7 @@ namespace OpenRA
break;
}
};
modData.WidgetLoader.LoadWidget( new Dictionary<string,object>(), Widget.RootWidget, "PERF_BG" );
Widget.OpenWindow("MAINMENU_BG");