Пример #1
0
        public override void Draw(SpriteBatch spriteBatch, Loc offset)
        {
            if (Finished)
            {
                return;
            }

            Loc       drawLoc = GetDrawLoc(offset);
            CharSheet sheet   = GraphicsManager.GetChara(Appearance);

            sheet.DrawCharFrame(spriteBatch, CurrentAnim, true, Direction, drawLoc.ToVector2(), Frame, Color.White * ((float)Alpha / 255));
        }
Пример #2
0
 public override Loc GetDrawSize()
 {
     return(new Loc(GraphicsManager.GetChara(Appearance).TileWidth, GraphicsManager.GetChara(Appearance).TileHeight));
 }
Пример #3
0
 public override Loc GetDrawLoc(Loc offset)
 {
     return(new Loc(MapLoc.X + GraphicsManager.TileSize / 2 - GraphicsManager.GetChara(Appearance).TileWidth / 2,
                    MapLoc.Y + GraphicsManager.TileSize / 2 - GraphicsManager.GetChara(Appearance).TileHeight / 2) - offset);
 }