Documentation
¶
Index ¶
- type Crosshairs
- type Effect
- type Entity
- type Map
- type Player
- type Projectile
- type Sprite
- func NewAnimatedSprite(x, y, scale float64, animationRate int, img *ebiten.Image, mapColor color.RGBA, ...) *Sprite
- func NewSprite(x, y, scale float64, img *ebiten.Image, mapColor color.RGBA, ...) *Sprite
- func NewSpriteFromSheet(x, y, scale float64, img *ebiten.Image, mapColor color.RGBA, ...) *Sprite
- func (s *Sprite) AddDebugLines(lineWidth int, clr color.Color)
- func (s *Sprite) Illumination() float64
- func (s *Sprite) IsFocusable() bool
- func (s *Sprite) LoopCounter() int
- func (s *Sprite) ResetAnimation()
- func (s *Sprite) Scale() float64
- func (s *Sprite) ScreenRect() *image.Rectangle
- func (s *Sprite) SetAnimationFrame(texNum int)
- func (s *Sprite) SetAnimationReversed(isReverse bool)
- func (s *Sprite) SetScreenRect(rect *image.Rectangle)
- func (s *Sprite) SetTextureFacingMap(texFacingMap map[float64]int)
- func (s *Sprite) Texture() *ebiten.Image
- func (s *Sprite) TextureRect() image.Rectangle
- func (s *Sprite) Update(camPos *geom.Vector2)
- func (s *Sprite) VerticalAnchor() raycaster.SpriteAnchor
- type Weapon
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Crosshairs ¶
type Crosshairs struct { *Sprite HitIndicator *Crosshairs // contains filtered or unexported fields }
func NewCrosshairs ¶
func NewCrosshairs( x, y, scale float64, img *ebiten.Image, columns, rows, crosshairIndex, hitIndex int, ) *Crosshairs
func (*Crosshairs) ActivateHitIndicator ¶
func (c *Crosshairs) ActivateHitIndicator(hitTime int)
func (*Crosshairs) IsHitIndicatorActive ¶
func (c *Crosshairs) IsHitIndicatorActive() bool
func (*Crosshairs) Update ¶
func (c *Crosshairs) Update()
type Entity ¶
type Player ¶
type Player struct { *Entity CameraZ float64 Moved bool Weapon *Weapon WeaponSet []*Weapon LastWeapon *Weapon }
func (*Player) NextWeapon ¶
func (*Player) SelectWeapon ¶
type Projectile ¶
func NewAnimatedProjectile ¶
func NewProjectile ¶
func NewProjectile( x, y, scale float64, img *ebiten.Image, mapColor color.RGBA, anchor raycaster.SpriteAnchor, collisionRadius, collisionHeight float64, ) *Projectile
func (*Projectile) SpawnEffect ¶
func (p *Projectile) SpawnEffect(x, y, z, angle, pitch float64) *Effect
type Sprite ¶
type Sprite struct { *Entity W, H int AnimationRate int Focusable bool // contains filtered or unexported fields }
func NewAnimatedSprite ¶
func NewSpriteFromSheet ¶
func (*Sprite) Illumination ¶
func (*Sprite) IsFocusable ¶
func (*Sprite) LoopCounter ¶
func (*Sprite) ResetAnimation ¶
func (s *Sprite) ResetAnimation()
func (*Sprite) ScreenRect ¶
func (*Sprite) SetAnimationFrame ¶
func (*Sprite) SetAnimationReversed ¶
func (*Sprite) SetScreenRect ¶
func (*Sprite) SetTextureFacingMap ¶
func (*Sprite) TextureRect ¶
func (*Sprite) VerticalAnchor ¶
func (s *Sprite) VerticalAnchor() raycaster.SpriteAnchor
type Weapon ¶
type Weapon struct { *Sprite // contains filtered or unexported fields }
func NewAnimatedWeapon ¶
func (*Weapon) OnCooldown ¶
func (*Weapon) ResetCooldown ¶
func (w *Weapon) ResetCooldown()
func (*Weapon) SpawnProjectile ¶
func (w *Weapon) SpawnProjectile(x, y, z, angle, pitch float64, spawnedBy *Entity) *Projectile
Click to show internal directories.
Click to hide internal directories.