Documentation
¶
Overview ¶
Package debug helps with drawing debug information on the screen
Index ¶
- func DrawRect(screen *ebiten.Image, xOffset, yOffset float64, leftVec vec.Vector, ...)
- type HitBoxDrawComponent
- type HitBoxDrawOpt
- type OriginDrawComponent
- func (oc *OriginDrawComponent) Draw(screen *ebiten.Image, xOffset, yOffset float64)
- func (oc *OriginDrawComponent) SetAntiAlias() *OriginDrawComponent
- func (oc *OriginDrawComponent) SetColor(c color.Color) *OriginDrawComponent
- func (oc *OriginDrawComponent) SetRadius(radius float32) *OriginDrawComponent
- func (oc *OriginDrawComponent) Update() error
- type OriginOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DrawRect ¶
func DrawRect(screen *ebiten.Image, xOffset, yOffset float64, leftVec vec.Vector, width, height float64, outlineColor color.Color)
DrawRect draws a rectangle on the screen, with regards of an X and Y offset as a camera projection. At the given point, as well as width, height and color.
Types ¶
type HitBoxDrawComponent ¶
type HitBoxDrawComponent struct {
// contains filtered or unexported fields
}
HitBoxDrawComponent is used to draw the hit box of a given entity
func NewHitBoxDrawComponent ¶
func NewHitBoxDrawComponent(origin subjects.Originer, originAsCenter bool, width, height float64, opts ...HitBoxDrawOpt) *HitBoxDrawComponent
NewHitBoxDrawComponent creates a new HitBoxDrawComponent at origin, with given width and height and specifying if the origin is centered
func (*HitBoxDrawComponent) Draw ¶
func (hb *HitBoxDrawComponent) Draw(screen *ebiten.Image, xOffset, yOffset float64)
Draw draws the hit box of the entity. X and Y offset are for a camera projection.
func (*HitBoxDrawComponent) SetColor ¶ added in v0.1.5
func (hb *HitBoxDrawComponent) SetColor(c color.Color) *HitBoxDrawComponent
SetColor is the fluent api for setting the outline drawing color
func (*HitBoxDrawComponent) Update ¶
func (hb *HitBoxDrawComponent) Update() error
Update as called via the main game loop. Unused at this point.
type HitBoxDrawOpt ¶
type HitBoxDrawOpt func(hb *HitBoxDrawComponent)
HitBoxDrawOpt is used to configure the HitBoxDrawComponent
func HitBoxDrawColor ¶
func HitBoxDrawColor(c color.Color) HitBoxDrawOpt
HitBoxDrawColor is HitBoxDrawOpt to change the color of the hit box outline.
type OriginDrawComponent ¶
type OriginDrawComponent struct {
// contains filtered or unexported fields
}
OriginDrawComponent draws a point at the entity origin
func NewOriginDrawComponent ¶
func NewOriginDrawComponent(origin subjects.Originer, opts ...OriginOpt) *OriginDrawComponent
NewOriginDrawComponent creates a new OriginDrawComponent at origin with configuring options
func (*OriginDrawComponent) Draw ¶
func (oc *OriginDrawComponent) Draw(screen *ebiten.Image, xOffset, yOffset float64)
Draw draws the point on the screen with the given X and Y offsets. These offsets are used for a camera projection.
func (*OriginDrawComponent) SetAntiAlias ¶ added in v0.1.5
func (oc *OriginDrawComponent) SetAntiAlias() *OriginDrawComponent
SetAntiAlias is the fluent api for setting the antialias property
func (*OriginDrawComponent) SetColor ¶ added in v0.1.5
func (oc *OriginDrawComponent) SetColor(c color.Color) *OriginDrawComponent
SetColor is the fluent api for setting the color
func (*OriginDrawComponent) SetRadius ¶ added in v0.1.5
func (oc *OriginDrawComponent) SetRadius(radius float32) *OriginDrawComponent
SetRadius is the fluent api for setting the radius
func (*OriginDrawComponent) Update ¶
func (oc *OriginDrawComponent) Update() error
Update to be called via the main game loop. Unused at this point.
type OriginOpt ¶
type OriginOpt func(oc *OriginDrawComponent)
OriginOpt is used to configure the OriginDrawComponent
func SetAntiAlias ¶
func SetAntiAlias() OriginOpt
SetAntiAlias is an OriginOpt for setting the anti aliasing nature of the point