Sfoglia il codice sorgente

Replace deprecated `go.delete_all` with `go.delete` (#248)

Artsiom Trubchyk 3 anni fa
parent
commit
0319904b7e

+ 2 - 2
docs/en/manuals/collection-factory.md

@@ -114,7 +114,7 @@ Synchronous loading
       -- Delete game objects. Will decref resources.
       -- In this case resources are deleted since the collection
       -- factory component holds no reference.
-      go.delete_all(self.go_ids)
+      go.delete(self.go_ids)
 
       -- Calling unload will do nothing since factory holds
       -- no references
@@ -141,7 +141,7 @@ Asynchronous loading
       -- Delete game object. Will decref resources.
       -- In this case resources aren’t deleted since the collection factory
       -- component still holds a reference.
-      go.delete_all(self.go_ids)
+      go.delete(self.go_ids)
 
       -- Calling unload will decref resources held by the factory component,
       -- resulting in resources being destroyed.

+ 1 - 1
docs/en/manuals/factory.md

@@ -144,7 +144,7 @@ for _, coin_id in ipairs(self.spawned_coins) do
 end
 
 -- or alternatively
-go.delete_all(self.spawned_coins)
+go.delete(self.spawned_coins)
 ```
 
 It is also common that you want the spawned object to be aware of the game object that spawned it. One case would be some type of autonomous object that can be spawned only one at a time. The spawned object then needs to inform the spawner when it is deleted or inactivated so another one can be spawned:

+ 2 - 2
docs/pl/manuals/collection-factory.md

@@ -115,7 +115,7 @@ Wczytywanie synchroniczne:
       -- Usuwanie obiektów gry. Zwolni to zasoby.
       -- W tym przypadku obiekty są usuwane, ponieważ 
       -- fabryka kolekcji nie ma żadnych referencji.
-      go.delete_all(self.go_ids)
+      go.delete(self.go_ids)
 
       -- Wywołanie unload nie zrobi nic, ponieważ
       -- fabryka kolekcji nie ma żadnych referencji.
@@ -144,7 +144,7 @@ Wczytywanie asynchroniczne:
       -- Usuwanie obiektu gry. Zasoby są zwalniane.
       -- W tym przypadku zasoby nie są usuwane, ponieważ
       -- fabryka kolekcji nadal posiada do nich referencję.
-      go.delete_all(self.go_ids)
+      go.delete(self.go_ids)
 
       -- Wywołanie unload zwolni zasoby utrzymywane przez farbykę i usunie je
       collectionfactory.unload("#factory")

+ 2 - 2
docs/ru/manuals/collection-factory.md

@@ -114,7 +114,7 @@ end
       -- Delete game objects. Will decref resources.
       -- In this case resources are deleted since the collection
       -- factory component holds no reference.
-      go.delete_all(self.go_ids)
+      go.delete(self.go_ids)
 
       -- Calling unload will do nothing since factory holds
       -- no references
@@ -141,7 +141,7 @@ end
       -- Delete game object. Will decref resources.
       -- In this case resources aren’t deleted since the collection factory
       -- component still holds a reference.
-      go.delete_all(self.go_ids)
+      go.delete(self.go_ids)
 
       -- Calling unload will decref resources held by the factory component,
       -- resulting in resources being destroyed.

+ 1 - 1
docs/ru/manuals/factory.md

@@ -144,7 +144,7 @@ for _, coin_id in ipairs(self.spawned_coins) do
 end
 
 -- или, как вариант
-go.delete_all(self.spawned_coins)
+go.delete(self.spawned_coins)
 ```
 
 Также часто бывает необходимо, чтобы порожденный объект знал об объекте, породившем его. В качестве примера можно привести какой-нибудь автономный объект, который может быть порожден только по одному за раз. Тогда порожденный объект должен сообщить породителю, когда он будет удален или деактивирован, чтобы можно было породить другой:

+ 2 - 2
docs/zh/manuals/collection-factory.md

@@ -114,7 +114,7 @@ end
       -- 删掉游戏对象, 资源引用计数减少
       -- 本例中集合工厂资源也会被卸载
       -- 因为集合工厂组件不包含对资源的引用.
-      go.delete_all(self.go_ids)
+      go.delete(self.go_ids)
 
       -- 因为集合工厂组件不包含对资源的引用
       -- 所以对集合工厂调用 unload 没有意义
@@ -141,7 +141,7 @@ end
       -- 删掉游戏对象, 资源引用计数减少
       -- 本例中集合工厂资源不会被卸载
       -- 因为集合工厂组件包含对资源的引用.
-      go.delete_all(self.go_ids)
+      go.delete(self.go_ids)
 
       -- 调用 unload 函数, 集合工厂对资源引用被释放,
       -- 这样资源才会被卸载.

+ 1 - 1
docs/zh/manuals/factory.md

@@ -143,7 +143,7 @@ for _, coin_id in ipairs(self.spawned_coins) do
 end
 
 -- 或者直接
-go.delete_all(self.spawned_coins)
+go.delete(self.spawned_coins)
 ```
 
 另一种常见用法是创建新对象时保存一个引用, 同时新对象也保存脚本的一个引用, 等以后需要时可以给创建脚本发送通知消息: