/// <summary> /// Inicializa uma nova instância de DebugComponent. /// </summary> /// <param name="actor">O ator a ser associado a esse componente.</param> /// <param name="font">O objeto SpriteFont a ser usado para desenho do texto.</param> public DebugComponent(Actor actor, SpriteFont font) : base(actor) { text = new TextActor(actor.Game, "", font); verticalLine = Sprite.GetRectangle(actor.Game, "", new Point(1, actor.Game.GraphicsDevice.Viewport.Height), Color.White); horizontalLine = Sprite.GetRectangle(actor.Game, "", new Point(actor.Game.GraphicsDevice.Viewport.Width, 1), Color.White); this.Priority = DrawPriority.Forward; }
/// <summary> /// Inicializa uma nova instância da classe Area. /// </summary> /// <param name="game">A instância da classe Game.</param> /// <param name="name">O nome da entidade.</param> /// <param name="width">A largura da área.</param> /// <param name="height">A altura da área</param> public Area(Game game, string name, int width, int height) : base(game, name) { this.a_width = width; this.a_height = height; this.Transform.Size = new Point(width, height); this.rectangle = Sprite.GetRectangle(game, "", new Point(width, height), Color.White); }