Exemplo n.º 1
0
        public Application(Sprite root)
        {
            rootSprite = root;

            Application.application = this;

            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth = 800;
            graphics.PreferredBackBufferHeight = 600;

            string contentDirectory = "Content";
            /*
            #if __IOS__
            contentDirectory += "iOS";
            #elif __OSX__
            contentDirectory += "MacOSX";
            #elif WINDOWS
            contentDirectory = "Content";
            #elif ANDROID
            contentDirectory = "Content/bin/Android";
            #endif*/
            Content.RootDirectory = contentDirectory;
            #if __MOBILE__
            graphics.IsFullScreen = true;
            #endif
            TouchPanel.EnabledGestures = GestureType.HorizontalDrag;
            IsMouseVisible = true;
            Assets.content = Content;
        }
Exemplo n.º 2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            var g = new MonoFlash.Application(new GameMain());
            SetContentView(g.Services.GetService<View>());
            g.Run();
        }
Exemplo n.º 3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            var g = new MonoFlash.Application(new GameMain());

            SetContentView(g.Services.GetService <View>());
            g.Run();
        }
Exemplo n.º 4
0
 public override void FinishedLaunching(MonoMac.Foundation.NSObject notification)
 {
     // Handle a Xamarin.Mac Upgrade
     AppDomain.CurrentDomain.AssemblyResolve += (object sender, ResolveEventArgs a) =>
     {
         if (a.Name.StartsWith("MonoMac"))
         {
             return typeof(MonoMac.AppKit.AppKitFramework).Assembly;
         }
         return null;
     };
     app = new Application(new GameMain());
     app.Run();
 }
        public Application(Sprite root)
        {
            rootSprite = root;

            Application.application = this;

            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth = 800;
            graphics.PreferredBackBufferHeight = 600;

            string contentDirectory = "Content";
            Content.RootDirectory = contentDirectory;
            #if __MOBILE__
            graphics.IsFullScreen = true;
            #endif
            TouchPanel.EnabledGestures = GestureType.HorizontalDrag;
            IsMouseVisible = true;
            Assets.content = Content;
        }
Exemplo n.º 6
0
 internal static void RunGame()
 {
     game = new Application(new GameMain());
     game.Run();
 }
Exemplo n.º 7
0
 static void Main()
 {
     using (var game = new Application(new projectphys.GameMain()))
         game.Run();
 }