Sequence - xkp/Doc GitHub Wiki
#Overview
Sometimes you want to write an algorithm that happens over time. i.e. every 3 seconds check the status of something. Or, when the ball goes higher than x do_magic()
A clear use case for those scenarios are video games where you get complex scenes where everybody is shooting everybody. In practice, implementing this kind of behavior is very tricky. Our sequencer solves this kind of problems once and for all. It also provides an animation system on the side.
Lets see code:
<sequence id="fade_in">
<at time="0">
<animate property="img1.alpha" from="0" to="1" in="1"/>
</at>
</sequence>
This describes the general operation of excess sequences, where the developer chooses the time when things will happen. Let's see a complex example before the gritty.
<sequence id="showing_off">
<every t="3">
<run method="check_integrity"/>
</every>
<at time="0">
<animate property="application.integrity" from="1" to="0" in="30"/>
</at>
<when expr="application.integrity < 0.5">
<run method="integrity_alert"/>
</when>
</sequence>
This is the kind of behavior you can achieve when allowed to describe your applications. Now details.
#Table of contents
This is the list of available sequence tags: