|
@@ -23,6 +23,12 @@ using Microsoft.Xna.Framework.Input.Touch;
|
|
|
using MonoMac.AppKit;
|
|
|
using MonoMac.Foundation;
|
|
|
#endif
|
|
|
+
|
|
|
+#if IOS
|
|
|
+using MonoTouch.UIKit;
|
|
|
+using MonoTouch.Foundation;
|
|
|
+#endif
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
namespace CatapultGame
|
|
@@ -123,8 +129,13 @@ namespace CatapultGame
|
|
|
// Create an Autorelease Pool or we will leak objects.
|
|
|
using (var pool = new NSAutoreleasePool()) {
|
|
|
// Make sure we invoke this on the Main Thread or OpenGL will throw an error
|
|
|
+#if MACOS
|
|
|
MonoMac.AppKit.NSApplication.SharedApplication.BeginInvokeOnMainThread (delegate {
|
|
|
-
|
|
|
+#endif
|
|
|
+#if IOS
|
|
|
+ var invokeOnMainThredObj = new NSObject();
|
|
|
+ invokeOnMainThredObj.InvokeOnMainThread(delegate {
|
|
|
+#endif
|
|
|
gameplayScreen.LoadAssets ();
|
|
|
});
|
|
|
}
|