2010-08-22 13:13:17 +00:00
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
< !DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
2010-01-24 22:12:49 +00:00
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs >
<func >
<title > Anim_YDir</title>
2010-08-22 13:13:17 +00:00
<category > Animations</category>
2018-03-24 22:13:08 +00:00
<version > 1.0 OC</version>
2010-01-24 22:12:49 +00:00
<syntax >
<rtype > array</rtype>
<params >
<param >
<type > int</type>
2010-03-15 22:55:14 +00:00
<name > begin</name>
2010-08-22 13:13:17 +00:00
<desc > Start of the interval.</desc>
2010-01-24 22:12:49 +00:00
</param>
<param >
<type > int</type>
2010-03-15 22:55:14 +00:00
<name > end</name>
2010-08-22 13:13:17 +00:00
<desc > End of the interval. If end is greater than begin then the value increases with increases XDir, otherwise it decreases.</desc>
2010-01-24 22:12:49 +00:00
</param>
<param >
<type > int</type>
2010-03-15 22:55:14 +00:00
<name > max_dir</name>
2010-08-22 13:13:17 +00:00
<desc > Highest value of the YDir to be mapped. All larger velocities lead to the same animation value (end).</desc>
</param>
2010-01-24 22:12:49 +00:00
</params>
</syntax>
2010-08-22 13:13:17 +00:00
<desc > The value is proportional to the object's velocity in Y direction. The velocities 0 to max_dir are mapped linearly to the interval given by begin and end.</desc>
<remark > See the <emlink href= "definition/animations.html" > animation documentation</emlink> for further explanations of the animation system.</remark>
2010-01-24 22:12:49 +00:00
<examples >
<example >
2010-08-22 13:13:17 +00:00
<code > <funclink > PlayAnimation</funclink> (" ShowSpeed" , 10, <funclink > Anim_YDir</funclink> (0, <funclink > GetAnimationLength</funclink> (" ShowSpeed" ), 100), <funclink > Anim_Const</funclink> (1000));</code>
<text > Plays the animation "ShowSpeed" in slot 10. This could be a velocity display in an elevator.</text>
2010-01-24 22:12:49 +00:00
</example>
</examples>
<related >
<funclink > PlayAnimation</funclink>
<funclink > SetAnimationPosition</funclink>
<funclink > SetAnimationWeight</funclink>
<funclink > Anim_Const</funclink>
<funclink > Anim_Linear</funclink>
<funclink > Anim_X</funclink>
<funclink > Anim_Y</funclink>
2012-04-21 22:22:05 +00:00
<funclink > Anim_R</funclink>
2010-01-24 22:12:49 +00:00
<funclink > Anim_AbsX</funclink>
<funclink > Anim_AbsY</funclink>
2014-10-09 20:52:20 +00:00
<funclink > Anim_Dist</funclink>
2010-01-24 22:12:49 +00:00
<funclink > Anim_XDir</funclink>
<funclink > Anim_Action</funclink>
</related>
</func>
2010-08-22 13:13:17 +00:00
<author > Clonk-Karl</author> <date > 2010-01</date>
2010-01-24 22:12:49 +00:00
</funcs>