在以前介紹過CEGUI的Animation部分,在其中的Subscription的Element並未作出解釋,今天我們來解釋一下這個.
先來回顧一個CEGUI帶的Sample的Animation文件:
<?xml version="1.0" ?>
<Animations>
<AnimationDefinition name="Example1A" duration="0.3" replayMode="once">
<Affector property="Alpha" interpolator="float">
<KeyFrame position="0" value="1" />
<KeyFrame position="0.3" value="0.66" progression="quadratic decelerating" />
</Affector>
<Subscription event="MouseLeavesArea" action="Start" />
</AnimationDefinition>
<AnimationDefinition name="Example1B" duration="0.3" replayMode="once">
<Affector property="Alpha" interpolator="float">
<KeyFrame position="0" value="0.66" />
<KeyFrame position="0.3" value="1" progression="quadratic accelerating" />
</Affector>
<Subscription event="MouseEntersArea" action="Start" />
</AnimationDefinition>
</Animations>
Subscription是Event動畫的定義,類似於:當發生MouseEntersArea事件的時候,就會觸發這個動畫的Start行為.

近期迴響