hero_anim

package
v0.0.0-...-6447ae5 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAnimationJson

func LoadAnimationJson(imgPath string, jsonPath string) (sheet pixel.Picture, anims map[string][]pixel.Rect, err error)

Types

type HeroAnim

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

func New

func New(imgPath string, jsonPath string) HeroAnim

Initialize HeroAnim

func (*HeroAnim) Draw

func (ga *HeroAnim) Draw(t pixel.Target, g hero.Hero)

func (*HeroAnim) GetFrame

func (ga *HeroAnim) GetFrame() pixel.Rect

func (*HeroAnim) GetSheet

func (ga *HeroAnim) GetSheet() pixel.Picture

func (*HeroAnim) IsThrow

func (ga *HeroAnim) IsThrow() bool

func (*HeroAnim) Throw

func (ga *HeroAnim) Throw()

func (*HeroAnim) Update

func (ga *HeroAnim) Update(g hero.Hero, dt float64)

Jump to

Keyboard shortcuts

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