force

package
v2.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHurtBox

func NewHurtBox(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(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(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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL