瀏覽代碼

Merge pull request #40818 from Calinou/doc-animation-fix-code-sample

Fix incorrect key name in the Animation documentation code sample
Rémi Verschelde 5 年之前
父節點
當前提交
c1bb45fcd5
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      doc/classes/Animation.xml

+ 2 - 2
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]