예제 #1
0
        static void Main()
        {
            CCApplication application = new CCApplication(false, new CCSize(800f, 450f));

            application.ApplicationDelegate = new AppDelegate();
            application.StartGame();
        }
예제 #2
0
        public override void FinishedLaunching(UIApplication app)
        {
            var application = new CCApplication();

            application.ApplicationDelegate = new GameAppDelegate();
            application.StartGame();
        }
예제 #3
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            CCApplication application = new CCApplication(false, new CCSize(1024f, 768f));

            application.ApplicationDelegate = new AppDelegate();
            application.StartGame();
        }
예제 #4
0
        public override void FinishedLaunching(NSObject notification)
        {
            var application = new CCApplication();

            application.ApplicationDelegate = new AppDelegate();
            application.StartGame();
        }
예제 #5
0
        public override void FinishedLaunching(NSObject notification)
        {
            CCApplication application = new CCApplication(false, new CCSize(1024f, 768f));

            application.ApplicationDelegate = new AppDelegate();

            application.StartGame();
        }
예제 #6
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var application = new CCApplication();

            application.ApplicationDelegate = new GameAppDelegate();
            application.StartGame();
            return(true);
        }
예제 #7
0
        public override void FinishedLaunching(UIApplication application)
        {
            var ccApp = new CCApplication {
                ApplicationDelegate = new GameAppDelegate()
            };

            ccApp.StartGame();
        }
예제 #8
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            CCApplication application = new CCApplication(true);

            application.ApplicationDelegate = new AppDelegate();

            application.StartGame();
        }
예제 #9
0
        public override void FinishedLaunching(MonoMac.Foundation.NSObject notification)
        {
            CCApplication application = new CCApplication();

            application.ApplicationDelegate = new GameAppDelegate();

            application.StartGame();
        }
예제 #10
0
        public override void FinishedLaunching(UIApplication app)
        {
            CCApplication application = new CCApplication();

            application.ApplicationDelegate = new HarkDev.CocosSharp.CCSpawn.AppDelegate();

            application.StartGame();
        }
예제 #11
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            var application = new CCApplication();

            application.ApplicationDelegate = new CocosApplicationDelegate();
            SetContentView(application.AndroidContentView);
            application.StartGame();
        }
예제 #12
0
        static void Main(string[] args)
        {
            Constants.oS = Constants.OS.WINDOWS;
            CCApplication application = new CCApplication(false, new CCSize(Constants.COCOS_WORLD_WIDTH / 3, Constants.COCOS_WORLD_HEIGHT / 3));

            application.ApplicationDelegate = new AppDelegate();

            application.StartGame();
        }
예제 #13
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override void FinishedLaunching(UIApplication app)
        {
            CCLog.Logger = System.Diagnostics.Debug.WriteLine;

            CCApplication application = new CCApplication();

            application.ApplicationDelegate = new GameAppDelegate();

            application.StartGame();
        }
예제 #14
0
        private static void Main(string[] args)
        {
            Locator.CurrentMutable.RegisterConstant(new ConsoleLogger(), typeof(ILogger));

            var app = new CCApplication(false, new CCSize(1024f, 768f))
            {
                ApplicationDelegate = new CocosInjectionAppDelgate()
            };

            app.StartGame();
        }
예제 #15
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            CoinTimeGame.ContentLoading.XmlDeserializer.Self.Activity = this;

            var application = new CCApplication();

            application.ApplicationDelegate = new GameAppDelegate();
            SetContentView(application.AndroidContentView);
            application.StartGame();
        }
예제 #16
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            var application = new CCApplication();

            application.ApplicationDelegate = new GoneBananasApplicationDelegate();
            SetContentView(application.AndroidContentView);
            application.StartGame();
            // Set our view from the "main" layout resource
            // SetContentView (Resource.Layout.Main);
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            var application = new CCApplication();

            // GameAppDelegate is your class that inherits
            // from CCApplicationDelegate
            application.ApplicationDelegate = new GameAppDelegate();
            SetContentView(application.AndroidContentView);
            application.StartGame();
        }
예제 #18
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
#if OUYA
            Ouya.Console.Api.OuyaFacade.Instance.Init(this, "f3366755-190b-4b95-af21-ca4a01a99478");         // Our UUID dev ID
#endif
            CCApplication application = new CCApplication();
            application.ApplicationDelegate = new AppDelegate();

            this.SetContentView(application.AndroidContentView);

            application.StartGame();
        }
예제 #19
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            ContentLoading.XmlDeserializer.Self.Activity = this;
            var application = new CCApplication();

            application.ApplicationDelegate = new GameAppDelegate(); //https://forums.xamarin.com/discussion/55345/cocossharp-v1-7-0-0-pre1-embeddable-game-view-and-xamarin-forms-support
            SetContentView(application.AndroidContentView);
            application.StartGame();
            application.AndroidContentView.RequestFocus();
            application.AndroidContentView.KeyPress += HandleKeyPress;
        }
예제 #20
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override void FinishedLaunching(UIApplication app)
        {
            CCApplication application = new CCApplication();

            application.ApplicationDelegate = new GameAppDelegate();

                        #if !DEBUG
            Xamarin.Insights.Initialize("24e57f0b30120942dd4c385da58011842fe77c59");
            Xamarin.Insights.ForceDataTransmission = true;
                        #endif

            application.StartGame();
        }
예제 #21
0
파일: Program.cs 프로젝트: EikeStein/HexMex
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            CCLog.Logger = (e, a) => { };
            System.Diagnostics.Debug.WriteLine("");

#if DEBUG
            Tests.RunTests();
#endif

            string buildingXml;
            string colorXml;
            string languageXml;

            using (var colorsStream = Assets.Open("colors.xml"))
            {
                using (var sr = new StreamReader(colorsStream))
                {
                    colorXml = sr.ReadToEnd();
                }
            }

            using (var buildingStream = Assets.Open("buildings.xml"))
            {
                using (var sr = new StreamReader(buildingStream))
                {
                    buildingXml = sr.ReadToEnd();
                }
            }

            using (var languageStream = Assets.Open("languages.xml"))
            {
                using (var sr = new StreamReader(languageStream))
                {
                    languageXml = sr.ReadToEnd();
                }
            }

            var           buildingDescriptionDatabase = BuildingDescriptionDatabase.CreateFromXml(buildingXml);
            var           colorCollectionFile         = ColorCollectionFile.CreateFromXml(colorXml);
            var           languageSettings            = LoadLanguagesFromXml(languageXml);
            CCApplication application = new CCApplication {
                ApplicationDelegate = new AppDelegate(new AndroidDataLoader(), this, buildingDescriptionDatabase, colorCollectionFile, languageSettings)
            };

            SetContentView(application.AndroidContentView);
            application.StartGame();
        }
예제 #22
0
        static void Main(string[] args)
        {
            XmlConfigurator.Configure();
            CCApplication application = new CCApplication(false, new CCSize(1024f, 768f));

            application.ApplicationDelegate = new AppDelegate();
            try
            {
                application.StartGame();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
                Console.Read();
            }
        }
예제 #23
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
                        #if !DEBUG
            Xamarin.Insights.Initialize("24e57f0b30120942dd4c385da58011842fe77c59");
            Xamarin.Insights.ForceDataTransmission = true;
                        #endif



            var application = new CCApplication();
            application.ApplicationDelegate = new GameAppDelegate();
            GameAppDelegate.CurrentActivity = this;
            SetContentView(application.AndroidContentView);
            application.StartGame();
        }
예제 #24
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            var application = new CCApplication();

            application.ApplicationDelegate = new GoneBananasApplicationDelegate();
            SetContentView(application.AndroidContentView);
            application.StartGame();

            if (mSensorManager == null)
            {
                mSensorManager = (SensorManager)GetSystemService(Activity.SensorService);
            }

            if (mAccelerometer == null)
            {
                mAccelerometer = new Accelerometer_Droid(mSensorManager);
            }
        }
예제 #25
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            CCApplication application = new CCApplication();
            var           appDelegate = new AppDelegate();

            appDelegate.BackButtonWasPressed = BackButtonWasPressed;
            application.ApplicationDelegate  = appDelegate;

            this.SetContentView(application.AndroidContentView);

            var packageName = this.PackageName;
            var appInfo     = PackageManager.GetApplicationInfo(packageName, PackageInfoFlags.Activities);

            _juceActivity = new JuceActivity();

            _juceActivity.LaunchApp(appInfo.PublicSourceDir, appInfo.DataDir);

            application.StartGame();
        }
예제 #26
0
        /// <param name="requestCode">The integer request code originally supplied to
        ///  startActivityForResult(), allowing you to identify who this
        ///  result came from.</param>
        /// <param name="resultCode">The integer result code returned by the child activity
        ///  through its setResult().</param>
        /// <param name="data">An Intent, which can return result data to the caller
        ///  (various data can be attached to Intent "extras").</param>
        /// <summary>
        /// Called when an activity you launched exits, giving you the requestCode
        ///  you started it with, the resultCode it returned, and any additional
        ///  data from it.
        /// </summary>
        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            _playerControllerList.Clear();

            if (requestCode == 2 && resultCode == Result.Ok)
            {
                BTManager.Instance.eventLocalMessageReceived += handleLocalMessage;
                if (!BTManager.Instance.isSlave())
                {
                    _gameProfile = new GameProfile(data);

                    using (CriptoRandom rnd = new CriptoRandom())
                        Board.Instance.InitializeMaster(_gameProfile.PlayerNames, _gameProfile.Dealer, rnd);

                    BTManager.Instance.initializeCommunication();

                    if (BTManager.Instance.getNumConnected() > 0)
                    {
                        BTManager.Instance.WriteToAllSlave(new PackageBoard());
                    }

                    _playerControllerList = new List <IPlayerController> (Board.PLAYER_NUMBER);

                    for (int i = 1; i < Board.PLAYER_NUMBER; i++)
                    {
                        if (_gameProfile.getPlayerAddress(i - 1) == Resources.GetString(Resource.String.none_add))
                        {
                            _playerControllerList.Add(new AIPlayerController((Player)i, new AIBMobileJump(3, 1, 1), new AISQuality(), new AICProva()));
                        }
                        else
                        {
                            BTPlayerController bt = new BTPlayerController(i);
                            _playerControllerList.Add(bt);
                            ((Player)i).SetController(bt);
                        }
                    }
                }


                if (primo)
                {
                    var application = new CCApplication();
                    application.ApplicationDelegate = new GameAppDelegate(_terminateMsg);

                    SetContentView(application.AndroidContentView);

                    application.StartGame();
                    primo = false;
                }
                else
                {
                    lock (_terminateMsg) {
                        Monitor.Pulse(_terminateMsg);
                    }
                }

                if (BTManager.Instance.isSlave())
                {
                    BTManager.Instance.eventPackageReceived += terminateHandle;
                }
                else
                {
                    new Thread(finisher).Start();
                }
            }
        }