Create TODO_Animation.md

This commit is contained in:
Zihan Chen
2017-10-16 07:56:22 -07:00
committed by GitHub
parent d83bbda588
commit f84138082b
+34
View File
@@ -0,0 +1,34 @@
# Animation (continuation)
### Goal
- Implement Animation in GacUI XMl Resource
- Possible to provide state machine XML tags
### Script
```
class MyProperties
{
prop A : int {}
prop B : int {}
}
func CreatePropA() : MyProperties^ { ... }
...
func MyCalculation(dest: MyProperties^, a: MyProperties^, b: MyProperties^, ...): void { ... }
$interface IMyAnimation : IGuiAnimation<MyProperties>; // prop CurrentState : MyProperties^ {}
func MyAnimation() : IMyAnimation
${
$Set CreatePropA(); // or use CurrentState
$Play CreatePropB(), 10 // gradually change to the specified state during 10 seconds
$Play CreatePropC(), 10, [$1*$1] // change the default linear interpolation
for(i in range [1, 10])
{
$Play CreatePropB(), 10, MyCalculation // call a function to decide the interpolation
}
}
```