builtInComponentsAndSystems

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EntitiesOverlap added in v1.0.2

func EntitiesOverlap(a *pearl.Entity, b *pearl.Entity) bool

Types

type Animation added in v1.0.3

type Animation struct {
	Frames []int
	Speed  int
}

type AnimationSystem added in v1.0.3

type AnimationSystem struct{}

func (*AnimationSystem) Draw added in v1.0.3

func (as *AnimationSystem) Draw(entity *pearl.Entity, scene *pearl.Scene, screen *ebiten.Image, options *ebiten.DrawImageOptions)

func (*AnimationSystem) GetRequirements added in v1.0.3

func (as *AnimationSystem) GetRequirements() []string

func (*AnimationSystem) Update added in v1.0.3

func (as *AnimationSystem) Update(entity *pearl.Entity, scene *pearl.Scene)

type Animator added in v1.0.3

type Animator struct {
	Animations            []Animation
	CurrentAnimation      int
	CurrentAnimationIndex int
	AnimationTimer        int
}

func (*Animator) ChangeAnimation added in v1.0.3

func (a *Animator) ChangeAnimation(index int)

func (*Animator) ID added in v1.0.3

func (a *Animator) ID() string

type BoxCollider added in v1.0.2

type BoxCollider struct {
	Size   pearl.Vector2
	Offset pearl.Vector2
}

func (*BoxCollider) ID added in v1.0.2

func (bc *BoxCollider) ID() string

type Image

type Image struct {
	Image     *ebiten.Image
	Size      pearl.Vector2
	SourcePos pearl.Vector2
	Centered  bool
}

func (*Image) ID

func (t *Image) ID() string

type ImageRenderer

type ImageRenderer struct{}

func (*ImageRenderer) Draw

func (ir *ImageRenderer) Draw(entity *pearl.Entity, scene *pearl.Scene, screen *ebiten.Image, options *ebiten.DrawImageOptions)

func (*ImageRenderer) GetRequirements

func (ir *ImageRenderer) GetRequirements() []string

func (*ImageRenderer) Update

func (ir *ImageRenderer) Update(entity *pearl.Entity, scene *pearl.Scene)

type Level

type Level struct {
	Data     [][]int
	Tileset  *ebiten.Image
	TileSize int
}

func (*Level) ID

func (l *Level) ID() string

type LevelRenderer

type LevelRenderer struct{}

func (*LevelRenderer) Draw

func (lr *LevelRenderer) Draw(entity *pearl.Entity, scene *pearl.Scene, screen *ebiten.Image, options *ebiten.DrawImageOptions)

func (*LevelRenderer) GetRequirements

func (lr *LevelRenderer) GetRequirements() []string

func (*LevelRenderer) Update

func (lr *LevelRenderer) Update(entity *pearl.Entity, scene *pearl.Scene)

type RectangleRenderer added in v1.0.4

type RectangleRenderer struct {
	Color color.RGBA
}

func (*RectangleRenderer) ID added in v1.0.4

func (rr *RectangleRenderer) ID() string

type RectangleRendererSystem added in v1.0.4

type RectangleRendererSystem struct{}

func (*RectangleRendererSystem) Draw added in v1.0.4

func (rrs *RectangleRendererSystem) Draw(entity *pearl.Entity, scene *pearl.Scene, screen *ebiten.Image, options *ebiten.DrawImageOptions)

func (*RectangleRendererSystem) GetRequirements added in v1.0.4

func (rrs *RectangleRendererSystem) GetRequirements() []string

func (*RectangleRendererSystem) Update added in v1.0.4

func (rrs *RectangleRendererSystem) Update(entity *pearl.Entity, scene *pearl.Scene)

type Rigidbody

type Rigidbody struct {
	Velocity      pearl.Vector2
	Friction      pearl.Vector2
	Gravity       pearl.Vector2
	Grounded      float32
	CoyoteTime    float32
	CollisionType RigidbodyCollisionType
}

func (*Rigidbody) ID

func (rb *Rigidbody) ID() string

type RigidbodyCollisionType added in v1.0.2

type RigidbodyCollisionType int
const (
	NonCollision RigidbodyCollisionType = iota
	LevelCollision
)

type RigidbodySystem added in v1.0.2

type RigidbodySystem struct{}

func (*RigidbodySystem) Draw added in v1.0.2

func (rbs *RigidbodySystem) Draw(entity *pearl.Entity, scene *pearl.Scene, screen *ebiten.Image, options *ebiten.DrawImageOptions)

func (*RigidbodySystem) GetRequirements added in v1.0.2

func (rbs *RigidbodySystem) GetRequirements() []string

func (*RigidbodySystem) Update added in v1.0.2

func (rbs *RigidbodySystem) Update(entity *pearl.Entity, scene *pearl.Scene)

type SinWave added in v1.0.8

type SinWave struct {
	Offset   float64
	Speed    float64
	Distance float64
}

func (*SinWave) GetSin added in v1.0.8

func (sw *SinWave) GetSin() float64

func (*SinWave) ID added in v1.0.8

func (sw *SinWave) ID() string

type Transform

type Transform struct {
	Position pearl.Vector2
	Scale    pearl.Vector2
	Rotation float64
}

func (*Transform) ID

func (t *Transform) ID() string

type Trigger added in v1.0.6

type Trigger struct {
	OnTrigger onTriggerFunction
}

func (*Trigger) ID added in v1.0.6

func (t *Trigger) ID() string

type TriggerSystem added in v1.0.6

type TriggerSystem struct{}

func (*TriggerSystem) Draw added in v1.0.6

func (ts *TriggerSystem) Draw(entity *pearl.Entity, scene *pearl.Scene, screen *ebiten.Image, options *ebiten.DrawImageOptions)

func (*TriggerSystem) GetRequirements added in v1.0.6

func (ts *TriggerSystem) GetRequirements() []string

func (*TriggerSystem) Update added in v1.0.6

func (ts *TriggerSystem) Update(entity *pearl.Entity, scene *pearl.Scene)

Jump to

Keyboard shortcuts

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