Ejemplo n.º 1
0
        public static void DrawText(this Room room, GraphicsBatch graphicsBatch)
        {
            string name = room.isDiscovered ? room.name : "unknown";

            graphicsBatch.DrawString(graphicsBatch.DefaultFont, name, new Vector2(room.x, room.y) * RoomScale, Color.GhostWhite, 0, Vector2.Zero, 0.3f, SpriteEffects.None, 0);
            graphicsBatch.DrawString(graphicsBatch.DefaultFont, room.RoomPoint().ToString(), new Vector2(room.x, room.y + 1) * RoomScale, Color.GhostWhite, 0, Vector2.Zero, 0.3f, SpriteEffects.None, 0);
        }
Ejemplo n.º 2
0
        public static void DrawTargetText(this Target target, int index, Room room, GraphicsBatch graphicsBatch)
        {
            var   padding = 2;
            Color color   = target is PlayerCharacter ? Color.Blue : Color.Red;

            graphicsBatch.DrawString(graphicsBatch.DefaultFont, target.name, new Vector2(room.x, room.y + index + padding) * RoomViewExtensions.RoomScale, color, 0, Vector2.Zero, 0.3f, SpriteEffects.None, 0);
        }
Ejemplo n.º 3
0
 public void DrawGraphics(GraphicsBatch graphicsBatch)
 {
     //foreach (var room in roomView)
     //{
     //    room.Draw(graphicsBatch);
     //}
     Draw(graphicsBatch.GraphicsDevice);
 }
Ejemplo n.º 4
0
 public void DrawText(GraphicsBatch graphicsBatch)
 {
     for (var i = 0; i < strings.Count; i++)
     {
         var pos = rectangle.Location.ToVector2() + lineHeight * i;
         graphicsBatch.DrawString(graphicsBatch.DefaultFont, strings[i], pos, Color.GhostWhite, 0, Vector2.Zero, 0.3f, SpriteEffects.None, 0);
     }
 }
Ejemplo n.º 5
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.
     graphicsBatch             = new GraphicsBatch(GraphicsDevice);
     graphicsBatch.DefaultFont = Content.Load <SpriteFont>("def");
     graphicsBatch.Pixel       = Content.Load <Texture2D>("pixel");
     ImageLoader.LoadImages(Content, sprites);
 }
Ejemplo n.º 6
0
 public static void DrawText(this BoardView view, GraphicsBatch graphicsBatch)
 {
     foreach (var room in view.board.rooms.Values)
     {
         room.DrawText(graphicsBatch);
         var targets = view.board.targets.All.Where(x => x.roomId == room.id).ToList();
         for (var i = 0; i < targets.Count(); i++)
         {
             targets[i].DrawTargetText(i, room, graphicsBatch);
         }
     }
     view.nemesisConsole.DrawText(graphicsBatch);
 }
Ejemplo n.º 7
0
 public ScorePreviewer()
 {
     _graphicsBatch = new GraphicsBatch();
 }
Ejemplo n.º 8
0
 static void SpriteBatchInitialize()
 {
     GraphicsBatch = new GraphicsBatch(FlatRedBallServices.Game.GraphicsDevice);
 }
Ejemplo n.º 9
0
 public ScoreEditor()
 {
     _editorRenderer = new ScoreEditorRenderer();
     Look.BarLineSpaceUnitChanged += Look_BarLineSpaceUnitChanged;
     _graphicsBatch = new GraphicsBatch();
 }
Ejemplo n.º 10
0
 public void Draw(GraphicsBatch graphicsBatch)
 {
     throw new NotImplementedException();
 }