entity

package
v0.0.0-...-7aa605c Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boss

type Boss interface {
	Entity

	Health() float64
	MaxHealth() float64

	SetPosition(pos mgl64.Vec3)
	SetStance(stance Stance)

	Image() *ebiten.Image
	MarkerShape() *aoe.CircleBorder
}

type Comet

type Comet struct {
	// contains filtered or unexported fields
}

func NewComet

func NewComet(pos mgl64.Vec3, radius, speed float64) *Comet

func (*Comet) AppendVerticesIndices

func (c *Comet) AppendVerticesIndices(vx []ebiten.Vertex, ix []uint16, index *int, ctx *graphics.Context) ([]ebiten.Vertex, []uint16)

func (*Comet) Damage

func (c *Comet) Damage() float64

func (*Comet) Dead

func (c *Comet) Dead() bool

func (*Comet) Position

func (c *Comet) Position() mgl64.Vec3

func (*Comet) Radius

func (c *Comet) Radius() float64

func (*Comet) TakeHit

func (c *Comet) TakeHit(_ float64)

func (*Comet) Team

func (c *Comet) Team() Team

func (*Comet) Update

func (c *Comet) Update(_ *Context)

type Context

type Context struct {
	CameraRight     mgl64.Vec3
	CameraUp        mgl64.Vec3
	PlayerPosition  mgl64.Vec3
	PlayerDirection mgl64.Vec3
	Boss            Boss

	Entities []Entity
	Markers  []*aoe.Marker
}

type Entity

type Entity interface {
	Update(ctx *Context)
	AppendVerticesIndices(vx []ebiten.Vertex, ix []uint16, index *int, ctx *graphics.Context) ([]ebiten.Vertex, []uint16)

	Team() Team
	Damage() float64
	Position() mgl64.Vec3
	TakeHit(dmg float64)
	Radius() float64
	Dead() bool
}

type Portal

type Portal struct {
	// contains filtered or unexported fields
}

func NewPortal

func NewPortal() *Portal

func (*Portal) Activate

func (p *Portal) Activate()

func (*Portal) AppendVerticesIndices

func (p *Portal) AppendVerticesIndices(vx []ebiten.Vertex, ix []uint16, index *int, ctx *graphics.Context) ([]ebiten.Vertex, []uint16)

func (*Portal) Damage

func (p *Portal) Damage() float64

func (*Portal) Deactivate

func (p *Portal) Deactivate()

func (*Portal) Dead

func (p *Portal) Dead() bool

func (*Portal) MarkerShape

func (p *Portal) MarkerShape() aoe.Shape

func (*Portal) Position

func (p *Portal) Position() mgl64.Vec3

func (*Portal) Radius

func (p *Portal) Radius() float64

func (*Portal) TakeHit

func (p *Portal) TakeHit(_ float64)

func (*Portal) Targeted

func (p *Portal) Targeted() bool

func (*Portal) Team

func (p *Portal) Team() Team

func (*Portal) Update

func (p *Portal) Update(ctx *Context)

type Projectile

type Projectile struct {
	// contains filtered or unexported fields
}

func NewProjectile

func NewProjectile(pos, dir mgl64.Vec3, radius, speed, dmg, pull float64, team Team, clrIn, clrOut color.Color, alpha float64, duration, resistance uint, homing bool) *Projectile

func (*Projectile) AppendVerticesIndices

func (p *Projectile) AppendVerticesIndices(vx []ebiten.Vertex, ix []uint16, index *int, ctx *graphics.Context) ([]ebiten.Vertex, []uint16)

func (*Projectile) Damage

func (p *Projectile) Damage() float64

func (*Projectile) Dead

func (p *Projectile) Dead() bool

func (*Projectile) Position

func (p *Projectile) Position() mgl64.Vec3

func (*Projectile) Pull

func (p *Projectile) Pull() float64

func (*Projectile) Radius

func (p *Projectile) Radius() float64

func (*Projectile) TakeHit

func (p *Projectile) TakeHit(_ float64)

func (*Projectile) Team

func (p *Projectile) Team() Team

func (*Projectile) Update

func (p *Projectile) Update(ctx *Context)

type Stance

type Stance byte
const (
	StanceIdle Stance = iota
	StanceHostile
)

type Team

type Team byte
const (
	TeamAlly Team = iota
	TeamEnemy
	TeamNone
)

Jump to

Keyboard shortcuts

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