AlgoAnim Uebung2 Aufgabe 1

This commit is contained in:
M.Scholz 2012-04-20 14:40:31 +02:00
parent aef354ff18
commit 686379e568
5 changed files with 73 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,73 @@
%Animal 1.4
title "AnimalScript Tutorial Animation"
author "Michael Scholz, Ulf Gebhardt"
{
text "header" "List element demo" at (20, 30) depth 1 font SansSerif size 24 bold
rectangle "hRect" offset (-5, -5) from "header" NW offset (5, 5) from "header" SE depth 2 fillColor white
}
{
codeGroup "listSource" at (10, 200) color black highlightColor blue
addCodeLine "1. Generate first list element" to "listSource"
addCodeLine "2. Set link of first list element to null" to "listSource"
addCodeLine "3. Generate new list element" to "listSource"
addCodeLine "4. Clear link of second list element" to "listSource"
addCodeLine "5. Link first with second list element" to "listSource"
addCodeLine "6. Generate new list element" to "listSource"
addCodeLine "7. Link new with second element" to "listSource"
addCodeLine "8. Link first with new element" to "listSource"
addCodeLine "9. Transform into 'nice' list structure" to "listSource"
}
{
highlightCode on "listSource" line 0
listelement "elemA" (100, 80) text "Elem1" pointers 1 after 20 ticks
}
{
unhighlightCode on "listSource" line 0
highlightCode on "listSource" line 1
clearLink "elemA"
}
{
unhighlightCode on "listSource" line 1
highlightCode on "listSource" line 2
listelement "elemB" offset (130, 0) from "elemA" NE text "Elem2" pointers 1
}
{
unhighlightCode on "listSource" line 2
highlightCode on "listSource" line 3
clearLink "elemB"
}
{
unhighlightCode on "listSource" line 3
highlightCode on "listSource" line 4
setLink "elemA" to "elemB" within 20 ticks
}
{
unhighlightCode on "listSource" line 4
highlightCode on "listSource" line 5
listelement "elemC" offset (80, 50) from "elemA" NW text "Elem3" pointers 1
}
{
unhighlightCode on "listSource" line 5
highlightCode on "listSource" line 6
setLink "elemA" to "elemC" within 20 ticks
}
{
unhighlightCode on "listSource" line 6
highlightCode on "listSource" line 7
setLink "elemC" link 1 to "elemB"
}
{
unhighlightCode on "listSource" line 7
highlightCode on "listSource" line 8
line "moveLine1" offset (0, 0) from "elemC" SE offset (0, 0) from "elemB" SW hidden
move "elemC" type "translateWithFixedTip" via "moveLine1" after 20 ticks within 20 ticks
move "elemA" type "setTip #1" via "moveLine1" after 20ms within 20 ticks
}

Binary file not shown.

Binary file not shown.

Binary file not shown.