now we have setup kha2d we can now start animating.
we create a new project, import our image sprite sheet & make sure we are adding the kha2d library in 'khafile.js'.
creating a 'Char.hx' class, we then proceed to extend it with 'Sprite', then set our movement frames with 'Animation'.
setting up two functions for our keyboard we make sure that we can use it to change the animation.
lastly we go into 'Project.hx' & make sure we are adding our 'Char' to the 'Scene' & render it.
installing kha2d video:
https://www.youtube.com/watch?v=EdsbUNZoi7E
link for super():
https://haxe.org/manual/types-class-inheritance.html
link[s] for override:
https://haxe.org/manual/class-field-override.html
https://haxe.org/manual/class-field-overriding.html
source code:
https://github.com/lewislepton/kha-tutorial-series
SUPPORT ON PATREON FROM AS LITTLE AS $1:
https://patreon.com/lewislepton
intro & outro music is from this EP:
https://lewislepton.bandcamp.com/album/coat-noise-ep
like, share & subscribe to stay up to date.
https://lewislepton.com
https://patreon.com/lewislepton
https://twitter.com/lewislepton
https://facebook.com/lewislepton
https://lewislepton.bandcamp.com
https://soundcloud.com/lewislepton
https://github.com/lewislepton