Ejemplo n.º 1
0
        public IGraphic2D LoadGraphic(StagedGraphic stagedGraphic)
        {
            IGraphic2D graphic = null;

            switch (stagedGraphic.Type)
            {
            case (GraphicType.Image):
                graphic = ParseImage(stagedGraphic.FilePath, stagedGraphic.Id);
                break;

            case (GraphicType.Effect):
                graphic = ParseEffect(stagedGraphic.FilePath, stagedGraphic.Id);
                break;

            case (GraphicType.Sprite):
                graphic = ParseSprite(stagedGraphic.FilePath, stagedGraphic.Id);
                break;

            case (GraphicType.Text):
                graphic = ParseText(stagedGraphic.FilePath, stagedGraphic.Id);
                break;
            }
            return(graphic);
        }
Ejemplo n.º 2
0
 public bool GraphicLoaded(IGraphic2D graphic)
 {
     return(_graphicDict.ContainsKey(graphic.Id));
 }