2022-08-21 00:40:49 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-11-20 23:27:04 +01:00
<class name= "CScript" inherits= "Script" version= "3.10" >
2022-08-21 00:40:49 +02:00
<brief_description >
2022-07-12 19:55:21 +02:00
A script implemented in the CScript programming language.
2022-07-12 12:20:34 +02:00
</brief_description>
2022-08-21 00:40:49 +02:00
<description >
2022-07-12 19:55:21 +02:00
A script implemented in the CScript programming language. The script extends the functionality of all objects that instance it.
2022-07-12 12:20:34 +02:00
[method new] creates a new instance of the script. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
2022-08-21 00:40:49 +02:00
<tutorials >
<link > $DOCS_URL/tutorials/scripting/gdscript/index.html</link>
</tutorials>
<methods >
<method name= "get_as_byte_code" qualifiers= "const" >
<return type= "PoolByteArray" />
<description >
2022-07-12 12:20:34 +02:00
Returns byte code for the script source code.
</description>
2022-08-21 00:40:49 +02:00
</method>
<method name= "new" qualifiers= "vararg" >
<return type= "Variant" />
<description >
2022-07-12 12:20:34 +02:00
Returns a new instance of the script.
For example:
[codeblock]
var MyClass = load("myclass.gd")
var instance = MyClass.new()
assert(instance.get_script() == MyClass)
[/codeblock]
</description>
2022-08-21 00:40:49 +02:00
</method>
</methods>
<constants >
</constants>
2022-07-12 12:20:34 +02:00
</class>