graphics

package
v0.0.0-...-dde4805 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SCREENWIDTH      = 500
	SCREENHEIGHT     = 370
	HOLD             = 6
	ATTACKPATH       = `Knight_02\03-Attack\`
	WALKPATH         = `Knight_02\02-Walk\`
	HERO_IDLE_PATH   = `Knight_02\01-Idle\`
	GOBLIN_IDLE_PATH = `Goblin_02\01-Idle\`
	GOBLIN_DIE_PATH  = `Goblin_02\07-Die\`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Animation

type Animation struct {
	Sprite
	// contains filtered or unexported fields
}

func NewAnimation

func NewAnimation(folder string, isEnemy bool) *Animation

func (*Animation) Clone

func (a *Animation) Clone(isLoop bool) *Animation

func (*Animation) Play

func (a *Animation) Play() *ebiten.Image

type Animations

type Animations map[string]*Animation

type Graphics

type Graphics struct {
	Animations *Animations
	// contains filtered or unexported fields
}

func NewGraphics

func NewGraphics() *Graphics

func (*Graphics) Draw

func (g *Graphics) Draw(screen *ebiten.Image)

func (*Graphics) Layout

func (g *Graphics) Layout(outsideWidth, outsideHeight int) (int, int)

func (*Graphics) Run

func (g *Graphics) Run()

func (*Graphics) Update

func (g *Graphics) Update(screen *ebiten.Image) error

type Sprite

type Sprite struct {
	X int
	Y int

	Flipped bool
	// contains filtered or unexported fields
}

func (*Sprite) Update

func (s *Sprite) Update()

Jump to

Keyboard shortcuts

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