/// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();
            EntityConstructor entityConstructor = new EntityConstructor();

            EntityManager = entityConstructor.Instantiate("1", () => Exit());
            if (device == "Windows")
            {
                InputManager = new MonogameMouseClick();
            }
            else if (device == "Android")
            {
                InputManager = new MonogameTouch();
            }
            IUpdateVisitor      = new DefaultUpdateVisitor(InputManager, entityConstructor);
            this.IsMouseVisible = true;
        }
        //Database DB;
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            base.Initialize();
            //DB = new Database();
            //DB.Data();
            EntityConstructor entityConstructor = new EntityConstructor();

            EntityManager = entityConstructor.Instantiate("1", () => Exit());
            if (device == "Windows")
            {
                InputManager = new MonogameMouseClick();
            }
            else if (device == "Android")
            {
                InputManager = new MonogameTouch();
            }
            IUpdateVisitor = new DefaultUpdateVisitor(InputManager, entityConstructor);
        }
Exemple #3
0
 public DefaultUpdateVisitor(InputManager input_manager, EntityConstructor constructor)
 {
     this.input_manager = input_manager;
     this.constructor   = constructor;
 }