flxtimeline

Dynamic timeline for HaxeFlixel.
https://github.com/Redar13/flxtimeline/

To install, run:

haxelib install flxtimeline 0.1.0 

See using Haxelib in Haxelib documentation for more information.

README.md

FlxTimeline

An attempt to implement a dynamic timeline in HaxeFlixel. Features: * Events:

* **SetEvent** - calls the specified function
* **NumTweenEvent** - works like (NumTween)[https://api.haxeflixel.com/flixel/tweens/FlxTween.html#num], but is bound to the timeline
* **VarTweenEvent** - works like (VarTween)[https://api.haxeflixel.com/flixel/tweens/FlxTween.html#tween], but is bound to the timeline
  • Ability to store child timelines
  • Framerate support

Example Of Use:

import flixel.timeline.FlxTimeline;

// Creates a timeline
var timeline:FlxTimeline = new FlxTimeline();

var duration = 0.5;
var startTime = 0.1;
// Add VarTweenEvent
timeline.addTweenEvent(startTime, mySprite, {angle: 45}, duration);
// Add NumTweenEvent
timeline.addNumTweenEvent(startTime, 0, 1.0, i -> trace(i), duration);
// Add SetEvent
timeline.addSetEvent(startTime, i -> trace("HelloWorld"), duration);

// Starts animation
timeline.play();

// Ability to link time to your function.
timeline.getTime = () -> return FlxG.sound.music.time;

// Create a child timeline from the previous timeline
timeline.addChild("Child Timeline");
// You can also give your timeline a name to make it easier to navigate among other timelines.
var childTimeLine:FlxTimeline = timeline.getChild("Child Timeline");
timeline.removeChild("Child Timeline");

Installation

  1. First, run the following command in a terminal: - For the latest stable version: haxelib install flxtimeline - For the latest development: haxelib git flxtimeline https://github.com/Redar13/FlxTimeline.

  2. Include the library in your Project.xml: <haxelib name="flxtimeline" />


TODOS (For now only for TweenEvent):

  1. Improve TweenEvent rewind
  2. Implement FlxTweenType for TweenEvent
  3. Implement Motion and its child classes
Contributors
Redar13
Version
0.1.0
Published
1 year ago
Dependencies
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub

⌂