Skip to content

Commit dbd71ac

Browse files
authored
Update README.md
1 parent 28b262e commit dbd71ac

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@ point.Tween(x => x.X).To(20).In(0.5).Delay(1.0)
4141
.OnUpdate(OnUpdateHandler) // gets called whenever the value gets updates. (After the value has been set)
4242
.OnComplete(OnCompleteHandler) // gets called when the tween is completed
4343
.OnCompleteParams(5); // you may also specify method parameters the tween shall call your method with
44+
45+
46+
// Example
47+
handler.Add(point.Tween(x => x.X).To(10).In(1.0).Delay(0.4));
48+
handler.Update(200); // delay running
49+
handler.Update(200); // delay running
50+
handler.Update(200); // OnBegin called point.X == 2 OnUpdate called
51+
handler.Update(200); // point.X == 4 OnUpdate called
52+
handler.Update(200); // point.X == 6 OnUpdate called
53+
handler.Update(200); // point.X == 8 OnUpdate called
54+
handler.Update(200); // point.X == 10 OnUpdate called, OnComplete called
55+
handler.Update(100); // point.X == 10 (Tween has ended)
56+
57+
4458
````
4559
### Repeat
4660
You can specifiy repeat actions.

0 commit comments

Comments
 (0)