Explorar el Código

Fixed z-value render order example

Björn Ritzl hace 4 años
padre
commit
7dced86348

+ 3 - 1
docs/en/manuals/components.md

@@ -88,7 +88,9 @@ Example: Two game objects A and B. B is a child of A. B has a sprite component.
 | B        | 1       |
 | B#sprite | 0.5     |
 
-With the above hierarchy the final z-value of the sprite component on B is 2 + 1 + 0.5 = 2.5.
+![](images/graphics/component-hierarchy.png)
+
+With the above hierarchy the final z-value of the sprite component on B is 2 + 1 + 0.5 = 3.5.
 
 ::: important
 If two components have the exact same z-value the order is undefined and you may end up with components flickering back and forth or components being rendered in one order on one platform and in another order on another platform.

BIN
docs/en/manuals/images/graphics/component-hierarchy.png


+ 3 - 1
docs/pl/manuals/components.md

@@ -88,7 +88,9 @@ Przykład: Dwa obiekty gry A i B. Obiekt B jest dzieckiem obiektu A. Obiekt B ma
 | B        | 1       |
 | B#sprite | 0.5     |
 
-Przy powyższej hierarchi ostateczna wartość Z komponentu typu sprite to 2 + 1 + 0.5 = 2.5.
+![](images/graphics/component-hierarchy.png)
+
+Przy powyższej hierarchi ostateczna wartość Z komponentu typu sprite to 2 + 1 + 0.5 = 3.5.
 
 ::: important
 Jeśli dwa komponenty mają dokładnie taką samą wartość komponentu Z, to kolejność rysowania jest nieokreślona i obiekty mogą migać zmieniając nieustannie tę kolejność w zależności od platformy.

+ 2 - 0
docs/ru/manuals/components.md

@@ -88,6 +88,8 @@ msg.post("#weapon", "enable")
 | B        | 1       |
 | B#sprite | 0.5     |
 
+![](images/graphics/component-hierarchy.png)
+
 С помощью приведенной выше иерархии окончательное значение по Z спрайта в объекте B равно 2 + 1 + 0.5 = 3.5.
 
 ::: important

+ 2 - 0
docs/zh/manuals/components.md

@@ -88,6 +88,8 @@ Defold 组件属性各不相同.在 [Outline 面板](/manuals/editor/#Outline 
 | B        | 1       |
 | B#sprite | 0.5     |
 
+![](images/graphics/component-hierarchy.png)
+
 在上述定义中 B 的sprite组件最终z值是 2 + 1 + 0.5 = 3.5.
 
 ::: 注意