component

package
v0.0.0-...-a139e77 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Armor

type Armor struct {
	ID      int
	Image   *ebiten.Image
	Defense int
}

type Body

type Body struct {
	ID    int
	Image *ebiten.Image
	Type  int
	Color int
}

type CameraData

type CameraData struct {
}

type CharacterData

type CharacterData struct {
	Body       Body
	Hair       *Hair
	FacialHair *Hair
	Equipment  Equipment
}

func (CharacterData) Image

func (c CharacterData) Image() *ebiten.Image

type ColorOverride

type ColorOverride struct {
	R, G, B, A float64
}

type DebugData

type DebugData struct {
	Enabled bool
}

type Equipment

type Equipment struct {
	Head     *Armor
	Chest    *Armor
	Legs     *Armor
	Feet     *Armor
	MainHand *Weapon
	OffHand  *Weapon
}

type GameData

type GameData struct {
	Settings Settings
}

func MustFindGame

func MustFindGame(w donburi.World) *GameData

type Hair

type Hair struct {
	ID    int
	Image *ebiten.Image
	Type  int
	Color int
}

type Settings

type Settings struct {
	ScreenWidth  int
	ScreenHeight int
}

type SpriteData

type SpriteData struct {
	Image *ebiten.Image
	Layer SpriteLayer
	Pivot SpritePivot

	// The original rotation of the sprite
	// "Facing right" is considered 0 degrees
	OriginalRotation float64

	Hidden bool

	ColorOverride *ColorOverride
}

func (*SpriteData) Hide

func (s *SpriteData) Hide()

func (*SpriteData) Show

func (s *SpriteData) Show()

type SpriteLayer

type SpriteLayer int
const (
	SpriteLayerBackground SpriteLayer = iota
	SpriteLayerDebris
	SpriteLayerGroundUnits
	SpriteLayerGroundGuns
	SpriteLayerShadows
	SpriteLayerCollectibles
	SpriteLayerFallingWrecks
	SpriteLayerAirUnits
	SpriteLayerIndicators
)

type SpritePivot

type SpritePivot int
const (
	SpritePivotCenter SpritePivot = iota
	SpritePivotTopLeft
)

type Weapon

type Weapon struct {
	ID    int
	Image *ebiten.Image
}

Jump to

Keyboard shortcuts

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