Пример #1
0
 public PaintBrush(Form form, IUserInputInterface controller)
 {
     this.imageHandler = new ImageHandler();
     this.gameWindow   = form;
     this.pictureBoxes = new List <PictureBox>();
     this.progressBars = new List <ProgressBar>();
     this.Controller   = controller;
 }
Пример #2
0
 public PaintBrush(Form form, IUserInputInterface controller)
 {
     LoadResources();
     this.gameWindow = form;
     this.gameWindow.BackgroundImage = Image.FromFile(Images.BackGroundImagePath);
     this.pictureBoxes = new List <PictureBox>();
     this.progressBars = new List <ProgressBar>();
     this.Controller   = controller;
 }
Пример #3
0
        //private CharacterUnit _player;
        //private List<EnemyNPCUnit> _enemies;
        //private List<Ability> _abilities; //Timeoutable

        public Engine(IUserInputInterface givenController, IPaintInterface painter, int timeInterval)
        {
            this._controller   = givenController;
            this._painter      = painter;
            this._timeInterval = timeInterval;
            //test
            RegionEntities.IntantiateClass(this._painter);
            this.regionEntities = RegionEntities.GetInstance();
            //endTest
            SubscribeToController();
        }
Пример #4
0
 public Engine(IUserInputInterface givenController, IPaintInterface painter)
 {
     this.controller       = givenController;
     this.painter          = painter;
     this.totalElapsedTime = TimeSpan.Zero;
     ////
     RegionEntities.InstantiateClass(this, this.painter);
     this.regionEntities = RegionEntities.GetInstance();
     ////
     this.SubscribeToController();
 }
Пример #5
0
 public Engine(IUserInputInterface givenController, IPaintInterface painter, int timeInterval)
 {
     this._controller   = givenController;
     this.Painter       = painter;
     this._timeInterval = timeInterval;
     SubscribeToController();
     this._enemies   = new List <EnemyNPCUnit>();
     this._abilities = new List <Ability>();
     this._items     = new List <Item>();
     SetBackground();
     InitialiseItems();
     InitialiseEnemies();
     IntialisePlayer();
 }
Пример #6
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            //// Create a new SpriteBatch, which can be used to draw textures.
            this.spriteBatch = new SpriteBatch(this.GraphicsDevice);
            ////
            this.graphicsEngine = new GraphicsEngine(this.spriteBatch);
            this.controller     = new ControllerUserInput();
            ITextureHandler textureHandler = new TextureHandler(this.Content);
            IPaintInterface painter        = new PaintBrush(textureHandler, this.graphicsEngine);

            this.engine = new Engine(this.controller, painter);
            ////
            this.gameLoader     = new GameLoader(new UnitOfWork(), this.engine);
            this.consoleHandler = new ConsoleHandler(this.console, this.gameLoader);
        }
Пример #7
0
 public CustomPicBoxTag(IRenderable rendObject, IUserInputInterface controller)
 {
     RendObject = rendObject;
     Controller = controller;
 }
Пример #8
0
 /// <summary> Sets the current user input interface. This should almost never be called from user code. </summary>
 /// <param name="inputInterface"></param>
 public static void SetInterface(IUserInputInterface inputInterface)
 {
     UserInput.inputInterface = inputInterface;
     UserInput.userInterface  = inputInterface as IUserInterface;
 }
Пример #9
0
 public CustomProgBarTag(IUnit rendObject, IUserInputInterface controller)
 {
     RendObject = rendObject;
     Controller = controller;
 }