ResourcePreloader.xml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ResourcePreloader" inherits="Node" category="Core" version="3.1">
  3. <brief_description>
  4. Resource Preloader Node.
  5. </brief_description>
  6. <description>
  7. Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resources are ready to use and be retrieved from here.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="add_resource">
  15. <return type="void">
  16. </return>
  17. <argument index="0" name="name" type="String">
  18. </argument>
  19. <argument index="1" name="resource" type="Resource">
  20. </argument>
  21. <description>
  22. </description>
  23. </method>
  24. <method name="get_resource" qualifiers="const">
  25. <return type="Resource">
  26. </return>
  27. <argument index="0" name="name" type="String">
  28. </argument>
  29. <description>
  30. Return the resource given a text-id.
  31. </description>
  32. </method>
  33. <method name="get_resource_list" qualifiers="const">
  34. <return type="PoolStringArray">
  35. </return>
  36. <description>
  37. Return the list of resources inside the preloader.
  38. </description>
  39. </method>
  40. <method name="has_resource" qualifiers="const">
  41. <return type="bool">
  42. </return>
  43. <argument index="0" name="name" type="String">
  44. </argument>
  45. <description>
  46. Return true if the preloader has a given resource.
  47. </description>
  48. </method>
  49. <method name="remove_resource">
  50. <return type="void">
  51. </return>
  52. <argument index="0" name="name" type="String">
  53. </argument>
  54. <description>
  55. Remove a resource from the preloader by text id.
  56. </description>
  57. </method>
  58. <method name="rename_resource">
  59. <return type="void">
  60. </return>
  61. <argument index="0" name="name" type="String">
  62. </argument>
  63. <argument index="1" name="newname" type="String">
  64. </argument>
  65. <description>
  66. Rename a resource inside the preloader, from a text-id to a new text-id.
  67. </description>
  68. </method>
  69. </methods>
  70. <constants>
  71. </constants>
  72. </class>