animation

command
v0.0.0-...-37710a6 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2016 License: BSD-2-Clause Imports: 2 Imported by: 0

README

Animation Demo

What does it do?

It demonstrates how one can create animations.

For doing so, it loaded a spritesheet, and then created several moving animations.

What are important aspects of the code?

These lines are key in this demo:

What can I do in this demo?

  • You can walk right (Right Arrow)

  • Use a skill action (Space)

  • game.AddSystem(&engi.AnimationSystem{}), to add/enable animations;

  • RunAction = &engi.AnimationAction{Name: "run", Frames: []int{16, 17, 18, 19, 20, 21}}, for defining which frames were responsible for the run animation;

  • animation := engi.NewAnimationComponent(spriteSheet.Renderables(), 0.1), to create the animation component;

  • animation.AddAnimationActions(actions), to define the possible animations;

  • animation.SelectAnimationByAction(action), to set it to a specific animation;

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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