Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHurtBox ¶
func NewHurtBox(ctx *scene.Context, x, y, w, h float64, duration time.Duration, l collision.Label, fv physics.ForceVector)
NewHurtBox creates a temporary collision space with a given force it should apply to objects it collides with
func NewHurtColor ¶
func NewHurtColor(ctx *scene.Context, x, y, w, h float64, duration time.Duration, l collision.Label, fv physics.ForceVector, c color.Color, layers ...int)
NewHurtColor creates a temporary collision space with a given force it should apply to objects it collides with. The box is rendered as the given color
func NewHurtDisplay ¶
func NewHurtDisplay(ctx *scene.Context, x, y, w, h float64, duration time.Duration, l collision.Label, fv physics.ForceVector, r render.Renderable, layers ...int)
NewHurtDisplay creates a temporary collision space with a given force it should apply to objects it collides with. The box is rendered as the given renderable. The input renderable is not copied before it is drawn.
Types ¶
type DirectionSpace ¶
type DirectionSpace struct { *collision.Space physics.ForceVector }
A DirectionSpace combines collision and a intended direction collision should imply
func NewDirectionSpace ¶
func NewDirectionSpace(s *collision.Space, v physics.ForceVector) *DirectionSpace
NewDirectionSpace creates a DirectionSpace and initializes it as an entity.
func (*DirectionSpace) Init ¶
func (ds *DirectionSpace) Init() event.CID
Init initializes the DirectionSpace as an entity