The instructions page was done with a sequence system that I made; this system is plenty reusable and flexible for many other cases like a dialogue, message, or even pictures like the one I show below.
private var seqData(get, never):PictureSequenceData;
private inline function get_seqData():PictureSequenceData
return data;
private var currentIndex:Int = 0;
private var backSprite:NikoSprite;
private var frontSprite:NikoSprite;
private var isTransitioning:Bool = false;
private var slideTimer:Float = 0.0;
private var isAutoAdvance:Bool = false;
public var onSlideTransition(default, null):FlxTypedSignal<Int->Void>;
public var onSlideReady(default, null):FlxTypedSignal<Int->Void>;
public var onWaitInput(default, null):FlxTypedSignal<Int->Void>;
public function new(sequenceData:PictureSequenceData)
{
super("picture_viewer", "Picture Sequence");
this.data = sequenceData;
this.blocksInput = true;
onSlideTransition = new FlxTypedSignal<Int->Void>();
onSlideReady = new FlxTypedSignal<Int->Void>();
onWaitInput = new FlxTypedSignal<Int->Void>();
}
override public function loadScript(path:String):Void
{
super.loadScript(path);
if (script != null)
{
script.bindSignal(onSlideTransition, "onSlideTransition");
script.bindSignal(onSlideReady, "onSlideReady");
script.bindSignal(onWaitInput, "onWaitInput");
}
}
...