summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-07-29 10:52:57 +0200
committerGitHub <noreply@github.com>2020-07-29 10:52:57 +0200
commitc1bb45fcd50a28c7a8c7ebb0c7995b24e7482219 (patch)
tree4700c99f3336f076e7ae53b44b4eedbbeb430143 /doc/classes
parent227494be59eca4f50604a9c90c3c36ed15e7ecc5 (diff)
parent4257aa5c5c8cf9f93c20922da97e56ee0cc3d7bc (diff)
Merge pull request #40818 from Calinou/doc-animation-fix-code-sample
Fix incorrect key name in the Animation documentation code sample
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Animation.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 09811d5617..68f0a630ef 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -7,10 +7,10 @@
An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.
[codeblock]
# This creates an animation that makes the node "Enemy" move to the right by
- # 100 pixels in 1 second.
+ # 100 pixels in 0.5 seconds.
var animation = Animation.new()
var track_index = animation.add_track(Animation.TYPE_VALUE)
- animation.track_set_path(track_index, "Enemy:position.x")
+ animation.track_set_path(track_index, "Enemy:position:x")
animation.track_insert_key(track_index, 0.0, 0)
animation.track_insert_key(track_index, 0.5, 100)
[/codeblock]