Example #1
0
        public AnimationCue(TexturePlus tex, AnimationCueDirectionEnum direction, long ticks, Point point, Size size)
        {
            this._tex = tex;
            this._next = direction;
            this._duration = TimeSpan.FromTicks(ticks);

            _point = point;
            _size = size;
        }
Example #2
0
        public Cell(int row, int col, int x, int y, TexturePlus tex, TexturePlus texShd)
        {
            _row = row;
            _col = col;
            _rect = new Rectangle(x, y, 45, 52);
            _tex = tex;
            _texShd = texShd;

            _adjacentCells = new Dictionary<CellPartEnum, Cell>();
        }
Example #3
0
 public AnimationCue(TexturePlus tex, AnimationCueDirectionEnum direction, long ticks)
     : this(tex, direction, ticks, new Point(0,0), new Size(800, 600))
 {
 }
Example #4
0
        public TexturePlus GetTexture(Device device, string resName, byte[] res)
        {
            if (_texs.ContainsKey(resName))
            {
                return (TexturePlus)(_texs[resName]);
            }

            TexturePlus tex = null;
            tex = new TexturePlus(device, res);
            _texs.Add(resName, tex);
            return tex;
        }
Example #5
0
        /// <summary>
        /// Loads new all textures in the settings file that need to be loaded.
        /// This can be called multiple times to load different files by 
        /// changing the paths in the settings object.
        /// 
        /// Probably should make sure textures are not being used at this point ;)
        /// </summary>
        /// <param name="device"></param>
        /// <param name="progressReport"></param>
        public void LoadTextures(Device device, EventHandler progressReport)
        {
            _texBg = new TexturePlus(device, string.Format(@"Heroes.Core.Battle.Images.Battle.Bitmaps.CmBkMag.dds"));
            _texBar = new TexturePlus(device, string.Format(@"Heroes.Core.Battle.Images.Battle.Bitmaps.cbar.dds"));

            _texCell = new TexturePlus(device, string.Format(@"Heroes.Core.Battle.Images.Battle.Bitmaps.CCellGrd.dds"));
            _texCellShd = new TexturePlus(device, string.Format(@"Heroes.Core.Battle.Images.Battle.Bitmaps.CCellShd.dds"));

            if (progressReport != null)
            {
                progressReport(this, EventArgs.Empty);
            }
        }
Example #6
0
        /// <summary>
        /// Loads new all textures in the settings file that need to be loaded.
        /// This can be called multiple times to load different files by 
        /// changing the paths in the settings object.
        /// 
        /// Probably should make sure textures are not being used at this point ;)
        /// </summary>
        /// <param name="device"></param>
        /// <param name="progressReport"></param>
        public void LoadTextures(Device device, EventHandler progressReport)
        {
            _texBg = new TexturePlus(device, string.Format(@"{0}\Images\Battle\Bitmaps\CmBkMag.dds", Heroes.Core.Setting._appStartupPath));
            _texBar = new TexturePlus(device, string.Format(@"{0}\Images\Battle\Bitmaps\cbar.dds", Heroes.Core.Setting._appStartupPath));

            _texCell = new TexturePlus(device, string.Format(@"{0}\Images\Battle\Bitmaps\CCellGrd.dds", Heroes.Core.Setting._appStartupPath));
            _texCellShd = new TexturePlus(device, string.Format(@"{0}\Images\Battle\Bitmaps\CCellShd.dds", Heroes.Core.Setting._appStartupPath));

            if (progressReport != null)
            {
                progressReport(this, EventArgs.Empty);
            }
        }