diff --git a/.gitignore b/.gitignore index 03a576d..2f09588 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,10 @@ *.zip + +compiler/ + +out/ + +.idea/ + +DefoldSharpLib/obj/ diff --git a/bin/CoreSystem.Lua/All.lua b/CoreSystem.Lua/All.lua similarity index 100% rename from bin/CoreSystem.Lua/All.lua rename to CoreSystem.Lua/All.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Array.lua b/CoreSystem.Lua/CoreSystem/Array.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Array.lua rename to CoreSystem.Lua/CoreSystem/Array.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Boolean.lua b/CoreSystem.Lua/CoreSystem/Boolean.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Boolean.lua rename to CoreSystem.Lua/CoreSystem/Boolean.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Char.lua b/CoreSystem.Lua/CoreSystem/Char.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Char.lua rename to CoreSystem.Lua/CoreSystem/Char.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Collections/Dictionary.lua b/CoreSystem.Lua/CoreSystem/Collections/Dictionary.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Collections/Dictionary.lua rename to CoreSystem.Lua/CoreSystem/Collections/Dictionary.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Collections/EqualityComparer.lua b/CoreSystem.Lua/CoreSystem/Collections/EqualityComparer.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Collections/EqualityComparer.lua rename to CoreSystem.Lua/CoreSystem/Collections/EqualityComparer.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Collections/HashSet.lua b/CoreSystem.Lua/CoreSystem/Collections/HashSet.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Collections/HashSet.lua rename to CoreSystem.Lua/CoreSystem/Collections/HashSet.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Collections/LinkedList.lua b/CoreSystem.Lua/CoreSystem/Collections/LinkedList.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Collections/LinkedList.lua rename to CoreSystem.Lua/CoreSystem/Collections/LinkedList.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Collections/Linq.lua b/CoreSystem.Lua/CoreSystem/Collections/Linq.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Collections/Linq.lua rename to CoreSystem.Lua/CoreSystem/Collections/Linq.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Collections/List.lua b/CoreSystem.Lua/CoreSystem/Collections/List.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Collections/List.lua rename to CoreSystem.Lua/CoreSystem/Collections/List.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Collections/PriorityQueue.lua b/CoreSystem.Lua/CoreSystem/Collections/PriorityQueue.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Collections/PriorityQueue.lua rename to CoreSystem.Lua/CoreSystem/Collections/PriorityQueue.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Collections/Queue.lua b/CoreSystem.Lua/CoreSystem/Collections/Queue.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Collections/Queue.lua rename to CoreSystem.Lua/CoreSystem/Collections/Queue.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Collections/SortedDictionary.lua b/CoreSystem.Lua/CoreSystem/Collections/SortedDictionary.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Collections/SortedDictionary.lua rename to CoreSystem.Lua/CoreSystem/Collections/SortedDictionary.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Collections/SortedList.lua b/CoreSystem.Lua/CoreSystem/Collections/SortedList.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Collections/SortedList.lua rename to CoreSystem.Lua/CoreSystem/Collections/SortedList.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Collections/SortedSet.lua b/CoreSystem.Lua/CoreSystem/Collections/SortedSet.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Collections/SortedSet.lua rename to CoreSystem.Lua/CoreSystem/Collections/SortedSet.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Collections/Stack.lua b/CoreSystem.Lua/CoreSystem/Collections/Stack.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Collections/Stack.lua rename to CoreSystem.Lua/CoreSystem/Collections/Stack.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Console.lua b/CoreSystem.Lua/CoreSystem/Console.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Console.lua rename to CoreSystem.Lua/CoreSystem/Console.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Convert.lua b/CoreSystem.Lua/CoreSystem/Convert.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Convert.lua rename to CoreSystem.Lua/CoreSystem/Convert.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Core.lua b/CoreSystem.Lua/CoreSystem/Core.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Core.lua rename to CoreSystem.Lua/CoreSystem/Core.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/DateTime.lua b/CoreSystem.Lua/CoreSystem/DateTime.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/DateTime.lua rename to CoreSystem.Lua/CoreSystem/DateTime.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Delegate.lua b/CoreSystem.Lua/CoreSystem/Delegate.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Delegate.lua rename to CoreSystem.Lua/CoreSystem/Delegate.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Enum.lua b/CoreSystem.Lua/CoreSystem/Enum.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Enum.lua rename to CoreSystem.Lua/CoreSystem/Enum.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Exception.lua b/CoreSystem.Lua/CoreSystem/Exception.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Exception.lua rename to CoreSystem.Lua/CoreSystem/Exception.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Globalization/Globalization.lua b/CoreSystem.Lua/CoreSystem/Globalization/Globalization.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Globalization/Globalization.lua rename to CoreSystem.Lua/CoreSystem/Globalization/Globalization.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/IO/File.lua b/CoreSystem.Lua/CoreSystem/IO/File.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/IO/File.lua rename to CoreSystem.Lua/CoreSystem/IO/File.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Interfaces.lua b/CoreSystem.Lua/CoreSystem/Interfaces.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Interfaces.lua rename to CoreSystem.Lua/CoreSystem/Interfaces.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Math.lua b/CoreSystem.Lua/CoreSystem/Math.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Math.lua rename to CoreSystem.Lua/CoreSystem/Math.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Number.lua b/CoreSystem.Lua/CoreSystem/Number.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Number.lua rename to CoreSystem.Lua/CoreSystem/Number.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Numerics/Complex.lua b/CoreSystem.Lua/CoreSystem/Numerics/Complex.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Numerics/Complex.lua rename to CoreSystem.Lua/CoreSystem/Numerics/Complex.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Numerics/HashCodeHelper.lua b/CoreSystem.Lua/CoreSystem/Numerics/HashCodeHelper.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Numerics/HashCodeHelper.lua rename to CoreSystem.Lua/CoreSystem/Numerics/HashCodeHelper.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Numerics/Matrix3x2.lua b/CoreSystem.Lua/CoreSystem/Numerics/Matrix3x2.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Numerics/Matrix3x2.lua rename to CoreSystem.Lua/CoreSystem/Numerics/Matrix3x2.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Numerics/Matrix4x4.lua b/CoreSystem.Lua/CoreSystem/Numerics/Matrix4x4.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Numerics/Matrix4x4.lua rename to CoreSystem.Lua/CoreSystem/Numerics/Matrix4x4.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Numerics/Plane.lua b/CoreSystem.Lua/CoreSystem/Numerics/Plane.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Numerics/Plane.lua rename to CoreSystem.Lua/CoreSystem/Numerics/Plane.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Numerics/Quaternion.lua b/CoreSystem.Lua/CoreSystem/Numerics/Quaternion.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Numerics/Quaternion.lua rename to CoreSystem.Lua/CoreSystem/Numerics/Quaternion.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Numerics/Vector2.lua b/CoreSystem.Lua/CoreSystem/Numerics/Vector2.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Numerics/Vector2.lua rename to CoreSystem.Lua/CoreSystem/Numerics/Vector2.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Numerics/Vector3.lua b/CoreSystem.Lua/CoreSystem/Numerics/Vector3.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Numerics/Vector3.lua rename to CoreSystem.Lua/CoreSystem/Numerics/Vector3.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Numerics/Vector4.lua b/CoreSystem.Lua/CoreSystem/Numerics/Vector4.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Numerics/Vector4.lua rename to CoreSystem.Lua/CoreSystem/Numerics/Vector4.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Random.lua b/CoreSystem.Lua/CoreSystem/Random.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Random.lua rename to CoreSystem.Lua/CoreSystem/Random.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Reflection/Assembly.lua b/CoreSystem.Lua/CoreSystem/Reflection/Assembly.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Reflection/Assembly.lua rename to CoreSystem.Lua/CoreSystem/Reflection/Assembly.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/String.lua b/CoreSystem.Lua/CoreSystem/String.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/String.lua rename to CoreSystem.Lua/CoreSystem/String.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Text/StringBuilder.lua b/CoreSystem.Lua/CoreSystem/Text/StringBuilder.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Text/StringBuilder.lua rename to CoreSystem.Lua/CoreSystem/Text/StringBuilder.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Threading/Task.lua b/CoreSystem.Lua/CoreSystem/Threading/Task.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Threading/Task.lua rename to CoreSystem.Lua/CoreSystem/Threading/Task.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Threading/Thread.lua b/CoreSystem.Lua/CoreSystem/Threading/Thread.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Threading/Thread.lua rename to CoreSystem.Lua/CoreSystem/Threading/Thread.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Threading/Timer.lua b/CoreSystem.Lua/CoreSystem/Threading/Timer.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Threading/Timer.lua rename to CoreSystem.Lua/CoreSystem/Threading/Timer.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/TimeSpan.lua b/CoreSystem.Lua/CoreSystem/TimeSpan.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/TimeSpan.lua rename to CoreSystem.Lua/CoreSystem/TimeSpan.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Type.lua b/CoreSystem.Lua/CoreSystem/Type.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Type.lua rename to CoreSystem.Lua/CoreSystem/Type.lua diff --git a/bin/CoreSystem.Lua/CoreSystem/Utilities.lua b/CoreSystem.Lua/CoreSystem/Utilities.lua similarity index 100% rename from bin/CoreSystem.Lua/CoreSystem/Utilities.lua rename to CoreSystem.Lua/CoreSystem/Utilities.lua diff --git a/DefoldSharpLib.sln b/DefoldSharpLib.sln new file mode 100644 index 0000000..7cb7fe7 --- /dev/null +++ b/DefoldSharpLib.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefoldSharp", "DefoldSharpLib\DefoldSharp.csproj", "{AFF3A241-EFAC-4D58-AC49-C311D67C7546}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AFF3A241-EFAC-4D58-AC49-C311D67C7546}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AFF3A241-EFAC-4D58-AC49-C311D67C7546}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AFF3A241-EFAC-4D58-AC49-C311D67C7546}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AFF3A241-EFAC-4D58-AC49-C311D67C7546}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/DefoldSharpLib/Defold.cs b/DefoldSharpLib/Defold.cs new file mode 100644 index 0000000..eb6bab4 --- /dev/null +++ b/DefoldSharpLib/Defold.cs @@ -0,0 +1,25 @@ +namespace DefoldSharp +{ + /// + /// @CSharpLua.Ignore + /// + public static class Defold + { + /// + /// @CSharpLua.Template = "hash({0})" + /// + public static extern Hash hash(string s); + + + /// + /// @CSharpLua.Template = "hash_to_hex({0})" + /// + public static extern string hash_to_hex(Hash h); + + + /// + /// @CSharpLua.Template = "pprint({0})" + /// + public static extern void pprint(object v); + } +} \ No newline at end of file diff --git a/DefoldSharpLib/DefoldSharp.csproj b/DefoldSharpLib/DefoldSharp.csproj new file mode 100644 index 0000000..6c76b8a --- /dev/null +++ b/DefoldSharpLib/DefoldSharp.csproj @@ -0,0 +1,37 @@ + + + + net6.0 + 7.3 + false + + + + 1701;1702;0626;0824;0169;1591;1570;1573;1572 + ..\out\net6.0\DefoldSharp.xml + ..\out\ + + + + 1701;1702;0626;0824;0169;1591;1570;1573;1572 + ..\out\net6.0\DefoldSharp.xml + ..\out\ + + + + + + + + + + + + + + + + + + + diff --git a/DefoldSharpLib/DefoldSharp.csproj.DotSettings b/DefoldSharpLib/DefoldSharp.csproj.DotSettings new file mode 100644 index 0000000..6f9bc64 --- /dev/null +++ b/DefoldSharpLib/DefoldSharp.csproj.DotSettings @@ -0,0 +1,6 @@ + + True + True + True + True + True \ No newline at end of file diff --git a/DefoldSharpLib/Message.cs b/DefoldSharpLib/Message.cs new file mode 100644 index 0000000..89b4b07 --- /dev/null +++ b/DefoldSharpLib/Message.cs @@ -0,0 +1,144 @@ +using System; +using System.Collections.Generic; + +namespace DefoldSharp +{ + public static class Message + { + private static readonly Dictionary typeToHashLookup = new Dictionary(); + ///// + ///// @CSharpLua.Template = "msg.post({0},{1})" + ///// + //public static extern void post(HashOrStringOrUrl receiver, Message message_id); + + ///// + ///// @CSharpLua.Template = "msg.post({0},{1},{2})" + ///// + //public static extern void post(HashOrStringOrUrl receiver, Message message_id, T message_data); + + + ///// + ///// @CSharpLua.Template = "msg.post({0},{1},{2})" + ///// + //public static extern void post(HashOrStringOrUrl receiver, HashOrString message_id, object message_data); + + + /// + /// @CSharpLua.Template = msg.post({0},{1}) + /// + public static extern void post(string id, string message); + + /// + /// @CSharpLua.Template = msg.post({0},{1}) + /// + public static extern void post(Url id, string message); + /// + /// @CSharpLua.Template = msg.post({0},{1}) + /// + public static extern void post(Hash id, string message); + + + /// + /// @CSharpLua.Template = msg.post({0},{1},{2}) + /// + public static extern void post(string id, string code, LuaTable data); + + /// + /// @CSharpLua.Template = msg.post({0},{1},{2}) + /// + public static extern void post(Url id, string code, LuaTable data); + + /// + /// @CSharpLua.Template = msg.post({0},{1},{2}) + /// + public static extern void post(Hash id, string code, LuaTable data); + + + public static void postMessage(string id, string code, ILuaTableSerializable data) + { + post(id, code, data.ToTable()); + } + + + public static void postMessage(Url id, string code, ILuaTableSerializable data) + { + post(id, code, data.ToTable()); + } + + + public static void postMessage(Hash id, string code, ILuaTableSerializable data) + { + post(id, code, data.ToTable()); + } + + + public static void postMessage(string id, MessageImplementation message) + { + post(id, message.FetchCode(), message.ToTable()); + } + + + public static void postMessage(Hash id, MessageImplementation message) + { + post(id, message.FetchCode(), message.ToTable()); + } + + + public static void postMessage(Url id, MessageImplementation message) + { + post(id, message.FetchCode(), message.ToTable()); + } + + + public static bool IsMessage(Hash message_id, dynamic message, Hash expectedCode, out T messageImpl) + where T : MessageImplementation + { + if (message_id == expectedCode) + { + messageImpl = message; + return true; + } + + + messageImpl = message; + return false; + } + + + public static bool IsMessage(Hash message_id, dynamic message, out T messageImpl, + bool reconstructMetadata = false) where T : MessageImplementation, new() + { + if (!typeToHashLookup.TryGetValue(typeof(T), out var hash)) + { + var dummy = new T(); + hash = dummy.FetchCode(); + typeToHashLookup.Add(typeof(T), hash); + } + + if (hash == message_id) + { + if (reconstructMetadata) + messageImpl = LuaTableSerializableExt.DefaultTableDeserialization(message); + else + messageImpl = message; + + return true; + } + + + messageImpl = message; + return false; + } + } + + public abstract class MessageImplementation : ILuaTableSerializable + { + public LuaTable ToTable() + { + return this.DefaultTableSerialization(); + } + + + public abstract Hash FetchCode(); + } +} \ No newline at end of file diff --git a/src/defold/attributes/DefoldPropertyAttribute.cs b/DefoldSharpLib/attributes/DefoldPropertyAttribute.cs similarity index 100% rename from src/defold/attributes/DefoldPropertyAttribute.cs rename to DefoldSharpLib/attributes/DefoldPropertyAttribute.cs diff --git a/src/defold/attributes/DefoldPropertyProxyGenAttribute.cs b/DefoldSharpLib/attributes/DefoldPropertyProxyGenAttribute.cs similarity index 93% rename from src/defold/attributes/DefoldPropertyProxyGenAttribute.cs rename to DefoldSharpLib/attributes/DefoldPropertyProxyGenAttribute.cs index 71b9b8c..a7f8c4e 100644 --- a/src/defold/attributes/DefoldPropertyProxyGenAttribute.cs +++ b/DefoldSharpLib/attributes/DefoldPropertyProxyGenAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace attributes +namespace DefoldSharp { /// /// Flags a class as a property proxy, and that properties need to be generated on scripts diff --git a/src/defold/attributes/DoNotGenerateAttribute.cs b/DefoldSharpLib/attributes/DoNotGenerateAttribute.cs similarity index 86% rename from src/defold/attributes/DoNotGenerateAttribute.cs rename to DefoldSharpLib/attributes/DoNotGenerateAttribute.cs index 7f12ee3..9481ea7 100644 --- a/src/defold/attributes/DoNotGenerateAttribute.cs +++ b/DefoldSharpLib/attributes/DoNotGenerateAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace attributes +namespace DefoldSharp { [AttributeUsage(AttributeTargets.Class, Inherited = false)] public class DoNotGenerateAttribute : Attribute diff --git a/src/defold/attributes/GenGOScriptAttribute.cs b/DefoldSharpLib/attributes/GenScriptAttribute.cs similarity index 59% rename from src/defold/attributes/GenGOScriptAttribute.cs rename to DefoldSharpLib/attributes/GenScriptAttribute.cs index cba1a69..79d2765 100644 --- a/src/defold/attributes/GenGOScriptAttribute.cs +++ b/DefoldSharpLib/attributes/GenScriptAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace attributes +namespace DefoldSharp { /// /// Flags a class as needing to be generated to .script file. This is almost always done @@ -8,7 +8,14 @@ namespace attributes /// @CSharpLua.Ignore /// [AttributeUsage(AttributeTargets.Class)] - public class GenGOScriptAttribute : Attribute + public class GenScriptAttribute : Attribute { + private string Extension { get; } + + + public GenScriptAttribute(string extension) + { + Extension = extension; + } } } \ No newline at end of file diff --git a/src/defold/attributes/PropertyProxyHandling.cs b/DefoldSharpLib/attributes/PropertyProxyHandling.cs similarity index 93% rename from src/defold/attributes/PropertyProxyHandling.cs rename to DefoldSharpLib/attributes/PropertyProxyHandling.cs index 0850cfb..59a4b70 100644 --- a/src/defold/attributes/PropertyProxyHandling.cs +++ b/DefoldSharpLib/attributes/PropertyProxyHandling.cs @@ -1,6 +1,6 @@ using System; -namespace attributes +namespace DefoldSharp { [AttributeUsage(AttributeTargets.Class)] public class PropertyProxyHandling : Attribute diff --git a/DefoldSharpLib/bin/Release/net6.0/DefoldSharp.deps.json b/DefoldSharpLib/bin/Release/net6.0/DefoldSharp.deps.json new file mode 100644 index 0000000..47aa966 --- /dev/null +++ b/DefoldSharpLib/bin/Release/net6.0/DefoldSharp.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v6.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v6.0": { + "DefoldSharp/1.0.0": { + "runtime": { + "DefoldSharp.dll": {} + } + } + } + }, + "libraries": { + "DefoldSharp/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/DefoldSharpLib/bin/Release/net6.0/DefoldSharp.dll b/DefoldSharpLib/bin/Release/net6.0/DefoldSharp.dll new file mode 100644 index 0000000..085e432 Binary files /dev/null and b/DefoldSharpLib/bin/Release/net6.0/DefoldSharp.dll differ diff --git a/DefoldSharpLib/bin/Release/net6.0/DefoldSharp.pdb b/DefoldSharpLib/bin/Release/net6.0/DefoldSharp.pdb new file mode 100644 index 0000000..39a6c00 Binary files /dev/null and b/DefoldSharpLib/bin/Release/net6.0/DefoldSharp.pdb differ diff --git a/DefoldSharpLib/bin/Release/net6.0/DefoldSharp.xml b/DefoldSharpLib/bin/Release/net6.0/DefoldSharp.xml new file mode 100644 index 0000000..b331dd6 --- /dev/null +++ b/DefoldSharpLib/bin/Release/net6.0/DefoldSharp.xml @@ -0,0 +1,11191 @@ + + + + DefoldSharp + + + + + Flags a class as a property proxy, and that properties need to be generated on scripts + that use this class as a proxy. + + + + + Flags a class as needing to be generated to .script file. This is almost always done + by deriving from the GameObjectScript class. + @CSharpLua.Ignore + + + + + Buffer API documentation + + + + + + Create a new data buffer containing a specified set of streams. A data buffer + can contain one or more streams with typed data. This is useful for managing + compound data, for instance a vertex buffer could contain separate streams for + vertex position, color, normal etc. + + @CSharpLua.Template = "buffer.create({0}, {1})" + + + + + Get a specified stream from a buffer. + + @CSharpLua.Template = "buffer.get_stream({0}, {1})" + + + + + Get a specified stream from a buffer. + + @CSharpLua.Template = "buffer.get_stream({0}, {1})" + + + + + Copy a specified amount of data from one stream to another. + The value type and size must match between source and destination streams. + The source and destination streams can be the same. + + @CSharpLua.Template = "buffer.copy_stream({0}, {1}, {2}, {3}, {4})" + + + + + Copy all data streams from one buffer to another, element wise. + Each of the source streams must have a matching stream in the + destination buffer. The streams must match in both type and size. + The source and destination buffer can be the same. + + @CSharpLua.Template = "buffer.copy_buffer({0}, {1}, {2}, {3}, {4})" + + + + + Get a copy of all the bytes from a specified stream as a Lua string. + + @CSharpLua.Template = "buffer.get_bytes({0}, {1})" + + + + + Built-ins API documentation + + + + + + Pretty printing of Lua values. This function prints Lua values + in a manner similar to +print()+, but will also recurse into tables + and pretty print them. There is a limit to how deep the function + will recurse. + + @CSharpLua.Template = "builtins.pprint({0})" + + + + + All ids in the engine are represented as hashes, so a string needs to be hashed + before it can be compared with an id. + + @CSharpLua.Template = "builtins.hash({0})" + + + + + Returns a hexadecimal representation of a hash value. + The returned string is always padded with leading zeros. + + @CSharpLua.Template = "builtins.hash_to_hex({0})" + + + + + Camera API documentation + + + + + + + + + + + + + + + + + + Collection factory API documentation + + + + + + This returns status of the collection factory. + Calling this function when the factory is not marked as dynamic loading always returns COMP_COLLECTION_FACTORY_STATUS_LOADED. + + @CSharpLua.Template = "collectionfactory.get_status()" + + + + + This returns status of the collection factory. + Calling this function when the factory is not marked as dynamic loading always returns COMP_COLLECTION_FACTORY_STATUS_LOADED. + + @CSharpLua.Template = "collectionfactory.get_status({0})" + + + + + This returns status of the collection factory. + Calling this function when the factory is not marked as dynamic loading always returns COMP_COLLECTION_FACTORY_STATUS_LOADED. + + @CSharpLua.Template = "collectionfactory.get_status({0})" + + + + + This returns status of the collection factory. + Calling this function when the factory is not marked as dynamic loading always returns COMP_COLLECTION_FACTORY_STATUS_LOADED. + + @CSharpLua.Template = "collectionfactory.get_status({0})" + + + + + This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "collectionfactory.unload()" + + + + + This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "collectionfactory.unload({0})" + + + + + This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "collectionfactory.unload({0})" + + + + + This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "collectionfactory.unload({0})" + + + + + Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "collectionfactory.load()" + + + + + Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "collectionfactory.load({0})" + + + + + Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "collectionfactory.load({0}, {1})" + + + + + Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "collectionfactory.load({0})" + + + + + Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "collectionfactory.load({0}, {1})" + + + + + Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "collectionfactory.load({0})" + + + + + Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "collectionfactory.load({0}, {1})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0}, {1})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3}, {4})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0}, {1})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3}, {4})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0}, {1})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3})" + + + + + The URL identifies the collectionfactory component that should do the spawning. + Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + will be applied to the whole collection when spawned. + Script properties in the created game objects can be overridden through + a properties-parameter table. The table should contain game object ids + (hash) as keys and property tables as values to be used when initiating each + spawned game object. + See go.property for more information on script properties. + The function returns a table that contains a key for each game object + id (hash), as addressed if the collection file was top level, and the + corresponding spawned instance id (hash) as value with a unique path + prefix added to each instance. + Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + using collectionfactory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3}, {4})" + + + + + Collection proxy API documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + return an indexed table of resources for a collection proxy. Each + entry is a hexadecimal string that represents the data of the specific + resource. This representation corresponds with the filename for each + individual resource that is exported when you bundle an application with + LiveUpdate functionality. + + @CSharpLua.Template = "collectionproxy.get_resources({0})" + + + + + return an array of missing resources for a collection proxy. Each + entry is a hexadecimal string that represents the data of the specific + resource. This representation corresponds with the filename for each + individual resource that is exported when you bundle an application with + LiveUpdate functionality. It should be considered good practise to always + check whether or not there are any missing resources in a collection proxy + before attempting to load the collection proxy. + + @CSharpLua.Template = "collectionproxy.missing_resources({0})" + + + + + Posts a load message to the collection-proxy-component to start the loading of the referenced collection. When the loading has completed, the message proxy_loaded will be sent back to the script. A loaded collection must be initialized (message init) and enabled (message enable) in order to be simulated and drawn. + + + + + Posts a async_load message to a collection-proxy-component to start background loading of the referenced collection. When the loading has completed, the message proxy_loaded will be sent back to the script. A loaded collection must be initialized (message init) and enabled (message enable) in order to be simulated and drawn. + + + + + Post this message to a collection-proxy-component to initialize the game objects and components in the referenced collection. Sending enable to an uninitialized collection proxy automatically initializes it. The init message simply provides a higher level of control. + + + + + Post this message to a collection-proxy-component to enable the referenced collection, which in turn enables the contained game objects and components. If the referenced collection was not initialized prior to this call, it will automatically be initialized. + + + + + Post this message to a collection-proxy-component to disable the referenced collection, which in turn disables the contained game objects and components. + + + + + Post this message to a collection-proxy-component to finalize the referenced collection, which in turn finalizes the contained game objects and components. + + + + + Post this message to a collection-proxy-component to start the unloading of the referenced collection. When the unloading has completed, the message proxy_unloaded will be sent back to the script. + + + + + Post this message to a collection-proxy-component to modify the time-step used when updating the collection controlled by the proxy. The time-step is modified by a scaling factor and can be incremented either continuously or in discrete steps. The continuous mode can be used for slow-motion or fast-forward effects. The discrete mode is only useful when scaling the time-step to pass slower than real time (factor is below 1). The time-step will then be set to 0 for as many frames as the scaling demands and then take on the full real-time-step for one frame, to simulate pulses. E.g. if factor is set to 0.1 the time-step would be 0 for 9 frames, then be 1/60 for one frame, 0 for 9 frames, and so on. The result in practice is that the game looks like it's updated at a much lower frequency than 60 Hz, which can be useful for debugging when each frame needs to be inspected. + + + + + + + Crash API documentation + + + + + + Performs the same steps as if a crash had just occured but + allows the program to continue. + The generated dump can be read by crash.load_previous + + @CSharpLua.Template = "crash.write_dump()" + + + + + Crashes occuring before the path is set will be stored to a default engine location. + + @CSharpLua.Template = "crash.set_file_path({0})" + + + + + The crash dump will be removed from disk upon a successful + load, so loading is one-shot. + + @CSharpLua.Template = "crash.load_previous()" + + + + + releases a previously loaded crash dump + + @CSharpLua.Template = "crash.release({0})" + + + + + Store a user value that will get written to a crash dump when + a crash occurs. This can be user id:s, breadcrumb data etc. + There are 32 slots indexed from 0. Each slot stores at most 255 characters. + + @CSharpLua.Template = "crash.set_user_field({0}, {1})" + + + + + The function returns a table containing entries with sub-tables that + have fields 'name' and 'address' set for all loaded modules. + + @CSharpLua.Template = "crash.get_modules({0})" + + + + + reads user field from a loaded crash dump + + @CSharpLua.Template = "crash.get_user_field({0}, {1})" + + + + + reads a system field from a loaded crash dump + + @CSharpLua.Template = "crash.get_sys_field({0}, {1})" + + + + + read signal number from a crash report + + @CSharpLua.Template = "crash.get_signum({0})" + + + + + A table is returned containing the addresses of the call stack. + + @CSharpLua.Template = "crash.get_backtrace({0})" + + + + + The format of read text blob is platform specific + and not guaranteed + but can be useful for manual inspection. + + @CSharpLua.Template = "crash.get_extra_data({0})" + + + + + @CSharpLua.Ignore + + + + + @CSharpLua.Template = "hash({0})" + + + + + @CSharpLua.Template = "hash_to_hex({0})" + + + + + @CSharpLua.Template = "pprint({0})" + + + + + Facebook API documentation + + + + + + Factory API documentation + + + + + + This returns status of the factory. + Calling this function when the factory is not marked as dynamic loading always returns + factory.STATUS_LOADED. + + @CSharpLua.Template = "factory.get_status()" + + + + + This returns status of the factory. + Calling this function when the factory is not marked as dynamic loading always returns + factory.STATUS_LOADED. + + @CSharpLua.Template = "factory.get_status({0})" + + + + + This returns status of the factory. + Calling this function when the factory is not marked as dynamic loading always returns + factory.STATUS_LOADED. + + @CSharpLua.Template = "factory.get_status({0})" + + + + + This returns status of the factory. + Calling this function when the factory is not marked as dynamic loading always returns + factory.STATUS_LOADED. + + @CSharpLua.Template = "factory.get_status({0})" + + + + + This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "factory.unload()" + + + + + This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "factory.unload({0})" + + + + + This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "factory.unload({0})" + + + + + This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "factory.unload({0})" + + + + + Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "factory.load()" + + + + + Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "factory.load({0})" + + + + + Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "factory.load({0}, {1})" + + + + + Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "factory.load({0})" + + + + + Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "factory.load({0}, {1})" + + + + + Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "factory.load({0})" + + + + + Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + @CSharpLua.Template = "factory.load({0}, {1})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1}, {2})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1}, {2})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1}, {2})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" + + + + + The URL identifies which factory should create the game object. + If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + See go.property for more information on script properties. + Calling factory.create on a factory that is marked as dynamic without having loaded resources + using factory.load will synchronously load and create resources which may affect application performance. + + @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" + + + + + Calling this function when the factory is not marked as dynamic loading always returns + factory.STATUS_LOADED. + + + + + This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. + Calling this function when the factory is not marked as dynamic loading does nothing. + + + + + Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + Calling this function when the factory is not marked as dynamic loading does nothing. + + + + + Game object API documentation + + + + + + + + + + + + + + + + + + + + + + + + + + gets a named property of the specified game object or component + + @CSharpLua.Template = "go.get({0}, {1})" + + + + + gets a named property of the specified game object or component + + @CSharpLua.Template = "go.get({0}, {1}, {2})" + + + + + gets a named property of the specified game object or component + + @CSharpLua.Template = "go.get({0}, {1})" + + + + + gets a named property of the specified game object or component + + @CSharpLua.Template = "go.get({0}, {1}, {2})" + + + + + gets a named property of the specified game object or component + + @CSharpLua.Template = "go.get({0}, {1})" + + + + + gets a named property of the specified game object or component + + @CSharpLua.Template = "go.get({0}, {1}, {2})" + + + + + gets a named property of the specified game object or component + + @CSharpLua.Template = "go.get({0}, {1})" + + + + + gets a named property of the specified game object or component + + @CSharpLua.Template = "go.get({0}, {1}, {2})" + + + + + gets a named property of the specified game object or component + + @CSharpLua.Template = "go.get({0}, {1})" + + + + + gets a named property of the specified game object or component + + @CSharpLua.Template = "go.get({0}, {1}, {2})" + + + + + gets a named property of the specified game object or component + + @CSharpLua.Template = "go.get({0}, {1})" + + + + + gets a named property of the specified game object or component + + @CSharpLua.Template = "go.get({0}, {1}, {2})" + + + + + sets a named property of the specified game object or component, or a material constant + + @CSharpLua.Template = "go.set({0}, {1}, {2})" + + + + + sets a named property of the specified game object or component, or a material constant + + @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" + + + + + sets a named property of the specified game object or component, or a material constant + + @CSharpLua.Template = "go.set({0}, {1}, {2})" + + + + + sets a named property of the specified game object or component, or a material constant + + @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" + + + + + sets a named property of the specified game object or component, or a material constant + + @CSharpLua.Template = "go.set({0}, {1}, {2})" + + + + + sets a named property of the specified game object or component, or a material constant + + @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" + + + + + sets a named property of the specified game object or component, or a material constant + + @CSharpLua.Template = "go.set({0}, {1}, {2})" + + + + + sets a named property of the specified game object or component, or a material constant + + @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" + + + + + sets a named property of the specified game object or component, or a material constant + + @CSharpLua.Template = "go.set({0}, {1}, {2})" + + + + + sets a named property of the specified game object or component, or a material constant + + @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" + + + + + sets a named property of the specified game object or component, or a material constant + + @CSharpLua.Template = "go.set({0}, {1}, {2})" + + + + + sets a named property of the specified game object or component, or a material constant + + @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" + + + + + The position is relative the parent (if any). Use go.get_world_position to retrieve the global world position. + + @CSharpLua.Template = "go.get_position()" + + + + + The position is relative the parent (if any). Use go.get_world_position to retrieve the global world position. + + @CSharpLua.Template = "go.get_position({0})" + + + + + The position is relative the parent (if any). Use go.get_world_position to retrieve the global world position. + + @CSharpLua.Template = "go.get_position({0})" + + + + + The position is relative the parent (if any). Use go.get_world_position to retrieve the global world position. + + @CSharpLua.Template = "go.get_position({0})" + + + + + The rotation is relative to the parent (if any). Use go.get_world_rotation to retrieve the global world rotation. + + @CSharpLua.Template = "go.get_rotation()" + + + + + The rotation is relative to the parent (if any). Use go.get_world_rotation to retrieve the global world rotation. + + @CSharpLua.Template = "go.get_rotation({0})" + + + + + The rotation is relative to the parent (if any). Use go.get_world_rotation to retrieve the global world rotation. + + @CSharpLua.Template = "go.get_rotation({0})" + + + + + The rotation is relative to the parent (if any). Use go.get_world_rotation to retrieve the global world rotation. + + @CSharpLua.Template = "go.get_rotation({0})" + + + + + The scale is relative the parent (if any). Use go.get_world_scale to retrieve the global world 3D scale factor. + + @CSharpLua.Template = "go.get_scale()" + + + + + The scale is relative the parent (if any). Use go.get_world_scale to retrieve the global world 3D scale factor. + + @CSharpLua.Template = "go.get_scale({0})" + + + + + The scale is relative the parent (if any). Use go.get_world_scale to retrieve the global world 3D scale factor. + + @CSharpLua.Template = "go.get_scale({0})" + + + + + The scale is relative the parent (if any). Use go.get_world_scale to retrieve the global world 3D scale factor. + + @CSharpLua.Template = "go.get_scale({0})" + + + + + The uniform scale is relative the parent (if any). If the underlying scale vector is non-uniform the min element of the vector is returned as the uniform scale factor. + + @CSharpLua.Template = "go.get_scale_uniform()" + + + + + The uniform scale is relative the parent (if any). If the underlying scale vector is non-uniform the min element of the vector is returned as the uniform scale factor. + + @CSharpLua.Template = "go.get_scale_uniform({0})" + + + + + The uniform scale is relative the parent (if any). If the underlying scale vector is non-uniform the min element of the vector is returned as the uniform scale factor. + + @CSharpLua.Template = "go.get_scale_uniform({0})" + + + + + The uniform scale is relative the parent (if any). If the underlying scale vector is non-uniform the min element of the vector is returned as the uniform scale factor. + + @CSharpLua.Template = "go.get_scale_uniform({0})" + + + + + The position is relative to the parent (if any). The global world position cannot be manually set. + + @CSharpLua.Template = "go.set_position({0})" + + + + + The position is relative to the parent (if any). The global world position cannot be manually set. + + @CSharpLua.Template = "go.set_position({0}, {1})" + + + + + The position is relative to the parent (if any). The global world position cannot be manually set. + + @CSharpLua.Template = "go.set_position({0}, {1})" + + + + + The position is relative to the parent (if any). The global world position cannot be manually set. + + @CSharpLua.Template = "go.set_position({0}, {1})" + + + + + The rotation is relative to the parent (if any). The global world rotation cannot be manually set. + + @CSharpLua.Template = "go.set_rotation({0})" + + + + + The rotation is relative to the parent (if any). The global world rotation cannot be manually set. + + @CSharpLua.Template = "go.set_rotation({0}, {1})" + + + + + The rotation is relative to the parent (if any). The global world rotation cannot be manually set. + + @CSharpLua.Template = "go.set_rotation({0}, {1})" + + + + + The rotation is relative to the parent (if any). The global world rotation cannot be manually set. + + @CSharpLua.Template = "go.set_rotation({0}, {1})" + + + + + The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + Physics are currently not affected when setting scale from this function. + + @CSharpLua.Template = "go.set_scale({0})" + + + + + The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + Physics are currently not affected when setting scale from this function. + + @CSharpLua.Template = "go.set_scale({0}, {1})" + + + + + The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + Physics are currently not affected when setting scale from this function. + + @CSharpLua.Template = "go.set_scale({0}, {1})" + + + + + The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + Physics are currently not affected when setting scale from this function. + + @CSharpLua.Template = "go.set_scale({0}, {1})" + + + + + The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + Physics are currently not affected when setting scale from this function. + + @CSharpLua.Template = "go.set_scale({0})" + + + + + The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + Physics are currently not affected when setting scale from this function. + + @CSharpLua.Template = "go.set_scale({0}, {1})" + + + + + The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + Physics are currently not affected when setting scale from this function. + + @CSharpLua.Template = "go.set_scale({0}, {1})" + + + + + The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + Physics are currently not affected when setting scale from this function. + + @CSharpLua.Template = "go.set_scale({0}, {1})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent()" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1})" + + + + + Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + space. + This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + engine. + + @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + + + + + Get the parent for a game object instance. + + @CSharpLua.Template = "go.get_parent()" + + + + + Get the parent for a game object instance. + + @CSharpLua.Template = "go.get_parent({0})" + + + + + Get the parent for a game object instance. + + @CSharpLua.Template = "go.get_parent({0})" + + + + + Get the parent for a game object instance. + + @CSharpLua.Template = "go.get_parent({0})" + + + + + The function will return the world position calculated at the end of the previous frame. + Use go.get_position to retrieve the position relative to the parent. + + @CSharpLua.Template = "go.get_world_position()" + + + + + The function will return the world position calculated at the end of the previous frame. + Use go.get_position to retrieve the position relative to the parent. + + @CSharpLua.Template = "go.get_world_position({0})" + + + + + The function will return the world position calculated at the end of the previous frame. + Use go.get_position to retrieve the position relative to the parent. + + @CSharpLua.Template = "go.get_world_position({0})" + + + + + The function will return the world position calculated at the end of the previous frame. + Use go.get_position to retrieve the position relative to the parent. + + @CSharpLua.Template = "go.get_world_position({0})" + + + + + The function will return the world rotation calculated at the end of the previous frame. + Use go.get_rotation to retrieve the rotation relative to the parent. + + @CSharpLua.Template = "go.get_world_rotation()" + + + + + The function will return the world rotation calculated at the end of the previous frame. + Use go.get_rotation to retrieve the rotation relative to the parent. + + @CSharpLua.Template = "go.get_world_rotation({0})" + + + + + The function will return the world rotation calculated at the end of the previous frame. + Use go.get_rotation to retrieve the rotation relative to the parent. + + @CSharpLua.Template = "go.get_world_rotation({0})" + + + + + The function will return the world rotation calculated at the end of the previous frame. + Use go.get_rotation to retrieve the rotation relative to the parent. + + @CSharpLua.Template = "go.get_world_rotation({0})" + + + + + The function will return the world 3D scale factor calculated at the end of the previous frame. + Use go.get_scale to retrieve the 3D scale factor relative to the parent. + This vector is derived by decomposing the transformation matrix and should be used with care. + For most cases it should be fine to use go.get_world_scale_uniform instead. + + @CSharpLua.Template = "go.get_world_scale()" + + + + + The function will return the world 3D scale factor calculated at the end of the previous frame. + Use go.get_scale to retrieve the 3D scale factor relative to the parent. + This vector is derived by decomposing the transformation matrix and should be used with care. + For most cases it should be fine to use go.get_world_scale_uniform instead. + + @CSharpLua.Template = "go.get_world_scale({0})" + + + + + The function will return the world 3D scale factor calculated at the end of the previous frame. + Use go.get_scale to retrieve the 3D scale factor relative to the parent. + This vector is derived by decomposing the transformation matrix and should be used with care. + For most cases it should be fine to use go.get_world_scale_uniform instead. + + @CSharpLua.Template = "go.get_world_scale({0})" + + + + + The function will return the world 3D scale factor calculated at the end of the previous frame. + Use go.get_scale to retrieve the 3D scale factor relative to the parent. + This vector is derived by decomposing the transformation matrix and should be used with care. + For most cases it should be fine to use go.get_world_scale_uniform instead. + + @CSharpLua.Template = "go.get_world_scale({0})" + + + + + The function will return the world scale factor calculated at the end of the previous frame. + Use go.get_scale_uniform to retrieve the scale factor relative to the parent. + + @CSharpLua.Template = "go.get_world_scale_uniform()" + + + + + The function will return the world scale factor calculated at the end of the previous frame. + Use go.get_scale_uniform to retrieve the scale factor relative to the parent. + + @CSharpLua.Template = "go.get_world_scale_uniform({0})" + + + + + The function will return the world scale factor calculated at the end of the previous frame. + Use go.get_scale_uniform to retrieve the scale factor relative to the parent. + + @CSharpLua.Template = "go.get_world_scale_uniform({0})" + + + + + The function will return the world scale factor calculated at the end of the previous frame. + Use go.get_scale_uniform to retrieve the scale factor relative to the parent. + + @CSharpLua.Template = "go.get_world_scale_uniform({0})" + + + + + The function will return the world transform matrix calculated at the end of the previous frame. + + @CSharpLua.Template = "go.get_world_transform()" + + + + + The function will return the world transform matrix calculated at the end of the previous frame. + + @CSharpLua.Template = "go.get_world_transform({0})" + + + + + The function will return the world transform matrix calculated at the end of the previous frame. + + @CSharpLua.Template = "go.get_world_transform({0})" + + + + + The function will return the world transform matrix calculated at the end of the previous frame. + + @CSharpLua.Template = "go.get_world_transform({0})" + + + + + Returns or constructs an instance identifier. The instance id is a hash + of the absolute path to the instance. +
    +
  • If path is specified, it can either be absolute or relative to the instance of the calling script.
  • +
  • If path is not specified, the id of the game object instance the script is attached to will be returned.
  • +
+ + @CSharpLua.Template = "go.get_id()" +
+
+ + + Returns or constructs an instance identifier. The instance id is a hash + of the absolute path to the instance. +
    +
  • If path is specified, it can either be absolute or relative to the instance of the calling script.
  • +
  • If path is not specified, the id of the game object instance the script is attached to will be returned.
  • +
+ + @CSharpLua.Template = "go.get_id({0})" +
+
+ + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This is only supported for numerical properties. If the node property is already being + animated, that animation will be canceled and replaced by the new one. + If a complete_function (lua function) is specified, that function will be called when the animation has completed. + By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + If you call go.animate() from a game object's final() function, + any passed complete_function will be ignored and never called upon animation completion. + See the properties guide for which properties can be animated and the animation guide for how + them. + + @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + By calling this function, all or specified stored property animations of the game object or component will be canceled. + See the properties guide for which properties can be animated and the animation guide for how to animate them. + + @CSharpLua.Template = "go.cancel_animations({0})" + + + + + By calling this function, all or specified stored property animations of the game object or component will be canceled. + See the properties guide for which properties can be animated and the animation guide for how to animate them. + + @CSharpLua.Template = "go.cancel_animations({0}, {1})" + + + + + By calling this function, all or specified stored property animations of the game object or component will be canceled. + See the properties guide for which properties can be animated and the animation guide for how to animate them. + + @CSharpLua.Template = "go.cancel_animations({0}, {1})" + + + + + By calling this function, all or specified stored property animations of the game object or component will be canceled. + See the properties guide for which properties can be animated and the animation guide for how to animate them. + + @CSharpLua.Template = "go.cancel_animations({0})" + + + + + By calling this function, all or specified stored property animations of the game object or component will be canceled. + See the properties guide for which properties can be animated and the animation guide for how to animate them. + + @CSharpLua.Template = "go.cancel_animations({0}, {1})" + + + + + By calling this function, all or specified stored property animations of the game object or component will be canceled. + See the properties guide for which properties can be animated and the animation guide for how to animate them. + + @CSharpLua.Template = "go.cancel_animations({0}, {1})" + + + + + By calling this function, all or specified stored property animations of the game object or component will be canceled. + See the properties guide for which properties can be animated and the animation guide for how to animate them. + + @CSharpLua.Template = "go.cancel_animations({0})" + + + + + By calling this function, all or specified stored property animations of the game object or component will be canceled. + See the properties guide for which properties can be animated and the animation guide for how to animate them. + + @CSharpLua.Template = "go.cancel_animations({0}, {1})" + + + + + By calling this function, all or specified stored property animations of the game object or component will be canceled. + See the properties guide for which properties can be animated and the animation guide for how to animate them. + + @CSharpLua.Template = "go.cancel_animations({0}, {1})" + + + + + Delete one or more game objects identified by id. Deletion is asynchronous meaning that + the game object(s) are scheduled for deletion which will happen at the end of the current + frame. Note that game objects scheduled for deletion will be counted against + max_instances in "game.project" until they are actually removed. + Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + + @CSharpLua.Template = "go.delete()" + + + + + Delete one or more game objects identified by id. Deletion is asynchronous meaning that + the game object(s) are scheduled for deletion which will happen at the end of the current + frame. Note that game objects scheduled for deletion will be counted against + max_instances in "game.project" until they are actually removed. + Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + + @CSharpLua.Template = "go.delete({0})" + + + + + Delete one or more game objects identified by id. Deletion is asynchronous meaning that + the game object(s) are scheduled for deletion which will happen at the end of the current + frame. Note that game objects scheduled for deletion will be counted against + max_instances in "game.project" until they are actually removed. + Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + + @CSharpLua.Template = "go.delete({0}, {1})" + + + + + Delete one or more game objects identified by id. Deletion is asynchronous meaning that + the game object(s) are scheduled for deletion which will happen at the end of the current + frame. Note that game objects scheduled for deletion will be counted against + max_instances in "game.project" until they are actually removed. + Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + + @CSharpLua.Template = "go.delete({0})" + + + + + Delete one or more game objects identified by id. Deletion is asynchronous meaning that + the game object(s) are scheduled for deletion which will happen at the end of the current + frame. Note that game objects scheduled for deletion will be counted against + max_instances in "game.project" until they are actually removed. + Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + + @CSharpLua.Template = "go.delete({0}, {1})" + + + + + Delete one or more game objects identified by id. Deletion is asynchronous meaning that + the game object(s) are scheduled for deletion which will happen at the end of the current + frame. Note that game objects scheduled for deletion will be counted against + max_instances in "game.project" until they are actually removed. + Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + + @CSharpLua.Template = "go.delete({0})" + + + + + Delete one or more game objects identified by id. Deletion is asynchronous meaning that + the game object(s) are scheduled for deletion which will happen at the end of the current + frame. Note that game objects scheduled for deletion will be counted against + max_instances in "game.project" until they are actually removed. + Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + + @CSharpLua.Template = "go.delete({0}, {1})" + + + + + Delete one or more game objects identified by id. Deletion is asynchronous meaning that + the game object(s) are scheduled for deletion which will happen at the end of the current + frame. Note that game objects scheduled for deletion will be counted against + max_instances in "game.project" until they are actually removed. + Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + + @CSharpLua.Template = "go.delete({0})" + + + + + Delete one or more game objects identified by id. Deletion is asynchronous meaning that + the game object(s) are scheduled for deletion which will happen at the end of the current + frame. Note that game objects scheduled for deletion will be counted against + max_instances in "game.project" until they are actually removed. + Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + + @CSharpLua.Template = "go.delete({0}, {1})" + + + + + This function defines a property which can then be used in the script through the self-reference. + The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. + Note that you can only use this function outside any callback-functions like init and update. + + @CSharpLua.Template = "go.property({0}, {1})" + + + + + This function defines a property which can then be used in the script through the self-reference. + The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. + Note that you can only use this function outside any callback-functions like init and update. + + @CSharpLua.Template = "go.property({0}, {1})" + + + + + This function defines a property which can then be used in the script through the self-reference. + The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. + Note that you can only use this function outside any callback-functions like init and update. + + @CSharpLua.Template = "go.property({0}, {1})" + + + + + This function defines a property which can then be used in the script through the self-reference. + The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. + Note that you can only use this function outside any callback-functions like init and update. + + @CSharpLua.Template = "go.property({0}, {1})" + + + + + This function defines a property which can then be used in the script through the self-reference. + The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. + Note that you can only use this function outside any callback-functions like init and update. + + @CSharpLua.Template = "go.property({0}, {1})" + + + + + This function defines a property which can then be used in the script through the self-reference. + The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. + Note that you can only use this function outside any callback-functions like init and update. + + @CSharpLua.Template = "go.property({0}, {1})" + + + + + GUI API documentation + + + + + + + + + + Retrieves the node with the specified id. + + @CSharpLua.Template = "gui.get_node({0})" + + + + + Retrieves the node with the specified id. + + @CSharpLua.Template = "gui.get_node({0})" + + + + + Retrieves the id of the specified node. + + @CSharpLua.Template = "gui.get_id({0})" + + + + + Set the id of the specicied node to a new value. + Nodes created with the gui.new_*_node() functions get + an empty id. This function allows you to give dynamically + created nodes an id. + No checking is done on the uniqueness of supplied ids. + It is up to you to make sure you use unique ids. + + @CSharpLua.Template = "gui.set_id({0}, {1})" + + + + + Set the id of the specicied node to a new value. + Nodes created with the gui.new_*_node() functions get + an empty id. This function allows you to give dynamically + created nodes an id. + No checking is done on the uniqueness of supplied ids. + It is up to you to make sure you use unique ids. + + @CSharpLua.Template = "gui.set_id({0}, {1})" + + + + + Retrieve the index of the specified node among its siblings. + The index defines the order in which a node appear in a GUI scene. + Higher index means the node is drawn on top of lower indexed nodes. + + @CSharpLua.Template = "gui.get_index({0})" + + + + + Deletes the specified node. Any child nodes of the specified node will be + recursively deleted. + + @CSharpLua.Template = "gui.delete_node({0})" + + + + + This starts an animation of a node property according to the specified parameters. + If the node property is already being animated, that animation will be canceled and + replaced by the new one. Note however that several different node properties + can be animated simultaneously. Use gui.cancel_animation to stop the animation + before it has completed. + Composite properties of type vector3, vector4 or quaternion + also expose their sub-components (x, y, z and w). + You can address the components individually by suffixing the name with a dot '.' + and the name of the component. + For instance, "position.x" (the position x coordinate) or "color.w" + (the color alpha value). + If a complete_function (Lua function) is specified, that function will be called + when the animation has completed. + By starting a new animation in that function, several animations can be sequenced + together. See the examples below for more information. + + @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4})" + + + + + This starts an animation of a node property according to the specified parameters. + If the node property is already being animated, that animation will be canceled and + replaced by the new one. Note however that several different node properties + can be animated simultaneously. Use gui.cancel_animation to stop the animation + before it has completed. + Composite properties of type vector3, vector4 or quaternion + also expose their sub-components (x, y, z and w). + You can address the components individually by suffixing the name with a dot '.' + and the name of the component. + For instance, "position.x" (the position x coordinate) or "color.w" + (the color alpha value). + If a complete_function (Lua function) is specified, that function will be called + when the animation has completed. + By starting a new animation in that function, several animations can be sequenced + together. See the examples below for more information. + + @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This starts an animation of a node property according to the specified parameters. + If the node property is already being animated, that animation will be canceled and + replaced by the new one. Note however that several different node properties + can be animated simultaneously. Use gui.cancel_animation to stop the animation + before it has completed. + Composite properties of type vector3, vector4 or quaternion + also expose their sub-components (x, y, z and w). + You can address the components individually by suffixing the name with a dot '.' + and the name of the component. + For instance, "position.x" (the position x coordinate) or "color.w" + (the color alpha value). + If a complete_function (Lua function) is specified, that function will be called + when the animation has completed. + By starting a new animation in that function, several animations can be sequenced + together. See the examples below for more information. + + @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This starts an animation of a node property according to the specified parameters. + If the node property is already being animated, that animation will be canceled and + replaced by the new one. Note however that several different node properties + can be animated simultaneously. Use gui.cancel_animation to stop the animation + before it has completed. + Composite properties of type vector3, vector4 or quaternion + also expose their sub-components (x, y, z and w). + You can address the components individually by suffixing the name with a dot '.' + and the name of the component. + For instance, "position.x" (the position x coordinate) or "color.w" + (the color alpha value). + If a complete_function (Lua function) is specified, that function will be called + when the animation has completed. + By starting a new animation in that function, several animations can be sequenced + together. See the examples below for more information. + + @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This starts an animation of a node property according to the specified parameters. + If the node property is already being animated, that animation will be canceled and + replaced by the new one. Note however that several different node properties + can be animated simultaneously. Use gui.cancel_animation to stop the animation + before it has completed. + Composite properties of type vector3, vector4 or quaternion + also expose their sub-components (x, y, z and w). + You can address the components individually by suffixing the name with a dot '.' + and the name of the component. + For instance, "position.x" (the position x coordinate) or "color.w" + (the color alpha value). + If a complete_function (Lua function) is specified, that function will be called + when the animation has completed. + By starting a new animation in that function, several animations can be sequenced + together. See the examples below for more information. + + @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4})" + + + + + This starts an animation of a node property according to the specified parameters. + If the node property is already being animated, that animation will be canceled and + replaced by the new one. Note however that several different node properties + can be animated simultaneously. Use gui.cancel_animation to stop the animation + before it has completed. + Composite properties of type vector3, vector4 or quaternion + also expose their sub-components (x, y, z and w). + You can address the components individually by suffixing the name with a dot '.' + and the name of the component. + For instance, "position.x" (the position x coordinate) or "color.w" + (the color alpha value). + If a complete_function (Lua function) is specified, that function will be called + when the animation has completed. + By starting a new animation in that function, several animations can be sequenced + together. See the examples below for more information. + + @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This starts an animation of a node property according to the specified parameters. + If the node property is already being animated, that animation will be canceled and + replaced by the new one. Note however that several different node properties + can be animated simultaneously. Use gui.cancel_animation to stop the animation + before it has completed. + Composite properties of type vector3, vector4 or quaternion + also expose their sub-components (x, y, z and w). + You can address the components individually by suffixing the name with a dot '.' + and the name of the component. + For instance, "position.x" (the position x coordinate) or "color.w" + (the color alpha value). + If a complete_function (Lua function) is specified, that function will be called + when the animation has completed. + By starting a new animation in that function, several animations can be sequenced + together. See the examples below for more information. + + @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This starts an animation of a node property according to the specified parameters. + If the node property is already being animated, that animation will be canceled and + replaced by the new one. Note however that several different node properties + can be animated simultaneously. Use gui.cancel_animation to stop the animation + before it has completed. + Composite properties of type vector3, vector4 or quaternion + also expose their sub-components (x, y, z and w). + You can address the components individually by suffixing the name with a dot '.' + and the name of the component. + For instance, "position.x" (the position x coordinate) or "color.w" + (the color alpha value). + If a complete_function (Lua function) is specified, that function will be called + when the animation has completed. + By starting a new animation in that function, several animations can be sequenced + together. See the examples below for more information. + + @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + This starts an animation of a node property according to the specified parameters. + If the node property is already being animated, that animation will be canceled and + replaced by the new one. Note however that several different node properties + can be animated simultaneously. Use gui.cancel_animation to stop the animation + before it has completed. + Composite properties of type vector3, vector4 or quaternion + also expose their sub-components (x, y, z and w). + You can address the components individually by suffixing the name with a dot '.' + and the name of the component. + For instance, "position.x" (the position x coordinate) or "color.w" + (the color alpha value). + If a complete_function (Lua function) is specified, that function will be called + when the animation has completed. + By starting a new animation in that function, several animations can be sequenced + together. See the examples below for more information. + + @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4})" + + + + + This starts an animation of a node property according to the specified parameters. + If the node property is already being animated, that animation will be canceled and + replaced by the new one. Note however that several different node properties + can be animated simultaneously. Use gui.cancel_animation to stop the animation + before it has completed. + Composite properties of type vector3, vector4 or quaternion + also expose their sub-components (x, y, z and w). + You can address the components individually by suffixing the name with a dot '.' + and the name of the component. + For instance, "position.x" (the position x coordinate) or "color.w" + (the color alpha value). + If a complete_function (Lua function) is specified, that function will be called + when the animation has completed. + By starting a new animation in that function, several animations can be sequenced + together. See the examples below for more information. + + @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This starts an animation of a node property according to the specified parameters. + If the node property is already being animated, that animation will be canceled and + replaced by the new one. Note however that several different node properties + can be animated simultaneously. Use gui.cancel_animation to stop the animation + before it has completed. + Composite properties of type vector3, vector4 or quaternion + also expose their sub-components (x, y, z and w). + You can address the components individually by suffixing the name with a dot '.' + and the name of the component. + For instance, "position.x" (the position x coordinate) or "color.w" + (the color alpha value). + If a complete_function (Lua function) is specified, that function will be called + when the animation has completed. + By starting a new animation in that function, several animations can be sequenced + together. See the examples below for more information. + + @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + This starts an animation of a node property according to the specified parameters. + If the node property is already being animated, that animation will be canceled and + replaced by the new one. Note however that several different node properties + can be animated simultaneously. Use gui.cancel_animation to stop the animation + before it has completed. + Composite properties of type vector3, vector4 or quaternion + also expose their sub-components (x, y, z and w). + You can address the components individually by suffixing the name with a dot '.' + and the name of the component. + For instance, "position.x" (the position x coordinate) or "color.w" + (the color alpha value). + If a complete_function (Lua function) is specified, that function will be called + when the animation has completed. + By starting a new animation in that function, several animations can be sequenced + together. See the examples below for more information. + + @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + + + + + If an animation of the specified node is currently running (started by gui.animate), it will immediately be canceled. + + @CSharpLua.Template = "gui.cancel_animation({0}, {1})" + + + + + Dynamically create a new box node. + + @CSharpLua.Template = "gui.new_box_node({0}, {1})" + + + + + Dynamically create a new box node. + + @CSharpLua.Template = "gui.new_box_node({0}, {1})" + + + + + Dynamically create a new text node. + + @CSharpLua.Template = "gui.new_text_node({0}, {1})" + + + + + Dynamically create a new text node. + + @CSharpLua.Template = "gui.new_text_node({0}, {1})" + + + + + Dynamically create a new pie node. + + @CSharpLua.Template = "gui.new_pie_node({0}, {1})" + + + + + Dynamically create a new pie node. + + @CSharpLua.Template = "gui.new_pie_node({0}, {1})" + + + + + Returns the text value of a text node. This is only useful for text nodes. + + @CSharpLua.Template = "gui.get_text({0})" + + + + + Set the text value of a text node. This is only useful for text nodes. + + @CSharpLua.Template = "gui.set_text({0}, {1})" + + + + + Returns whether a text node is in line-break mode or not. + This is only useful for text nodes. + + @CSharpLua.Template = "gui.get_line_break({0})" + + + + + Sets the line-break mode on a text node. + This is only useful for text nodes. + + @CSharpLua.Template = "gui.set_line_break({0}, {1})" + + + + + Returns the blend mode of a node. + Blend mode defines how the node will be blended with the background. + + @CSharpLua.Template = "gui.get_blend_mode()" + + + + + Set the blend mode of a node. + Blend mode defines how the node will be blended with the background. + + @CSharpLua.Template = "gui.set_blend_mode({0}, {1})" + + + + + Returns the texture of a node. + This is currently only useful for box or pie nodes. + The texture must be mapped to the gui scene in the gui editor. + + @CSharpLua.Template = "gui.get_texture({0})" + + + + + Set the texture on a box or pie node. The texture must be mapped to + the gui scene in the gui editor. The function points out which texture + the node should render from. If the texture is an atlas, further + information is needed to select which image/animation in the atlas + to render. In such cases, use gui.play_flipbook() in + addition to this function. + + @CSharpLua.Template = "gui.set_texture({0}, {1})" + + + + + Set the texture on a box or pie node. The texture must be mapped to + the gui scene in the gui editor. The function points out which texture + the node should render from. If the texture is an atlas, further + information is needed to select which image/animation in the atlas + to render. In such cases, use gui.play_flipbook() in + addition to this function. + + @CSharpLua.Template = "gui.set_texture({0}, {1})" + + + + + Get node flipbook animation. + + @CSharpLua.Template = "gui.get_flipbook({0})" + + + + + Play flipbook animation on a box or pie node. + The current node texture must contain the animation. + Use this function to set one-frame still images on the node. + + @CSharpLua.Template = "gui.play_flipbook({0}, {1})" + + + + + Play flipbook animation on a box or pie node. + The current node texture must contain the animation. + Use this function to set one-frame still images on the node. + + @CSharpLua.Template = "gui.play_flipbook({0}, {1}, {2})" + + + + + Play flipbook animation on a box or pie node. + The current node texture must contain the animation. + Use this function to set one-frame still images on the node. + + @CSharpLua.Template = "gui.play_flipbook({0}, {1}, {2}, {3})" + + + + + Play flipbook animation on a box or pie node. + The current node texture must contain the animation. + Use this function to set one-frame still images on the node. + + @CSharpLua.Template = "gui.play_flipbook({0}, {1})" + + + + + Play flipbook animation on a box or pie node. + The current node texture must contain the animation. + Use this function to set one-frame still images on the node. + + @CSharpLua.Template = "gui.play_flipbook({0}, {1}, {2})" + + + + + Play flipbook animation on a box or pie node. + The current node texture must contain the animation. + Use this function to set one-frame still images on the node. + + @CSharpLua.Template = "gui.play_flipbook({0}, {1}, {2}, {3})" + + + + + Cancels any running flipbook animation on the specified node. + + @CSharpLua.Template = "gui.cancel_flipbook({0})" + + + + + Dynamically create a new texture. + + @CSharpLua.Template = "gui.new_texture({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Dynamically create a new texture. + + @CSharpLua.Template = "gui.new_texture({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Delete a dynamically created texture. + + @CSharpLua.Template = "gui.delete_texture({0})" + + + + + Delete a dynamically created texture. + + @CSharpLua.Template = "gui.delete_texture({0})" + + + + + Set the texture buffer data for a dynamically created texture. + + @CSharpLua.Template = "gui.set_texture_data({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Set the texture buffer data for a dynamically created texture. + + @CSharpLua.Template = "gui.set_texture_data({0}, {1}, {2}, {3}, {4}, {5})" + + + + + This is only useful for text nodes. The font must be mapped to the gui scene in the gui editor. + + @CSharpLua.Template = "gui.get_font({0})" + + + + + This is only useful for text nodes. The font must be mapped to the gui scene in the gui editor. + + @CSharpLua.Template = "gui.get_font_resource({0})" + + + + + This is only useful for text nodes. The font must be mapped to the gui scene in the gui editor. + + @CSharpLua.Template = "gui.get_font_resource({0})" + + + + + This is only useful for text nodes. + The font must be mapped to the gui scene in the gui editor. + + @CSharpLua.Template = "gui.set_font({0}, {1})" + + + + + This is only useful for text nodes. + The font must be mapped to the gui scene in the gui editor. + + @CSharpLua.Template = "gui.set_font({0}, {1})" + + + + + The layer must be mapped to the gui scene in the gui editor. + + @CSharpLua.Template = "gui.get_layer({0})" + + + + + The layer must be mapped to the gui scene in the gui editor. + + @CSharpLua.Template = "gui.set_layer({0}, {1})" + + + + + The layer must be mapped to the gui scene in the gui editor. + + @CSharpLua.Template = "gui.set_layer({0}, {1})" + + + + + gets the scene current layout + + @CSharpLua.Template = "gui.get_layout()" + + + + + Clipping mode defines how the node will clip it's children nodes + + @CSharpLua.Template = "gui.get_clipping_mode()" + + + + + Clipping mode defines how the node will clip it's children nodes + + @CSharpLua.Template = "gui.set_clipping_mode({0}, {1})" + + + + + If node is set as visible clipping node, it will be shown as well as clipping. Otherwise, it will only clip but not show visually. + + @CSharpLua.Template = "gui.get_clipping_visible({0})" + + + + + If node is set as an visible clipping node, it will be shown as well as clipping. Otherwise, it will only clip but not show visually. + + @CSharpLua.Template = "gui.set_clipping_visible({0}, {1})" + + + + + If node is set as an inverted clipping node, it will clip anything inside as opposed to outside. + + @CSharpLua.Template = "gui.get_clipping_inverted({0})" + + + + + If node is set as an inverted clipping node, it will clip anything inside as opposed to outside. + + @CSharpLua.Template = "gui.set_clipping_inverted({0}, {1})" + + + + + The x-anchor specifies how the node is moved when the game is run in a different resolution. + + @CSharpLua.Template = "gui.get_xanchor()" + + + + + The x-anchor specifies how the node is moved when the game is run in a different resolution. + + @CSharpLua.Template = "gui.set_xanchor({0}, {1})" + + + + + The y-anchor specifies how the node is moved when the game is run in a different resolution. + + @CSharpLua.Template = "gui.get_yanchor()" + + + + + The y-anchor specifies how the node is moved when the game is run in a different resolution. + + @CSharpLua.Template = "gui.set_yanchor({0}, {1})" + + + + + The pivot specifies how the node is drawn and rotated from its position. + + @CSharpLua.Template = "gui.get_pivot()" + + + + + The pivot specifies how the node is drawn and rotated from its position. + + @CSharpLua.Template = "gui.set_pivot({0}, {1})" + + + + + Returns the scene width. + + @CSharpLua.Template = "gui.get_width()" + + + + + Returns the scene height. + + @CSharpLua.Template = "gui.get_height()" + + + + + Set the slice9 configuration values for the node. + + @CSharpLua.Template = "gui.set_slice9({0}, {1})" + + + + + Returns the slice9 configuration values for the node. + + @CSharpLua.Template = "gui.get_slice9({0})" + + + + + Sets the number of generated vertices around the perimeter of a pie node. + + @CSharpLua.Template = "gui.set_perimeter_vertices({0}, {1})" + + + + + Returns the number of generated vertices around the perimeter + of a pie node. + + @CSharpLua.Template = "gui.get_perimeter_vertices({0})" + + + + + Set the sector angle of a pie node. + + @CSharpLua.Template = "gui.set_fill_angle({0}, {1})" + + + + + Returns the sector angle of a pie node. + + @CSharpLua.Template = "gui.get_fill_angle({0})" + + + + + Sets the inner radius of a pie node. + The radius is defined along the x-axis. + + @CSharpLua.Template = "gui.set_inner_radius({0}, {1})" + + + + + Returns the inner radius of a pie node. + The radius is defined along the x-axis. + + @CSharpLua.Template = "gui.get_inner_radius({0})" + + + + + Sets the outer bounds mode for a pie node. + + @CSharpLua.Template = "gui.set_outer_bounds({0}, {1})" + + + + + Returns the outer bounds mode for a pie node. + + @CSharpLua.Template = "gui.get_outer_bounds({0})" + + + + + Sets the leading value for a text node. This value is used to + scale the line spacing of text. + + @CSharpLua.Template = "gui.set_leading({0}, {1})" + + + + + Returns the leading value for a text node. + + @CSharpLua.Template = "gui.get_leading({0})" + + + + + Sets the tracking value of a text node. This value is used to + adjust the vertical spacing of characters in the text. + + @CSharpLua.Template = "gui.set_tracking({0}, {1})" + + + + + Returns the tracking value of a text node. + + @CSharpLua.Template = "gui.get_tracking({0})" + + + + + Tests whether a coordinate is within the bounding box of a + node. + + @CSharpLua.Template = "gui.pick_node({0}, {1}, {2})" + + + + + Returns true if a node is enabled and false if it's not. + Disabled nodes are not rendered and animations acting on them are not evaluated. + + @CSharpLua.Template = "gui.is_enabled({0}, {1})" + + + + + Sets a node to the disabled or enabled state. + Disabled nodes are not rendered and animations acting on them are not evaluated. + + @CSharpLua.Template = "gui.set_enabled({0}, {1})" + + + + + Returns true if a node is visible and false if it's not. + Invisible nodes are not rendered. + + @CSharpLua.Template = "gui.get_visible({0})" + + + + + Set if a node should be visible or not. Only visible nodes are rendered. + + @CSharpLua.Template = "gui.set_visible({0}, {1})" + + + + + Returns the adjust mode of a node. + The adjust mode defines how the node will adjust itself to screen + resolutions that differs from the one in the project settings. + + @CSharpLua.Template = "gui.get_adjust_mode({0})" + + + + + Sets the adjust mode on a node. + The adjust mode defines how the node will adjust itself to screen + resolutions that differs from the one in the project settings. + + @CSharpLua.Template = "gui.set_adjust_mode({0}, {1})" + + + + + Returns the size of a node. + The size mode defines how the node will adjust itself in size. Automatic + size mode alters the node size based on the node's content. Automatic size + mode works for Box nodes and Pie nodes which will both adjust their size + to match the assigned image. Particle fx and Text nodes will ignore + any size mode setting. + + @CSharpLua.Template = "gui.get_size_mode({0})" + + + + + Sets the size mode of a node. + The size mode defines how the node will adjust itself in size. Automatic + size mode alters the node size based on the node's content. Automatic size + mode works for Box nodes and Pie nodes which will both adjust their size + to match the assigned image. Particle fx and Text nodes will ignore + any size mode setting. + + @CSharpLua.Template = "gui.set_size_mode({0}, {1})" + + + + + Alters the ordering of the two supplied nodes by moving the first node + above the second. + If the second argument is nil the first node is moved to the top. + + @CSharpLua.Template = "gui.move_above({0}, {1})" + + + + + Alters the ordering of the two supplied nodes by moving the first node + above the second. + If the second argument is nil the first node is moved to the top. + + @CSharpLua.Template = "gui.move_above({0})" + + + + + Alters the ordering of the two supplied nodes by moving the first node + below the second. + If the second argument is nil the first node is moved to the bottom. + + @CSharpLua.Template = "gui.move_below({0}, {1})" + + + + + Alters the ordering of the two supplied nodes by moving the first node + below the second. + If the second argument is nil the first node is moved to the bottom. + + @CSharpLua.Template = "gui.move_below({0})" + + + + + Returns the parent node of the specified node. + If the supplied node does not have a parent, nil is returned. + + @CSharpLua.Template = "gui.get_parent({0})" + + + + + Sets the parent node of the specified node. + + @CSharpLua.Template = "gui.set_parent({0}, {1}, {2})" + + + + + Make a clone instance of a node. + This function does not clone the supplied node's children nodes. + Use gui.clone_tree for that purpose. + + @CSharpLua.Template = "gui.clone({0})" + + + + + Make a clone instance of a node and all its children. + Use gui.clone to clone a node excluding its children. + + @CSharpLua.Template = "gui.clone_tree({0})" + + + + + Resets all nodes in the current GUI scene to their initial state. + The reset only applies to static node loaded from the scene. + Nodes that are created dynamically from script are not affected. + + @CSharpLua.Template = "gui.reset_nodes()" + + + + + Set the order number for the current GUI scene. + The number dictates the sorting of the "gui" render predicate, + in other words in which order the scene will be rendered in relation + to other currently rendered GUI scenes. + The number must be in the range 0 to 15. + + @CSharpLua.Template = "gui.set_render_order({0})" + + + + + Shows the on-display touch keyboard. + The specified type of keyboard is displayed if it is available on + the device. + This function is only available on iOS and Android. . + + @CSharpLua.Template = "gui.show_keyboard({0}, {1})" + + + + + Hides the on-display touch keyboard on the device. + + @CSharpLua.Template = "gui.hide_keyboard()" + + + + + Resets the input context of keyboard. This will clear marked text. + + @CSharpLua.Template = "gui.reset_keyboard()" + + + + + Returns the position of the supplied node. + + @CSharpLua.Template = "gui.get_position({0})" + + + + + Sets the position of the supplied node. + + @CSharpLua.Template = "gui.set_position({0}, {1})" + + + + + Sets the position of the supplied node. + + @CSharpLua.Template = "gui.set_position({0}, {1})" + + + + + Returns the rotation of the supplied node. + The rotation is expressed in degree Euler angles. + + @CSharpLua.Template = "gui.get_rotation({0})" + + + + + Sets the rotation of the supplied node. + The rotation is expressed in degree Euler angles. + + @CSharpLua.Template = "gui.set_rotation({0}, {1})" + + + + + Sets the rotation of the supplied node. + The rotation is expressed in degree Euler angles. + + @CSharpLua.Template = "gui.set_rotation({0}, {1})" + + + + + Returns the scale of the supplied node. + + @CSharpLua.Template = "gui.get_scale({0})" + + + + + Sets the scaling of the supplied node. + + @CSharpLua.Template = "gui.set_scale({0}, {1})" + + + + + Sets the scaling of the supplied node. + + @CSharpLua.Template = "gui.set_scale({0}, {1})" + + + + + Returns the color of the supplied node. The components + of the returned vector4 contains the color channel values: + + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentColor value
xRed value
yGreen value
zBlue value
wAlpha value
+ + @CSharpLua.Template = "gui.get_color({0})" +
+
+ + + Sets the color of the supplied node. The components + of the supplied vector3 or vector4 should contain the color channel values: + + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentColor value
xRed value
yGreen value
zBlue value
w vector4Alpha value
+ + @CSharpLua.Template = "gui.set_color({0}, {1})" +
+
+ + + Sets the color of the supplied node. The components + of the supplied vector3 or vector4 should contain the color channel values: + + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentColor value
xRed value
yGreen value
zBlue value
w vector4Alpha value
+ + @CSharpLua.Template = "gui.set_color({0}, {1})" +
+
+ + + Returns the outline color of the supplied node. + See gui.get_color for info how vectors encode color values. + + @CSharpLua.Template = "gui.get_outline({0})" + + + + + Sets the outline color of the supplied node. + See gui.set_color for info how vectors encode color values. + + @CSharpLua.Template = "gui.set_outline({0}, {1})" + + + + + Sets the outline color of the supplied node. + See gui.set_color for info how vectors encode color values. + + @CSharpLua.Template = "gui.set_outline({0}, {1})" + + + + + Returns the shadow color of the supplied node. + See gui.get_color for info how vectors encode color values. + + @CSharpLua.Template = "gui.get_shadow({0})" + + + + + Sets the shadow color of the supplied node. + See gui.set_color for info how vectors encode color values. + + @CSharpLua.Template = "gui.set_shadow({0}, {1})" + + + + + Sets the shadow color of the supplied node. + See gui.set_color for info how vectors encode color values. + + @CSharpLua.Template = "gui.set_shadow({0}, {1})" + + + + + Sets the size of the supplied node. + You can only set size on nodes with size mode set to SIZE_MODE_MANUAL + + @CSharpLua.Template = "gui.set_size({0}, {1})" + + + + + Sets the size of the supplied node. + You can only set size on nodes with size mode set to SIZE_MODE_MANUAL + + @CSharpLua.Template = "gui.set_size({0}, {1})" + + + + + Returns the size of the supplied node. + + @CSharpLua.Template = "gui.get_size({0})" + + + + + Returns the screen position of the supplied node. This function returns the + calculated transformed position of the node, taking into account any parent node + transforms. + + @CSharpLua.Template = "gui.get_screen_position({0})" + + + + + Set the screen position to the supplied node + + @CSharpLua.Template = "gui.set_screen_position({0}, {1})" + + + + + Convert the screen position to the local position of supplied node + + @CSharpLua.Template = "gui.screen_to_local({0}, {1})" + + + + + This is only useful nodes with flipbook animations. The cursor is normalized. + + @CSharpLua.Template = "gui.set_flipbook_cursor({0}, {1})" + + + + + This is only useful nodes with flipbook animations. Gets the playback rate of the flipbook animation on a node. + + @CSharpLua.Template = "gui.get_flipbook_playback_rate({0})" + + + + + This is only useful nodes with flipbook animations. Sets the playback rate of the flipbook animation on a node. Must be positive. + + @CSharpLua.Template = "gui.set_flipbook_playback_rate({0}, {1})" + + + + + Dynamically create a particle fx node. + + @CSharpLua.Template = "gui.new_particlefx_node({0}, {1})" + + + + + Dynamically create a particle fx node. + + @CSharpLua.Template = "gui.new_particlefx_node({0}, {1})" + + + + + Dynamically create a particle fx node. + + @CSharpLua.Template = "gui.new_particlefx_node({0}, {1})" + + + + + Dynamically create a particle fx node. + + @CSharpLua.Template = "gui.new_particlefx_node({0}, {1})" + + + + + Plays the paricle fx for a gui node + + @CSharpLua.Template = "gui.play_particlefx({0})" + + + + + Plays the paricle fx for a gui node + + @CSharpLua.Template = "gui.play_particlefx({0}, {1})" + + + + + Stops the particle fx for a gui node + + @CSharpLua.Template = "gui.stop_particlefx({0}, {1})" + + + + + Set the paricle fx for a gui node + + @CSharpLua.Template = "gui.set_particlefx({0}, {1})" + + + + + Set the paricle fx for a gui node + + @CSharpLua.Template = "gui.set_particlefx({0}, {1})" + + + + + Get the paricle fx for a gui node + + @CSharpLua.Template = "gui.get_particlefx({0})" + + + + + gets the node inherit alpha state + + @CSharpLua.Template = "gui.get_inherit_alpha({0})" + + + + + sets the node inherit alpha state + + @CSharpLua.Template = "gui.set_inherit_alpha({0}, {1})" + + + + + gets the node alpha + + @CSharpLua.Template = "gui.get_alpha({0})" + + + + + sets the node alpha + + @CSharpLua.Template = "gui.set_alpha({0}, {1})" + + + + + This is a callback-function, which is called by the engine when a gui component is initialized. It can be used + to set the initial state of the script and gui scene. + + @CSharpLua.Template = "gui.init({0})" + + + + + This is a callback-function, which is called by the engine when a gui component is finalized (destroyed). It can + be used to e.g. take some last action, report the finalization to other game object instances + or release user input focus (see release_input_focus). There is no use in starting any animations or similar + from this function since the gui component is about to be destroyed. + + @CSharpLua.Template = "gui.final({0})" + + + + + This is a callback-function, which is called by the engine every frame to update the state of a gui component. + It can be used to perform any kind of gui related tasks, e.g. animating nodes. + + @CSharpLua.Template = "gui.update({0}, {1})" + + + + + This is a callback-function, which is called by the engine whenever a message has been sent to the gui component. + It can be used to take action on the message, e.g. update the gui or send a response back to the sender of the message. + The message parameter is a table containing the message data. If the message is sent from the engine, the + documentation of the message specifies which data is supplied. + See the update function for examples on how to use this callback-function. + + @CSharpLua.Template = "gui.on_message({0}, {1}, {2})" + + + + + This is a callback-function, which is called by the engine when user input is sent to the instance of the gui component. + It can be used to take action on the input, e.g. modify the gui according to the input. + For an instance to obtain user input, it must first acquire input + focus through the message acquire_input_focus. + Any instance that has obtained input will be put on top of an + input stack. Input is sent to all listeners on the stack until the + end of stack is reached, or a listener returns true + to signal that it wants input to be consumed. + See the documentation of acquire_input_focus for more + information. + The action parameter is a table containing data about the input mapped to the + action_id. + For mapped actions it specifies the value of the input and if it was just pressed or released. + Actions are mapped to input in an input_binding-file. + Mouse movement is specifically handled and uses nil as its action_id. + The action only contains positional parameters in this case, such as x and y of the pointer. + Here is a brief description of the available table fields: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
valueThe amount of input given by the user. This is usually 1 for buttons and 0-1 for analogue inputs. This is not present for mouse movement.
pressedIf the input was pressed this frame. This is not present for mouse movement.
releasedIf the input was released this frame. This is not present for mouse movement.
repeatedIf the input was repeated this frame. This is similar to how a key on a keyboard is repeated when you hold it down. This is not present for mouse movement.
xThe x value of a pointer device, if present.
yThe y value of a pointer device, if present.
screen_xThe screen space x value of a pointer device, if present.
screen_yThe screen space y value of a pointer device, if present.
dxThe change in x value of a pointer device, if present.
dyThe change in y value of a pointer device, if present.
screen_dxThe change in screen space x value of a pointer device, if present.
screen_dyThe change in screen space y value of a pointer device, if present.
gamepadThe index of the gamepad device that provided the input.
touchList of touch input, one element per finger, if present. See table below about touch input
+ Touch input table: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
idA number identifying the touch input during its duration.
pressedTrue if the finger was pressed this frame.
releasedTrue if the finger was released this frame.
tap_countNumber of taps, one for single, two for double-tap, etc
xThe x touch location.
yThe y touch location.
dxThe change in x value.
dyThe change in y value.
acc_xAccelerometer x value (if present).
acc_yAccelerometer y value (if present).
acc_zAccelerometer z value (if present).
+ + @CSharpLua.Template = "gui.on_input({0}, {1}, {2})" +
+
+ + + This is a callback-function, which is called by the engine when the gui script is reloaded, e.g. from the editor. + It can be used for live development, e.g. to tweak constants or set up the state properly for the script. + + @CSharpLua.Template = "gui.on_reload({0})" + + + + + @CSharpLua.Template = "gui.get_node({0})" + + + + + HTML5 API documentation + + + + + + Executes the supplied string as JavaScript inside the browser. + A call to this function is blocking, the result is returned as-is, as a string. + (Internally this will execute the string using the eval() JavaScript function.) + + @CSharpLua.Template = "html5.run({0})" + + + + + Set a JavaScript interaction listener callaback from lua that will be + invoked when a user interacts with the web page by clicking, touching or typing. + The callback can then call DOM restricted actions like requesting a pointer lock, + or start playing sounds the first time the callback is invoked. + + @CSharpLua.Template = "html5.set_interaction_listener()" + + + + + HTTP API documentation + + + + + + Perform a HTTP/HTTPS request. + If no timeout value is passed, the configuration value "network.http_timeout" is used. If that is not set, the timeout value is 0 (which blocks indefinitely). + + @CSharpLua.Template = "http.request({0}, {1}, {2})" + + + + + Perform a HTTP/HTTPS request. + If no timeout value is passed, the configuration value "network.http_timeout" is used. If that is not set, the timeout value is 0 (which blocks indefinitely). + + @CSharpLua.Template = "http.request({0}, {1}, {2}, {3})" + + + + + Perform a HTTP/HTTPS request. + If no timeout value is passed, the configuration value "network.http_timeout" is used. If that is not set, the timeout value is 0 (which blocks indefinitely). + + @CSharpLua.Template = "http.request({0}, {1}, {2}, {3}, {4})" + + + + + Perform a HTTP/HTTPS request. + If no timeout value is passed, the configuration value "network.http_timeout" is used. If that is not set, the timeout value is 0 (which blocks indefinitely). + + @CSharpLua.Template = "http.request({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Inter-app communication API documentation + + + + + + In-app purchases API documentation + + + + + + Image API documentation + + + + + + Load image (PNG or JPEG) from buffer. + + @CSharpLua.Template = "image.load({0})" + + + + + Load image (PNG or JPEG) from buffer. + + @CSharpLua.Template = "image.load({0}, {1})" + + + + + JSON API documentation + + + + + + Decode a string of JSON data into a Lua table. + A Lua error is raised for syntax errors. + + @CSharpLua.Template = "json.decode({0})" + + + + + Encode a lua table to a JSON string. + A Lua error is raised for syntax errors. + + @CSharpLua.Template = "json.encode({0})" + + + + + Label API documentation + + + + + + Sets the text of a label component + This method uses the message passing that means the value will be set after dispatch messages step. + More information is available in the Application Lifecycle manual. + + @CSharpLua.Template = "label.set_text({0}, {1})" + + + + + Sets the text of a label component + This method uses the message passing that means the value will be set after dispatch messages step. + More information is available in the Application Lifecycle manual. + + @CSharpLua.Template = "label.set_text({0}, {1})" + + + + + Sets the text of a label component + This method uses the message passing that means the value will be set after dispatch messages step. + More information is available in the Application Lifecycle manual. + + @CSharpLua.Template = "label.set_text({0}, {1})" + + + + + Gets the text from a label component + + @CSharpLua.Template = "label.get_text({0})" + + + + + Gets the text from a label component + + @CSharpLua.Template = "label.get_text({0})" + + + + + Gets the text from a label component + + @CSharpLua.Template = "label.get_text({0})" + + + + + @CSharpLua.Ignore + + + + + @CSharpLua.Template = "sys.get_engine_info().is_debug" + + + + + @CSharpLua.Template = "debug.gethook()" + + + + + @CSharpLua.Template = "debug.sethook()" + + + + + @CSharpLua.Template = "debug.sethook({0},{1},{2})" + + + + + An array of a particular type. + + + + + + @CSharpLua.Template = "{}" + + + + + + + + + @CSharpLua.Template = "{}" + + + + + @CSharpLua.Template = "{}" + + + + + @CSharpLua.Template = "{}" + + + + + @CSharpLua.Template = "#{0}" + + + + + @CSharpLua.Template = "{{0}}" + + + + + @CSharpLua.Template = "{{0}, {1}}" + + + + + @CSharpLua.Template = "{{0},{1},{2}}" + + + + + @CSharpLua.Template = "{{0},{1},{2},{3}}" + + + + + @CSharpLua.Template = "{{0},{1},{2},{3},{4}}" + + + + + @CSharpLua.Template = "{{0},{1},{2},{3},{4},{5}}" + + + + + @CSharpLua.Template = "{{0},{1},{2},{3},{4},{5},{6}}" + + + + + @CSharpLua.Template = "{{0},{1},{2},{3},{4},{5},{6},{7}}" + + + + + @CSharpLua.Template = "#{0}" + + + + + Adds the value to the end of the array. + + @CSharpLua.Template = "table.insert({0}, {1})" + + value to insert + + + + Inserts a value into the array at the specified position + + @CSharpLua.Template = "table.insert({0}, {1} + 1, {2})" + + index to insert at + value to insert + + + + Removes the element at the passed index + + @CSharpLua.Template = "table.remove({0}, {1} + 1)" + + index to remove + + + + + Removes the element at the passed index + + @CSharpLua.Template = "table.remove({0})" + + index to remove + + + + + Sorts table elements in a given order, in-place, from table[1] to table[n], where n is the length of the table. + the standard Lua operator 'less than' is used instead. The sort algorithm is not stable; that is, elements considered equal by the given order may have their relative positions changed by the sort. + + @CSharpLua.Template = "table.sort({0})" + + + + + Sorts table elements in a given order, in-place, from table[1] to table[n], where n is the length of the table. + the standard Lua operator 'less than' is used instead. The sort algorithm is not stable; that is, elements considered equal by the given order may have their relative positions changed by the sort. + + @CSharpLua.Template = "table.sort({0}, {1})" + + + + + Given an array where all elements are strings or numbers, concatenates all of them together. + + @CSharpLua.Template = "table.concat({0})" + The table to concatenate values + + + + + Given an array where all elements are strings or numbers, concatenates all of them together, separated by sep. + + @CSharpLua.Template = "table.concat({0}, {1})" + The table to concatenate values + The separator to insert between elements. + + + + + Given an array where all elements are strings or numbers, concatenates all of them together, separated by sep, starting with startOffset. + + @CSharpLua.Template = "table.concat({0}, {1}, {2} + 1)" + The table to concatenate values + The separator to insert between elements. + The starting offset for the concatenation. Zero-based. ( + 1 in lua ) + + + + + Given an array where all elements are strings or numbers, concatenates all of them together, separated by sep, starting with startOffset and ending at endOffset. + + @CSharpLua.Template = "table.concat({0}, {1}, {2} + 1, {3} + 1)" + + The table to concatenate values + The separator to insert between elements. + The starting offset for the concatenation. Zero-based. ( + 1 in lua ) + The ending offset for the concatenation. Defaults to the length of the table. Zero-based. ( + 1 in lua ) + + + + + + + + + Use one of the create methods instead. + + + + + @CSharpLua.Template = "{}" + + + + + @CSharpLua.Template = "{}" + + + + + @CSharpLua.Template = "{0}[{1}] = {2}" + + + + + @CSharpLua.Template = "{0}[{1}] = nil" + + + + + @CSharpLua.Template = for k in next, {0} do rawset({0}, k, nil) end + + + + + @CSharpLua.Template = "{0}[{1}]" + + + + + @CSharpLua.Template = "{0}[{1}]" + + + + + @CSharpLua.Template = "{0}[{1}] = {2}" + + + + + Lua math standard library + + @CSharpLua.Ignore + + + + + + This function is an interface to the simple + pseudo-random generator function rand provided by ANSI C. + (No guarantees can be given for its statistical properties.) + When called without arguments, + returns a uniform pseudo-random real number + in the range [0,1). + When called with an integer number m, + math.random returns + a uniform pseudo-random integer in the range [1, m]. + When called with two integer numbers m and n, + math.random returns a uniform pseudo-random + integer in the range [m, n]. + + @CSharpLua.Template = "math.random()" + + + + + @CSharpLua.Template = "math.abs({0})" + + + + + @CSharpLua.Template = "math.acos({0})" + + + + + @CSharpLua.Template = "math.asin({0})" + + + + + @CSharpLua.Template = "math.atan({0})" + + + + + @CSharpLua.Template = "math.atan2({0},{1})" + + + + + @CSharpLua.Template = "math.ceil({0})" + + + + + @CSharpLua.Template = "math.cos({0})" + + + + + @CSharpLua.Template = "math.cosh({0})" + + + + + @CSharpLua.Template = "math.deg({0})" + + + + + @CSharpLua.Template = "math.exp({0})" + + + + + @CSharpLua.Template = "math.floor({0})" + + + + + @CSharpLua.Template = "math.fmod({0},{1})" + + + + + @CSharpLua.Template = "math.frexp({0})" + + + + + @CSharpLua.Template = "math.ldexp({0},{1})" + + + + + @CSharpLua.Template = "math.log({0})" + + + + + @CSharpLua.Template = "math.log10({0})" + + + + + @CSharpLua.Template = "math.max({0},{1})" + + + + + @CSharpLua.Template = "math.max({0},{1},{2})" + + + + + @CSharpLua.Template = "math.max({0},{1},{2},{3})" + + + + + @CSharpLua.Template = "math.max({0},{1},{2},{3},{4})" + + + + + @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5})" + + + + + @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5},{6})" + + + + + @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5},{6},{7})" + + + + + @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5},{6},{7},{8})" + + + + + @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5},{6},{7},{8},{9})" + + + + + @CSharpLua.Template = "math.min({0},{1})" + + + + + @CSharpLua.Template = "math.min({0},{1},{2})" + + + + + @CSharpLua.Template = "math.min({0},{1},{2},{3})" + + + + + @CSharpLua.Template = "math.min({0},{1},{2},{3},{4})" + + + + + @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5})" + + + + + @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5},{6})" + + + + + @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5},{6},{7})" + + + + + @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5},{6},{7},{8})" + + + + + @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5},{6},{7},{8},{9})" + + + + + @CSharpLua.Template = "math.modf({0})" + + + + + @CSharpLua.Template = "math.pow({0},{1})" + + + + + @CSharpLua.Template = "math.rad({0})" + + + + + @CSharpLua.Template = "math.random({0})" + + + + + @CSharpLua.Template = "math.random({0}, {1})" + + + + + @CSharpLua.Template = "math.random({0})" + + + + + @CSharpLua.Template = "math.random({0}, {1})" + + + + + @CSharpLua.Template = "math.randomseed({0})" + + + + + @CSharpLua.Template = "math.sin({0})" + + + + + @CSharpLua.Template = "math.sinh({0})" + + + + + @CSharpLua.Template = "math.sqrt({0})" + + + + + @CSharpLua.Template = "math.tan({0})" + + + + + @CSharpLua.Template = "math.tan({0})" + + + + + @CSharpLua.Template = "math.huge" + + + + + @CSharpLua.Template = "math.pi" + + + + + @CSharpLua.Template = "(2*math.pi)" + + + + + The mathematically superior and far more intuitive constant. 2 x PI. So, a quarter circle is TAU/4, half a circle is TAU/2, etc. + + + + + @CSharpLua.Ignore + + + + + + @CSharpLua.Template = "#{0}" + + + + + Given an array where all elements are strings or numbers, concatenates all of them together. + + @CSharpLua.Template = "table.concat({0})" + The table to concatenate values + + + + + Given an array where all elements are strings or numbers, concatenates all of them together, separated by sep. + + @CSharpLua.Template = "table.concat({0}, {1})" + The table to concatenate values + The separator to insert between elements. + + + + + Given an array where all elements are strings or numbers, concatenates all of them together, separated by sep, starting with startOffset. + + @CSharpLua.Template = "table.concat({0}, {1}, {2} + 1)" + The table to concatenate values + The separator to insert between elements. + The starting offset for the concatenation. Zero-based. ( + 1 in lua ) + + + + + Given an array where all elements are strings or numbers, concatenates all of them together, separated by sep, starting with startOffset and ending at endOffset. + + @CSharpLua.Template = "table.concat({0}, {1}, {2} + 1, {3} + 1)" + + The table to concatenate values + The separator to insert between elements. + The starting offset for the concatenation. Zero-based. ( + 1 in lua ) + The ending offset for the concatenation. Defaults to the length of the table. Zero-based. ( + 1 in lua ) + + + + + Inserts a value at the end of the table. + + @CSharpLua.Template = "table.insert({0}, {1})" + + The table to insert values into + The value to insert + + + + Inserts a value at a position in the table, shifting up other elements to open space, if necessary. + + @CSharpLua.Template = "table.insert({0}, {1} + 1, {2})" + + The table to insert values into + The position to insert at. Zero-based + The value to insert + + + + + Returns the largest positive numerical index of the given table, or zero if the table has no positive numerical indices. (To do its job this function does a linear traversal of the whole table.) + + @CSharpLua.Template = "table.maxn({0})" + + The table to scan + + + + Removes the last element of the table. + + @CSharpLua.Template = "table.remove({0})" + + The table to trim + + + + Removes from table the element at position pos, shifting down other elements to close the space, if necessary. Returns the value of the removed element + + @CSharpLua.Template = "table.remove({0}, {1} + 1)" + + The position to remove. Zero-based + The table to trim + + + + Sorts table elements in a given order, in-place, from table[1] to table[n], where n is the length of the table. + the standard Lua operator 'less than' is used instead. The sort algorithm is not stable; that is, elements considered equal by the given order may have their relative positions changed by the sort. + + @CSharpLua.Template = "table.sort({0})" + + The table to sort + + + + Sorts table elements in a given order, in-place, from table[1] to table[n], where n is the length of the table. + the standard Lua operator 'less than' is used instead. The sort algorithm is not stable; that is, elements considered equal by the given order may have their relative positions changed by the sort. + + @CSharpLua.Template = "table.sort({0}, {1})" + + The table to sort + + + + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{0}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @CSharpLua.Template = "hash({0})" + + + + + @CSharpLua.Template = "{0}" + + + + + @CSharpLua.Template = "{this}" + + + + + //Used so we can fool the C# compiler into allowing us more overrides. Hash is the actual implementation and should be + used in methods where possible. + + + + + @CSharpLua.Ignore + + + + + @CSharpLua.Template = "hash({0})" + + + + + @CSharpLua.Template = "{this}" + + + + + //Used so we can fool the C# compiler into allowing us more overrides. Hash is the actual implementation and should be + used in methods where possible. + + + + + @CSharpLua.Ignore + + + + + @CSharpLua.Template = "hash({0})" + + + + + @CSharpLua.Template = "{this}" + + + + + + + + + + + + + + + + + @CSharpLua.Template = "vmath.matrix4()" + + + + + @CSharpLua.Template = "vmath.matrix4({0})" + + + + + @CSharpLua.Template = "vmath.matrix4_axis_angle({0},{1})" + + + + + @CSharpLua.Template = "vmath.matrix4_from_quat({0})" + + + + + @CSharpLua.Template = "vmath.matrix4_frustum({0},{1},{2},{3},{4},{5})" + + + + + @CSharpLua.Template = "vmath.matrix4_look_at({0},{1},{2})" + + + + + @CSharpLua.Template = "vmath.matrix4_orthographic({0},{1},{2},{3},{4},{5})" + + + + + @CSharpLua.Template = "vmath.matrix4_perspective({0},{1},{2},{3})" + + + + + @CSharpLua.Template = "vmath.matrix4_rotation_x({0})" + + + + + @CSharpLua.Template = "vmath.matrix4_rotation_y({0})" + + + + + @CSharpLua.Template = "vmath.matrix4_rotation_z({0})" + + + + + @CSharpLua.Template = "vmath.matrix4_translation({0})" + + + + + @CSharpLua.Template = "vmath.matrix4_translation({0})" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "vmath.ortho_inv({this})" + + + + + + + + + @CSharpLua.Template = "gui.set_enabled({this}, {0})" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @CSharpLua.Template = "vmath.quat()" + + + + + @CSharpLua.Template = "vmath.quat({0})" + + + + + @CSharpLua.Template = "vmath.quat({0},{1},{2},{3})" + + + + + @CSharpLua.Template = "vmath.quat_axis_angle({0},{1})" + + + + + @CSharpLua.Template = "vmath.quat_basis({0},{1},{2})" + + + + + @CSharpLua.Template = "vmath.quat_from_to({0},{1})" + + + + + @CSharpLua.Template = "vmath.quat_rotation_x({0})" + + + + + @CSharpLua.Template = "vmath.quat_rotation_y({0})" + + + + + @CSharpLua.Template = "vmath.quat_rotation_z({0})" + + + + + @CSharpLua.Template = "vmath.rotate({this},{0})" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @CSharpLua.Template = "msg.url()" + + + + + @CSharpLua.Template = "msg.url({0})" + + + + + @CSharpLua.Template = "msg.url({0},{1},{2})" + + + + + + + + + @CSharpLua.Template = "vmath.vector3()" + + + + + @CSharpLua.Template = "vmath.vector3({0},{1},0)" + + + + + @CSharpLua.Template = "{0} + {1}" + + + + + @CSharpLua.Template = "{0} - {1}" + + + + + @CSharpLua.Template = "-{0}" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "{0} / {1}" + + + + + @CSharpLua.Template = "vmath.length({this})" + + + + + @CSharpLua.Template = "vmath.length_sqr({this})" + + + + + @CSharpLua.Template = "vmath.mul_per_elem({this},{0})" + + + + + @CSharpLua.Template = "vmath.normalize({this})" + + + + + @CSharpLua.Template = "vmath.project({this},{0})" + + + + + @CSharpLua.Template = "vmath.project({this},{0})" + + + + + @CSharpLua.Template = "{0}" + + + + + + + + + @CSharpLua.Template = "vmath.vector3()" + + + + + @CSharpLua.Template = "vmath.vector3({0},{1},{2})" + + + + + @CSharpLua.Template = "{0} + {1}" + + + + + @CSharpLua.Template = "{0} - {1}" + + + + + @CSharpLua.Template = "-{0}" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "{0} / {1}" + + + + + @CSharpLua.Template = "vmath.length({this})" + + + + + @CSharpLua.Template = "vmath.length_sqr({this})" + + + + + @CSharpLua.Template = "vmath.mul_per_elem({this},{0})" + + + + + @CSharpLua.Template = "vmath.normalize({this})" + + + + + @CSharpLua.Template = "vmath.project({this},{0})" + + + + + @CSharpLua.Template = "{this}" + + + + + + + + + @CSharpLua.Template = "vmath.vector4()" + + + + + @CSharpLua.Template = "vmath.vector4({0},{1},{2},{3})" + + + + + @CSharpLua.Template = "{0} + {1}" + + + + + @CSharpLua.Template = "{0} - {1}" + + + + + @CSharpLua.Template = "-{0}" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "{0} * {1}" + + + + + @CSharpLua.Template = "{0} / {1}" + + + + + @CSharpLua.Template = "vmath.length({this})" + + + + + @CSharpLua.Template = "vmath.length_sqr({this})" + + + + + @CSharpLua.Template = "vmath.mul_per_elem({this},{0})" + + + + + @CSharpLua.Template = "vmath.normalize({this})" + + + + + + + + + + + + + @CSharpLua.Template = msg.post({0},{1}) + + + + + @CSharpLua.Template = msg.post({0},{1}) + + + + + @CSharpLua.Template = msg.post({0},{1}) + + + + + @CSharpLua.Template = msg.post({0},{1},{2}) + + + + + @CSharpLua.Template = msg.post({0},{1},{2}) + + + + + @CSharpLua.Template = msg.post({0},{1},{2}) + + + + + Model API documentation + + + + + + + + + + Cancels all animation on a model component. + + @CSharpLua.Template = "model.cancel({0})" + + + + + Cancels all animation on a model component. + + @CSharpLua.Template = "model.cancel({0})" + + + + + Cancels all animation on a model component. + + @CSharpLua.Template = "model.cancel({0})" + + + + + Gets the id of the game object that corresponds to a model skeleton bone. + The returned game object can be used for parenting and transform queries. + This function has complexity O(n), where n is the number of bones in the model skeleton. + Game objects corresponding to a model skeleton bone can not be individually deleted. + + @CSharpLua.Template = "model.get_go({0}, {1})" + + + + + Gets the id of the game object that corresponds to a model skeleton bone. + The returned game object can be used for parenting and transform queries. + This function has complexity O(n), where n is the number of bones in the model skeleton. + Game objects corresponding to a model skeleton bone can not be individually deleted. + + @CSharpLua.Template = "model.get_go({0}, {1})" + + + + + Gets the id of the game object that corresponds to a model skeleton bone. + The returned game object can be used for parenting and transform queries. + This function has complexity O(n), where n is the number of bones in the model skeleton. + Game objects corresponding to a model skeleton bone can not be individually deleted. + + @CSharpLua.Template = "model.get_go({0}, {1})" + + + + + Gets the id of the game object that corresponds to a model skeleton bone. + The returned game object can be used for parenting and transform queries. + This function has complexity O(n), where n is the number of bones in the model skeleton. + Game objects corresponding to a model skeleton bone can not be individually deleted. + + @CSharpLua.Template = "model.get_go({0}, {1})" + + + + + Gets the id of the game object that corresponds to a model skeleton bone. + The returned game object can be used for parenting and transform queries. + This function has complexity O(n), where n is the number of bones in the model skeleton. + Game objects corresponding to a model skeleton bone can not be individually deleted. + + @CSharpLua.Template = "model.get_go({0}, {1})" + + + + + Gets the id of the game object that corresponds to a model skeleton bone. + The returned game object can be used for parenting and transform queries. + This function has complexity O(n), where n is the number of bones in the model skeleton. + Game objects corresponding to a model skeleton bone can not be individually deleted. + + @CSharpLua.Template = "model.get_go({0}, {1})" + + + + + Messaging API documentation + + + + + + This is equivalent to msg.url(nil) or msg.url("#"), which creates an url to the current + script component. + + @CSharpLua.Template = "msg.url()" + + + + + The format of the string must be [socket:][path][#fragment], which is similar to a HTTP URL. + When addressing instances: +
    +
  • socket is the name of a valid world (a collection)
  • +
  • path is the id of the instance, which can either be relative the instance of the calling script or global
  • +
  • fragment would be the id of the desired component
  • +
+ In addition, the following shorthands are available: +
    +
  • "." the current game object
  • +
  • "#" the current component
  • +
+ + @CSharpLua.Template = "msg.url({0})" +
+
+ + + creates a new URL from separate arguments + + @CSharpLua.Template = "msg.url({0}, {1})" + + + + + creates a new URL from separate arguments + + @CSharpLua.Template = "msg.url({0}, {1}, {2})" + + + + + creates a new URL from separate arguments + + @CSharpLua.Template = "msg.url({0}, {1}, {2})" + + + + + creates a new URL from separate arguments + + @CSharpLua.Template = "msg.url({0}, {1})" + + + + + creates a new URL from separate arguments + + @CSharpLua.Template = "msg.url({0}, {1}, {2})" + + + + + creates a new URL from separate arguments + + @CSharpLua.Template = "msg.url({0}, {1}, {2})" + + + + + creates a new URL from separate arguments + + @CSharpLua.Template = "msg.url({0}, {1})" + + + + + creates a new URL from separate arguments + + @CSharpLua.Template = "msg.url({0}, {1}, {2})" + + + + + creates a new URL from separate arguments + + @CSharpLua.Template = "msg.url({0}, {1}, {2})" + + + + + creates a new URL from separate arguments + + @CSharpLua.Template = "msg.url({0}, {1})" + + + + + creates a new URL from separate arguments + + @CSharpLua.Template = "msg.url({0}, {1}, {2})" + + + + + creates a new URL from separate arguments + + @CSharpLua.Template = "msg.url({0}, {1}, {2})" + + + + + Post a message to a receiving URL. The most common case is to send messages + to a component. If the component part of the receiver is omitted, the message + is broadcast to all components in the game object. + The following receiver shorthands are available: +
    +
  • "." the current game object
  • +
  • "#" the current component
  • +
+ There is a 2 kilobyte limit to the message parameter table size. + + @CSharpLua.Template = "msg.post({0}, {1})" +
+
+ + + Post a message to a receiving URL. The most common case is to send messages + to a component. If the component part of the receiver is omitted, the message + is broadcast to all components in the game object. + The following receiver shorthands are available: +
    +
  • "." the current game object
  • +
  • "#" the current component
  • +
+ There is a 2 kilobyte limit to the message parameter table size. + + @CSharpLua.Template = "msg.post({0}, {1}, {2})" +
+
+ + + Post a message to a receiving URL. The most common case is to send messages + to a component. If the component part of the receiver is omitted, the message + is broadcast to all components in the game object. + The following receiver shorthands are available: +
    +
  • "." the current game object
  • +
  • "#" the current component
  • +
+ There is a 2 kilobyte limit to the message parameter table size. + + @CSharpLua.Template = "msg.post({0}, {1})" +
+
+ + + Post a message to a receiving URL. The most common case is to send messages + to a component. If the component part of the receiver is omitted, the message + is broadcast to all components in the game object. + The following receiver shorthands are available: +
    +
  • "." the current game object
  • +
  • "#" the current component
  • +
+ There is a 2 kilobyte limit to the message parameter table size. + + @CSharpLua.Template = "msg.post({0}, {1}, {2})" +
+
+ + + Post a message to a receiving URL. The most common case is to send messages + to a component. If the component part of the receiver is omitted, the message + is broadcast to all components in the game object. + The following receiver shorthands are available: +
    +
  • "." the current game object
  • +
  • "#" the current component
  • +
+ There is a 2 kilobyte limit to the message parameter table size. + + @CSharpLua.Template = "msg.post({0}, {1})" +
+
+ + + Post a message to a receiving URL. The most common case is to send messages + to a component. If the component part of the receiver is omitted, the message + is broadcast to all components in the game object. + The following receiver shorthands are available: +
    +
  • "." the current game object
  • +
  • "#" the current component
  • +
+ There is a 2 kilobyte limit to the message parameter table size. + + @CSharpLua.Template = "msg.post({0}, {1}, {2})" +
+
+ + + Post a message to a receiving URL. The most common case is to send messages + to a component. If the component part of the receiver is omitted, the message + is broadcast to all components in the game object. + The following receiver shorthands are available: +
    +
  • "." the current game object
  • +
  • "#" the current component
  • +
+ There is a 2 kilobyte limit to the message parameter table size. + + @CSharpLua.Template = "msg.post({0}, {1})" +
+
+ + + Post a message to a receiving URL. The most common case is to send messages + to a component. If the component part of the receiver is omitted, the message + is broadcast to all components in the game object. + The following receiver shorthands are available: +
    +
  • "." the current game object
  • +
  • "#" the current component
  • +
+ There is a 2 kilobyte limit to the message parameter table size. + + @CSharpLua.Template = "msg.post({0}, {1}, {2})" +
+
+ + + Post a message to a receiving URL. The most common case is to send messages + to a component. If the component part of the receiver is omitted, the message + is broadcast to all components in the game object. + The following receiver shorthands are available: +
    +
  • "." the current game object
  • +
  • "#" the current component
  • +
+ There is a 2 kilobyte limit to the message parameter table size. + + @CSharpLua.Template = "msg.post({0}, {1})" +
+
+ + + Post a message to a receiving URL. The most common case is to send messages + to a component. If the component part of the receiver is omitted, the message + is broadcast to all components in the game object. + The following receiver shorthands are available: +
    +
  • "." the current game object
  • +
  • "#" the current component
  • +
+ There is a 2 kilobyte limit to the message parameter table size. + + @CSharpLua.Template = "msg.post({0}, {1}, {2})" +
+
+ + + Post a message to a receiving URL. The most common case is to send messages + to a component. If the component part of the receiver is omitted, the message + is broadcast to all components in the game object. + The following receiver shorthands are available: +
    +
  • "." the current game object
  • +
  • "#" the current component
  • +
+ There is a 2 kilobyte limit to the message parameter table size. + + @CSharpLua.Template = "msg.post({0}, {1})" +
+
+ + + Post a message to a receiving URL. The most common case is to send messages + to a component. If the component part of the receiver is omitted, the message + is broadcast to all components in the game object. + The following receiver shorthands are available: +
    +
  • "." the current game object
  • +
  • "#" the current component
  • +
+ There is a 2 kilobyte limit to the message parameter table size. + + @CSharpLua.Template = "msg.post({0}, {1}, {2})" +
+
+ + + @CSharpLua.Template = "os.clock()" + + + + + @CSharpLua.Template = "os.date({0},{1})" + + + + + @CSharpLua.Template = "os.date({0})" + + + + + @CSharpLua.Template = "os.difftime({0},{1})" + + + + + @CSharpLua.Template = "os.execute({0})" + + + + + @CSharpLua.Template = "(os.execute() ~= 0)" + + + + + Safely shuts the game down. Use exit() if an immediate force exit is needed + + + + + @CSharpLua.Template = "os.exit()" + + + + + @CSharpLua.Template = "os.exit({0})" + + + + + @CSharpLua.Template = "os.getenv({0})" + + + + + @CSharpLua.Template = "os.remove({0})" + + + + + @CSharpLua.Template = "os.rename({0},{1})" + + + + + @CSharpLua.Template = "os.setlocale(nil)" + + + + + @CSharpLua.Template = "os.setlocale(nil)" + + + + + @CSharpLua.Template = "os.setlocale({0})" + + + + + @CSharpLua.Template = "os.setlocale({0},{1})" + + + + + @CSharpLua.Template = "os.time()" + + + + + @CSharpLua.Template = "os.time({0})" + + + + + @CSharpLua.Template = "os.time()" + + + + + Particle effects API documentation + + + + + + Starts playing a particle FX component. + Particle FX started this way need to be manually stopped through particlefx.stop(). + Which particle FX to play is identified by the URL. + A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. + + @CSharpLua.Template = "particlefx.play({0})" + + + + + Starts playing a particle FX component. + Particle FX started this way need to be manually stopped through particlefx.stop(). + Which particle FX to play is identified by the URL. + A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. + + @CSharpLua.Template = "particlefx.play({0}, {1})" + + + + + Starts playing a particle FX component. + Particle FX started this way need to be manually stopped through particlefx.stop(). + Which particle FX to play is identified by the URL. + A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. + + @CSharpLua.Template = "particlefx.play({0})" + + + + + Starts playing a particle FX component. + Particle FX started this way need to be manually stopped through particlefx.stop(). + Which particle FX to play is identified by the URL. + A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. + + @CSharpLua.Template = "particlefx.play({0}, {1})" + + + + + Starts playing a particle FX component. + Particle FX started this way need to be manually stopped through particlefx.stop(). + Which particle FX to play is identified by the URL. + A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. + + @CSharpLua.Template = "particlefx.play({0})" + + + + + Starts playing a particle FX component. + Particle FX started this way need to be manually stopped through particlefx.stop(). + Which particle FX to play is identified by the URL. + A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. + + @CSharpLua.Template = "particlefx.play({0}, {1})" + + + + + Stops a particle FX component from playing. + Stopping a particle FX does not remove already spawned particles. + Which particle FX to stop is identified by the URL. + + @CSharpLua.Template = "particlefx.stop({0}, {1})" + + + + + Stops a particle FX component from playing. + Stopping a particle FX does not remove already spawned particles. + Which particle FX to stop is identified by the URL. + + @CSharpLua.Template = "particlefx.stop({0}, {1})" + + + + + Stops a particle FX component from playing. + Stopping a particle FX does not remove already spawned particles. + Which particle FX to stop is identified by the URL. + + @CSharpLua.Template = "particlefx.stop({0}, {1})" + + + + + Sets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Setting a constant through this function will override the value set for that constant in the material. + The value will be overridden until particlefx.reset_constant is called. + Which particle FX to set a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + + + + + Sets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Setting a constant through this function will override the value set for that constant in the material. + The value will be overridden until particlefx.reset_constant is called. + Which particle FX to set a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + + + + + Sets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Setting a constant through this function will override the value set for that constant in the material. + The value will be overridden until particlefx.reset_constant is called. + Which particle FX to set a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + + + + + Sets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Setting a constant through this function will override the value set for that constant in the material. + The value will be overridden until particlefx.reset_constant is called. + Which particle FX to set a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + + + + + Sets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Setting a constant through this function will override the value set for that constant in the material. + The value will be overridden until particlefx.reset_constant is called. + Which particle FX to set a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + + + + + Sets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Setting a constant through this function will override the value set for that constant in the material. + The value will be overridden until particlefx.reset_constant is called. + Which particle FX to set a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + + + + + Sets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Setting a constant through this function will override the value set for that constant in the material. + The value will be overridden until particlefx.reset_constant is called. + Which particle FX to set a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + + + + + Sets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Setting a constant through this function will override the value set for that constant in the material. + The value will be overridden until particlefx.reset_constant is called. + Which particle FX to set a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + + + + + Sets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Setting a constant through this function will override the value set for that constant in the material. + The value will be overridden until particlefx.reset_constant is called. + Which particle FX to set a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + + + + + Sets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Setting a constant through this function will override the value set for that constant in the material. + The value will be overridden until particlefx.reset_constant is called. + Which particle FX to set a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + + + + + Sets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Setting a constant through this function will override the value set for that constant in the material. + The value will be overridden until particlefx.reset_constant is called. + Which particle FX to set a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + + + + + Sets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Setting a constant through this function will override the value set for that constant in the material. + The value will be overridden until particlefx.reset_constant is called. + Which particle FX to set a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + + + + + Resets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Resetting a constant through this function implies that the value defined in the material will be used. + Which particle FX to reset a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + + + + + Resets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Resetting a constant through this function implies that the value defined in the material will be used. + Which particle FX to reset a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + + + + + Resets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Resetting a constant through this function implies that the value defined in the material will be used. + Which particle FX to reset a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + + + + + Resets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Resetting a constant through this function implies that the value defined in the material will be used. + Which particle FX to reset a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + + + + + Resets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Resetting a constant through this function implies that the value defined in the material will be used. + Which particle FX to reset a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + + + + + Resets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Resetting a constant through this function implies that the value defined in the material will be used. + Which particle FX to reset a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + + + + + Resets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Resetting a constant through this function implies that the value defined in the material will be used. + Which particle FX to reset a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + + + + + Resets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Resetting a constant through this function implies that the value defined in the material will be used. + Which particle FX to reset a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + + + + + Resets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Resetting a constant through this function implies that the value defined in the material will be used. + Which particle FX to reset a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + + + + + Resets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Resetting a constant through this function implies that the value defined in the material will be used. + Which particle FX to reset a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + + + + + Resets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Resetting a constant through this function implies that the value defined in the material will be used. + Which particle FX to reset a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + + + + + Resets a shader constant for a particle FX component emitter. + The constant must be defined in the material assigned to the emitter. + Resetting a constant through this function implies that the value defined in the material will be used. + Which particle FX to reset a constant for is identified by the URL. + + @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + + + + + Collision object physics API documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ray casts are used to test for intersections against collision objects in the physics world. + Collision objects of types kinematic, dynamic and static are tested against. Trigger objects + do not intersect with ray casts. + Which collision objects to hit is filtered by their collision groups and can be configured + through groups. + The actual ray cast will be performed during the physics-update. +
    +
  • If an object is hit, the result will be reported via a ray_cast_response message.
  • +
  • If there is no object hit, the result will be reported via a ray_cast_missed message.
  • +
+ + @CSharpLua.Template = "physics.raycast_async({0}, {1}, {2})" +
+
+ + + Ray casts are used to test for intersections against collision objects in the physics world. + Collision objects of types kinematic, dynamic and static are tested against. Trigger objects + do not intersect with ray casts. + Which collision objects to hit is filtered by their collision groups and can be configured + through groups. + The actual ray cast will be performed during the physics-update. +
    +
  • If an object is hit, the result will be reported via a ray_cast_response message.
  • +
  • If there is no object hit, the result will be reported via a ray_cast_missed message.
  • +
+ + @CSharpLua.Template = "physics.raycast_async({0}, {1}, {2}, {3})" +
+
+ + + Ray casts are used to test for intersections against collision objects in the physics world. + Collision objects of types kinematic, dynamic and static are tested against. Trigger objects + do not intersect with ray casts. + Which collision objects to hit is filtered by their collision groups and can be configured + through groups. + + @CSharpLua.Template = "physics.raycast({0}, {1}, {2}, {3})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Create a physics joint between two collision object components. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + + + + + Destroy an already physics joint. The joint has to be created before a + destroy can be issued. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.destroy_joint({0}, {1})" + + + + + Destroy an already physics joint. The joint has to be created before a + destroy can be issued. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.destroy_joint({0}, {1})" + + + + + Destroy an already physics joint. The joint has to be created before a + destroy can be issued. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.destroy_joint({0}, {1})" + + + + + Destroy an already physics joint. The joint has to be created before a + destroy can be issued. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.destroy_joint({0}, {1})" + + + + + Destroy an already physics joint. The joint has to be created before a + destroy can be issued. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.destroy_joint({0}, {1})" + + + + + Destroy an already physics joint. The joint has to be created before a + destroy can be issued. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.destroy_joint({0}, {1})" + + + + + Get a table for properties for a connected joint. The joint has to be created before + properties can be retrieved. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" + + + + + Get a table for properties for a connected joint. The joint has to be created before + properties can be retrieved. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" + + + + + Get a table for properties for a connected joint. The joint has to be created before + properties can be retrieved. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" + + + + + Get a table for properties for a connected joint. The joint has to be created before + properties can be retrieved. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" + + + + + Get a table for properties for a connected joint. The joint has to be created before + properties can be retrieved. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" + + + + + Get a table for properties for a connected joint. The joint has to be created before + properties can be retrieved. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" + + + + + Updates the properties for an already connected joint. The joint has to be created before + properties can be changed. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" + + + + + Updates the properties for an already connected joint. The joint has to be created before + properties can be changed. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" + + + + + Updates the properties for an already connected joint. The joint has to be created before + properties can be changed. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" + + + + + Updates the properties for an already connected joint. The joint has to be created before + properties can be changed. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" + + + + + Updates the properties for an already connected joint. The joint has to be created before + properties can be changed. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" + + + + + Updates the properties for an already connected joint. The joint has to be created before + properties can be changed. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" + + + + + Get the reaction force for a joint. The joint has to be created before + the reaction force can be calculated. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" + + + + + Get the reaction force for a joint. The joint has to be created before + the reaction force can be calculated. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" + + + + + Get the reaction force for a joint. The joint has to be created before + the reaction force can be calculated. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" + + + + + Get the reaction force for a joint. The joint has to be created before + the reaction force can be calculated. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" + + + + + Get the reaction force for a joint. The joint has to be created before + the reaction force can be calculated. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" + + + + + Get the reaction force for a joint. The joint has to be created before + the reaction force can be calculated. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" + + + + + Get the reaction torque for a joint. The joint has to be created before + the reaction torque can be calculated. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" + + + + + Get the reaction torque for a joint. The joint has to be created before + the reaction torque can be calculated. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" + + + + + Get the reaction torque for a joint. The joint has to be created before + the reaction torque can be calculated. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" + + + + + Get the reaction torque for a joint. The joint has to be created before + the reaction torque can be calculated. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" + + + + + Get the reaction torque for a joint. The joint has to be created before + the reaction torque can be calculated. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" + + + + + Get the reaction torque for a joint. The joint has to be created before + the reaction torque can be calculated. + Note: Currently only supported in 2D physics. + + @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" + + + + + Set the gravity in runtime. The gravity change is not global, it will only affect + the collection that the function is called from. + Note: For 2D physics the z component of the gravity vector will be ignored. + + @CSharpLua.Template = "physics.set_gravity({0})" + + + + + Get the gravity in runtime. The gravity returned is not global, it will return + the gravity for the collection that the function is called from. + Note: For 2D physics the z component will always be zero. + + @CSharpLua.Template = "physics.get_gravity()" + + + + + Flips the collision shapes horizontally for a collision object + + @CSharpLua.Template = "physics.set_hflip({0}, {1})" + + + + + Flips the collision shapes horizontally for a collision object + + @CSharpLua.Template = "physics.set_hflip({0}, {1})" + + + + + Flips the collision shapes horizontally for a collision object + + @CSharpLua.Template = "physics.set_hflip({0}, {1})" + + + + + Flips the collision shapes vertically for a collision object + + @CSharpLua.Template = "physics.set_vflip({0}, {1})" + + + + + Flips the collision shapes vertically for a collision object + + @CSharpLua.Template = "physics.set_vflip({0}, {1})" + + + + + Flips the collision shapes vertically for a collision object + + @CSharpLua.Template = "physics.set_vflip({0}, {1})" + + + + + Collision objects tend to fall asleep when inactive for a small period of time for + efficiency reasons. This function wakes them up. + + @CSharpLua.Template = "physics.wakeup({0})" + + + + + Collision objects tend to fall asleep when inactive for a small period of time for + efficiency reasons. This function wakes them up. + + @CSharpLua.Template = "physics.wakeup({0})" + + + + + Collision objects tend to fall asleep when inactive for a small period of time for + efficiency reasons. This function wakes them up. + + @CSharpLua.Template = "physics.wakeup({0})" + + + + + Updates the group property of a collision object to the specified + string value. The group name should exist i.e. have been used in + a collision object in the editor. + + @CSharpLua.Template = "physics.set_group({0}, {1})" + + + + + Updates the group property of a collision object to the specified + string value. The group name should exist i.e. have been used in + a collision object in the editor. + + @CSharpLua.Template = "physics.set_group({0}, {1})" + + + + + Updates the group property of a collision object to the specified + string value. The group name should exist i.e. have been used in + a collision object in the editor. + + @CSharpLua.Template = "physics.set_group({0}, {1})" + + + + + Returns the group name of a collision object as a hash. + + @CSharpLua.Template = "physics.get_group({0})" + + + + + Returns the group name of a collision object as a hash. + + @CSharpLua.Template = "physics.get_group({0})" + + + + + Returns the group name of a collision object as a hash. + + @CSharpLua.Template = "physics.get_group({0})" + + + + + Sets or clears the masking of a group (maskbit) in a collision object. + + @CSharpLua.Template = "physics.set_maskbit({0}, {1}, {2})" + + + + + Sets or clears the masking of a group (maskbit) in a collision object. + + @CSharpLua.Template = "physics.set_maskbit({0}, {1}, {2})" + + + + + Sets or clears the masking of a group (maskbit) in a collision object. + + @CSharpLua.Template = "physics.set_maskbit({0}, {1}, {2})" + + + + + Returns true if the specified group is set in the mask of a collision + object, false otherwise. + + @CSharpLua.Template = "physics.get_maskbit({0}, {1})" + + + + + Returns true if the specified group is set in the mask of a collision + object, false otherwise. + + @CSharpLua.Template = "physics.get_maskbit({0}, {1})" + + + + + Returns true if the specified group is set in the mask of a collision + object, false otherwise. + + @CSharpLua.Template = "physics.get_maskbit({0}, {1})" + + + + + Profiler API documentation + + + + + + Get the amount of memory used (resident/working set) by the application in bytes, as reported by the OS. + This function is not available on HTML5. + The values are gathered from internal OS functions which correspond to the following; + + + + + + + + + + + + + + + + + + + + + +
OSValue
iOS
MacOS

Androd
Linux
Resident memory
WindowsWorking set
HTML5 Not available
+ + @CSharpLua.Template = "profiler.get_memory_usage()" +
+
+ + + Get the percent of CPU usage by the application, as reported by the OS. + This function is not available on HTML5. + For some platforms ( Android, Linux and Windows), this information is only available + by default in the debug version of the engine. It can be enabled in release version as well + by checking track_cpu under profiler in the game.project file. + (This means that the engine will sample the CPU usage in intervalls during execution even in release mode.) + + @CSharpLua.Template = "profiler.get_cpu_usage()" + + + + + Creates and shows or hides and destroys the on-sceen profiler ui + The profiler is a real-time tool that shows the numbers of milliseconds spent + in each scope per frame as well as counters. The profiler is very useful for + tracking down performance and resource problems. + + @CSharpLua.Template = "profiler.enable_ui({0})" + + + + + Set the on-screen profile mode - run, pause, record or show peak frame + + @CSharpLua.Template = "profiler.set_ui_mode({0})" + + + + + Set the on-screen profile view mode - minimized or expanded + + @CSharpLua.Template = "profiler.set_ui_view_mode({0})" + + + + + Shows or hides the time the engine waits for vsync in the on-screen profiler + Each frame the engine waits for vsync and depending on your vsync settings and how much time + your game logic takes this time can dwarf the time in the game logic making it hard to + see details in the on-screen profiler graph and lists. + Also, by hiding this the FPS times in the header show the time spent each time excuding the + time spent waiting for vsync. This shows you how long time your game is spending actively + working each frame. + This setting also effects the display of recorded frames but does not affect the actual + recorded frames so it is possible to toggle this on and off when viewing recorded frames. + By default the vsync wait times is displayed in the profiler. + + @CSharpLua.Template = "profiler.set_ui_vsync_wait_visible({0})" + + + + + Get the number of recorded frames in the on-screen profiler ui recording buffer + + @CSharpLua.Template = "profiler.recorded_frame_count()" + + + + + Pauses and displays a frame from the recording buffer in the on-screen profiler ui + The frame to show can either be an absolute frame or a relative frame to the current frame. + + @CSharpLua.Template = "profiler.view_recorded_frame({0})" + + + + + Send a text to the profiler + + @CSharpLua.Template = "profiler.log_text({0})" + + + + + Starts a profile scope. + + @CSharpLua.Template = "profiler.scope_begin({0})" + + + + + End the current profile scope. + + @CSharpLua.Template = "profiler.scope_end()" + + + + + Push notifications API documentation + + + + + + Rendering API documentation + + + + + + + + + + + + + + + + + + + + + + + + + + Constant buffers are used to set shader program variables and are optionally passed to the render.draw() function. + The buffer's constant elements can be indexed like an ordinary Lua table, but you can't iterate over them with pairs() or ipairs(). + + @CSharpLua.Template = "render.constant_buffer()" + + + + + Enables a particular render state. The state will be enabled until disabled. + + @CSharpLua.Template = "render.enable_state({0})" + + + + + Disables a render state. + + @CSharpLua.Template = "render.disable_state({0})" + + + + + Set the render viewport to the specified rectangle. + + @CSharpLua.Template = "render.set_viewport({0}, {1}, {2}, {3})" + + + + + Disables a texture unit for a render target that has previourly been enabled. + + @CSharpLua.Template = "render.disable_texture({0})" + + + + + Clear buffers in the currently enabled render target with specified value. If the render target has been created with multiple + color attachments, all buffers will be cleared with the same value. + + @CSharpLua.Template = "render.clear({0})" + + + + + Draws all objects that match a specified predicate. An optional constant buffer can be + provided to override the default constants. If no constants buffer is provided, a default + system constants buffer is used containing constants as defined in materials and set through + go.set (or particlefx.set_constant) on visual components. + + @CSharpLua.Template = "render.draw({0})" + + + + + Draws all objects that match a specified predicate. An optional constant buffer can be + provided to override the default constants. If no constants buffer is provided, a default + system constants buffer is used containing constants as defined in materials and set through + go.set (or particlefx.set_constant) on visual components. + + @CSharpLua.Template = "render.draw({0}, {1})" + + + + + Draws all 3d debug graphics such as lines drawn with "draw_line" messages and physics visualization. + + @CSharpLua.Template = "render.draw_debug3d()" + + + + + Draws all 3d debug graphics such as lines drawn with "draw_line" messages and physics visualization. + + @CSharpLua.Template = "render.draw_debug3d({0})" + + + + + Sets the view matrix to use when rendering. + + @CSharpLua.Template = "render.set_view({0})" + + + + + Sets the projection matrix to use when rendering. + + @CSharpLua.Template = "render.set_projection({0})" + + + + + Specifies the arithmetic used when computing pixel values that are written to the frame + buffer. In RGBA mode, pixels can be drawn using a function that blends the source RGBA + pixel values with the destination pixel values already in the frame buffer. + Blending is initially disabled. + source_factor specifies which method is used to scale the source color components. + destination_factor specifies which method is used to scale the destination color + components. + Source color components are referred to as (Rs,Gs,Bs,As). + Destination color components are referred to as (Rd,Gd,Bd,Ad). + The color specified by setting the blendcolor is referred to as (Rc,Gc,Bc,Ac). + The source scale factor is referred to as (sR,sG,sB,sA). + The destination scale factor is referred to as (dR,dG,dB,dA). + The color values have integer values between 0 and (kR,kG,kB,kA), where kc = 2mc - 1 and mc is the number of bitplanes for that color. I.e for 8 bit color depth, color values are between 0 and 255. + Available factor constants and corresponding scale factors: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Factor constantScale factor (fR,fG,fB,fA)
render.BLEND_ZERO(0,0,0,0)
render.BLEND_ONE(1,1,1,1)
render.BLEND_SRC_COLOR(Rs/kR,Gs/kG,Bs/kB,As/kA)
render.BLEND_ONE_MINUS_SRC_COLOR(1,1,1,1) - (Rs/kR,Gs/kG,Bs/kB,As/kA)
render.BLEND_DST_COLOR(Rd/kR,Gd/kG,Bd/kB,Ad/kA)
render.BLEND_ONE_MINUS_DST_COLOR(1,1,1,1) - (Rd/kR,Gd/kG,Bd/kB,Ad/kA)
render.BLEND_SRC_ALPHA(As/kA,As/kA,As/kA,As/kA)
render.BLEND_ONE_MINUS_SRC_ALPHA(1,1,1,1) - (As/kA,As/kA,As/kA,As/kA)
render.BLEND_DST_ALPHA(Ad/kA,Ad/kA,Ad/kA,Ad/kA)
render.BLEND_ONE_MINUS_DST_ALPHA(1,1,1,1) - (Ad/kA,Ad/kA,Ad/kA,Ad/kA)
render.BLEND_CONSTANT_COLOR(Rc,Gc,Bc,Ac)
render.BLEND_ONE_MINUS_CONSTANT_COLOR(1,1,1,1) - (Rc,Gc,Bc,Ac)
render.BLEND_CONSTANT_ALPHA(Ac,Ac,Ac,Ac)
render.BLEND_ONE_MINUS_CONSTANT_ALPHA(1,1,1,1) - (Ac,Ac,Ac,Ac)
render.BLEND_SRC_ALPHA_SATURATE(i,i,i,1) where i = min(As, kA - Ad) /kA
+ The blended RGBA values of a pixel comes from the following equations: +
    +
  • Rd = min(kR, Rs * sR + Rd * dR)
  • +
  • Gd = min(kG, Gs * sG + Gd * dG)
  • +
  • Bd = min(kB, Bs * sB + Bd * dB)
  • +
  • Ad = min(kA, As * sA + Ad * dA)
  • +
+ Blend function (render.BLEND_SRC_ALPHA, render.BLEND_ONE_MINUS_SRC_ALPHA) is useful for + drawing with transparency when the drawn objects are sorted from farthest to nearest. + It is also useful for drawing antialiased points and lines in arbitrary order. + + @CSharpLua.Template = "render.set_blend_func({0}, {1})" +
+
+ + + Specifies whether the individual color components in the frame buffer is enabled for writing (true) or disabled (false). For example, if blue is false, nothing is written to the blue component of any pixel in any of the color buffers, regardless of the drawing operation attempted. Note that writing are either enabled or disabled for entire color components, not the individual bits of a component. + The component masks are all initially true. + + @CSharpLua.Template = "render.set_color_mask({0}, {1}, {2}, {3})" + + + + + Specifies whether the depth buffer is enabled for writing. The supplied mask governs + if depth buffer writing is enabled (true) or disabled (false). + The mask is initially true. + + @CSharpLua.Template = "render.set_depth_mask({0})" + + + + + The stencil mask controls the writing of individual bits in the stencil buffer. + The least significant n bits of the parameter mask, where n is the number of + bits in the stencil buffer, specify the mask. + Where a 1 bit appears in the mask, the corresponding + bit in the stencil buffer can be written. Where a 0 bit appears in the mask, + the corresponding bit in the stencil buffer is never written. + The mask is initially all 1's. + + @CSharpLua.Template = "render.set_stencil_mask({0})" + + + + + Specifies the function that should be used to compare each incoming pixel + depth value with the value present in the depth buffer. + The comparison is performed only if depth testing is enabled and specifies + the conditions under which a pixel will be drawn. + Function constants: +
    +
  • render.COMPARE_FUNC_NEVER (never passes)
  • +
  • render.COMPARE_FUNC_LESS (passes if the incoming depth value is less than the stored value)
  • +
  • render.COMPARE_FUNC_LEQUAL (passes if the incoming depth value is less than or equal to the stored value)
  • +
  • render.COMPARE_FUNC_GREATER (passes if the incoming depth value is greater than the stored value)
  • +
  • render.COMPARE_FUNC_GEQUAL (passes if the incoming depth value is greater than or equal to the stored value)
  • +
  • render.COMPARE_FUNC_EQUAL (passes if the incoming depth value is equal to the stored value)
  • +
  • render.COMPARE_FUNC_NOTEQUAL (passes if the incoming depth value is not equal to the stored value)
  • +
  • render.COMPARE_FUNC_ALWAYS (always passes)
  • +
+ The depth function is initially set to render.COMPARE_FUNC_LESS. + + @CSharpLua.Template = "render.set_depth_func({0})" +
+
+ + + Stenciling is similar to depth-buffering as it enables and disables drawing on a + per-pixel basis. First, GL drawing primitives are drawn into the stencil planes. + Second, geometry and images are rendered but using the stencil planes to mask out + where to draw. + The stencil test discards a pixel based on the outcome of a comparison between the + reference value ref and the corresponding value in the stencil buffer. + func specifies the comparison function. See the table below for values. + The initial value is render.COMPARE_FUNC_ALWAYS. + ref specifies the reference value for the stencil test. The value is clamped to + the range [0, 2n-1], where n is the number of bitplanes in the stencil buffer. + The initial value is 0. + mask is ANDed with both the reference value and the stored stencil value when the test + is done. The initial value is all 1's. + Function constant: +
    +
  • render.COMPARE_FUNC_NEVER (never passes)
  • +
  • render.COMPARE_FUNC_LESS (passes if (ref & mask) < (stencil & mask))
  • +
  • render.COMPARE_FUNC_LEQUAL (passes if (ref & mask) <= (stencil & mask))
  • +
  • render.COMPARE_FUNC_GREATER (passes if (ref & mask) > (stencil & mask))
  • +
  • render.COMPARE_FUNC_GEQUAL (passes if (ref & mask) >= (stencil & mask))
  • +
  • render.COMPARE_FUNC_EQUAL (passes if (ref & mask) = (stencil & mask))
  • +
  • render.COMPARE_FUNC_NOTEQUAL (passes if (ref & mask) != (stencil & mask))
  • +
  • render.COMPARE_FUNC_ALWAYS (always passes)
  • +
+ + @CSharpLua.Template = "render.set_stencil_func({0}, {1}, {2})" +
+
+ + + The stencil test discards a pixel based on the outcome of a comparison between the + reference value ref and the corresponding value in the stencil buffer. + To control the test, call render.set_stencil_func. + This function takes three arguments that control what happens to the stored stencil + value while stenciling is enabled. If the stencil test fails, no change is made to the + pixel's color or depth buffers, and sfail specifies what happens to the stencil buffer + contents. + Operator constants: +
    +
  • render.STENCIL_OP_KEEP (keeps the current value)
  • +
  • render.STENCIL_OP_ZERO (sets the stencil buffer value to 0)
  • +
  • render.STENCIL_OP_REPLACE (sets the stencil buffer value to ref, as specified by render.set_stencil_func)
  • +
  • render.STENCIL_OP_INCR (increments the stencil buffer value and clamp to the maximum representable unsigned value)
  • +
  • render.STENCIL_OP_INCR_WRAP (increments the stencil buffer value and wrap to zero when incrementing the maximum representable unsigned value)
  • +
  • render.STENCIL_OP_DECR (decrements the current stencil buffer value and clamp to 0)
  • +
  • render.STENCIL_OP_DECR_WRAP (decrements the current stencil buffer value and wrap to the maximum representable unsigned value when decrementing zero)
  • +
  • render.STENCIL_OP_INVERT (bitwise inverts the current stencil buffer value)
  • +
+ dppass and dpfail specify the stencil buffer actions depending on whether subsequent + depth buffer tests succeed (dppass) or fail (dpfail). + The initial value for all operators is render.STENCIL_OP_KEEP. + + @CSharpLua.Template = "render.set_stencil_op({0}, {1}, {2})" +
+
+ + + Specifies whether front- or back-facing polygons can be culled + when polygon culling is enabled. Polygon culling is initially disabled. + If mode is render.FACE_FRONT_AND_BACK, no polygons are drawn, but other + primitives such as points and lines are drawn. The initial value for + face_type is render.FACE_BACK. + + @CSharpLua.Template = "render.set_cull_face({0})" + + + + + + Returns the logical window width that is set in the "game.project" settings. + Note that the actual window pixel size can change, either by device constraints + or user input. + + @CSharpLua.Template = "render.get_width()" + + + + + Returns the logical window height that is set in the "game.project" settings. + Note that the actual window pixel size can change, either by device constraints + or user input. + + @CSharpLua.Template = "render.get_height()" + + + + + Returns the actual physical window width. + Note that this value might differ from the logical width that is set in the + "game.project" settings. + + @CSharpLua.Template = "render.get_window_width()" + + + + + Returns the actual physical window height. + Note that this value might differ from the logical height that is set in the + "game.project" settings. + + @CSharpLua.Template = "render.get_window_height()" + + + + + This function returns a new render predicate for objects with materials matching + the provided material tags. The provided tags are combined into a bit mask + for the predicate. If multiple tags are provided, the predicate matches materials + with all tags ANDed together. + The current limit to the number of tags that can be defined is 64. + + @CSharpLua.Template = "render.predicate({0})" + + + + + This function returns a new render predicate for objects with materials matching + the provided material tags. The provided tags are combined into a bit mask + for the predicate. If multiple tags are provided, the predicate matches materials + with all tags ANDed together. + The current limit to the number of tags that can be defined is 64. + + @CSharpLua.Template = "render.predicate({0})" + + + + + If another material was already enabled, it will be automatically disabled + and the specified material is used instead. + The name of the material must be specified in the ".render" resource set + in the "game.project" setting. + + @CSharpLua.Template = "render.enable_material({0})" + + + + + If another material was already enabled, it will be automatically disabled + and the specified material is used instead. + The name of the material must be specified in the ".render" resource set + in the "game.project" setting. + + @CSharpLua.Template = "render.enable_material({0})" + + + + + If a material is currently enabled, disable it. + The name of the material must be specified in the ".render" resource set + in the "game.project" setting. + + @CSharpLua.Template = "render.disable_material()" + + + + + Resource API documentation + + + + + + Constructor-like function with two purposes: +
    +
  • Load the specified resource as part of loading the script
  • +
  • Return a hash to the run-time version of the resource
  • +
+ This function can only be called within go.property function calls. + + @CSharpLua.Template = "resource.material()" +
+
+ + + Constructor-like function with two purposes: +
    +
  • Load the specified resource as part of loading the script
  • +
  • Return a hash to the run-time version of the resource
  • +
+ This function can only be called within go.property function calls. + + @CSharpLua.Template = "resource.material({0})" +
+
+ + + Constructor-like function with two purposes: +
    +
  • Load the specified resource as part of loading the script
  • +
  • Return a hash to the run-time version of the resource
  • +
+ This function can only be called within go.property function calls. + + @CSharpLua.Template = "resource.font()" +
+
+ + + Constructor-like function with two purposes: +
    +
  • Load the specified resource as part of loading the script
  • +
  • Return a hash to the run-time version of the resource
  • +
+ This function can only be called within go.property function calls. + + @CSharpLua.Template = "resource.font({0})" +
+
+ + + Constructor-like function with two purposes: +
    +
  • Load the specified resource as part of loading the script
  • +
  • Return a hash to the run-time version of the resource
  • +
+ This function can only be called within go.property function calls. + + @CSharpLua.Template = "resource.texture()" +
+
+ + + Constructor-like function with two purposes: +
    +
  • Load the specified resource as part of loading the script
  • +
  • Return a hash to the run-time version of the resource
  • +
+ This function can only be called within go.property function calls. + + @CSharpLua.Template = "resource.texture({0})" +
+
+ + + Constructor-like function with two purposes: +
    +
  • Load the specified resource as part of loading the script
  • +
  • Return a hash to the run-time version of the resource
  • +
+ This function can only be called within go.property function calls. + + @CSharpLua.Template = "resource.atlas()" +
+
+ + + Constructor-like function with two purposes: +
    +
  • Load the specified resource as part of loading the script
  • +
  • Return a hash to the run-time version of the resource
  • +
+ This function can only be called within go.property function calls. + + @CSharpLua.Template = "resource.atlas({0})" +
+
+ + + Constructor-like function with two purposes: +
    +
  • Load the specified resource as part of loading the script
  • +
  • Return a hash to the run-time version of the resource
  • +
+ This function can only be called within go.property function calls. + + @CSharpLua.Template = "resource.buffer()" +
+
+ + + Constructor-like function with two purposes: +
    +
  • Load the specified resource as part of loading the script
  • +
  • Return a hash to the run-time version of the resource
  • +
+ This function can only be called within go.property function calls. + + @CSharpLua.Template = "resource.buffer({0})" +
+
+ + + Constructor-like function with two purposes: +
    +
  • Load the specified resource as part of loading the script
  • +
  • Return a hash to the run-time version of the resource
  • +
+ This function can only be called within go.property function calls. + + @CSharpLua.Template = "resource.tile_source()" +
+
+ + + Constructor-like function with two purposes: +
    +
  • Load the specified resource as part of loading the script
  • +
  • Return a hash to the run-time version of the resource
  • +
+ This function can only be called within go.property function calls. + + @CSharpLua.Template = "resource.tile_source({0})" +
+
+ + + Sets the resource data for a specific resource + + @CSharpLua.Template = "resource.set({0}, {1})" + + + + + Sets the resource data for a specific resource + + @CSharpLua.Template = "resource.set({0}, {1})" + + + + + Loads the resource data for a specific resource. + + @CSharpLua.Template = "resource.load({0})" + + + + + Sets the pixel data for a specific texture. + + @CSharpLua.Template = "resource.set_texture({0}, {1}, {2})" + + + + + Sets the pixel data for a specific texture. + + @CSharpLua.Template = "resource.set_texture({0}, {1}, {2})" + + + + + Update internal sound resource (wavc/oggc) with new data + + @CSharpLua.Template = "resource.set_sound({0}, {1})" + + + + + Update internal sound resource (wavc/oggc) with new data + + @CSharpLua.Template = "resource.set_sound({0}, {1})" + + + + + gets the buffer from a resource + + @CSharpLua.Template = "resource.get_buffer({0})" + + + + + gets the buffer from a resource + + @CSharpLua.Template = "resource.get_buffer({0})" + + + + + sets the buffer of a resource + + @CSharpLua.Template = "resource.set_buffer({0}, {1})" + + + + + sets the buffer of a resource + + @CSharpLua.Template = "resource.set_buffer({0}, {1})" + + + + + Gets the text metrics from a font + + @CSharpLua.Template = "resource.get_text_metrics({0}, {1})" + + + + + Gets the text metrics from a font + + @CSharpLua.Template = "resource.get_text_metrics({0}, {1}, {2})" + + + + + Return a reference to the Manifest that is currently loaded. + + @CSharpLua.Template = "resource.get_current_manifest()" + + + + + add a resource to the data archive and runtime index. The resource will be verified + internally before being added to the data archive. + + @CSharpLua.Template = "resource.store_resource({0}, {1}, {2}, {3})" + + + + + Create a new manifest from a buffer. The created manifest is verified + by ensuring that the manifest was signed using the bundled public/private + key-pair during the bundle process and that the manifest supports the current + running engine version. Once the manifest is verified it is stored on device. + The next time the engine starts (or is rebooted) it will look for the stored + manifest before loading resources. Storing a new manifest allows the + developer to update the game, modify existing resources, or add new + resources to the game through LiveUpdate. + + @CSharpLua.Template = "resource.store_manifest({0}, {1})" + + + + + Stores a zip file and uses it for live update content. The contents of the + zip file will be verified against the manifest to ensure file integrity. + It is possible to opt out of the resource verification using an option passed + to this function. + The path is stored in the (internal) live update location. + + @CSharpLua.Template = "resource.store_archive({0}, {1})" + + + + + Stores a zip file and uses it for live update content. The contents of the + zip file will be verified against the manifest to ensure file integrity. + It is possible to opt out of the resource verification using an option passed + to this function. + The path is stored in the (internal) live update location. + + @CSharpLua.Template = "resource.store_archive({0}, {1}, {2})" + + + + + Is any liveupdate data mounted and currently in use? + This can be used to determine if a new manifest or zip file should be downloaded. + + @CSharpLua.Template = "resource.is_using_liveupdate_data()" + + + + + Sound API documentation + + + + + + + + + + + + + + + + + + + + + + Checks if background music is playing, e.g. from iTunes. + On non mobile platforms, + this function always return false. + On Android you can only get a correct reading + of this state if your game is not playing any sounds itself. This is a limitation + in the Android SDK. If your game is playing any sounds, even with a gain of zero, this + function will return false. + The best time to call this function is: +
    +
  • In the init function of your main collection script before any sounds are triggered
  • +
  • In a window listener callback when the window.WINDOW_EVENT_FOCUS_GAINED event is received
  • +
+ Both those times will give you a correct reading of the state even when your application is + swapped out and in while playing sounds and it works equally well on Android and iOS. + + @CSharpLua.Template = "sound.is_music_playing()" +
+
+ + + + + Get peak value from mixer group. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + Also note that the returned value might be an approximation and in particular + the effective window might be larger than specified. + + @CSharpLua.Template = "sound.get_peak({0}, {1})" + + + + + Get peak value from mixer group. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + Also note that the returned value might be an approximation and in particular + the effective window might be larger than specified. + + @CSharpLua.Template = "sound.get_peak({0}, {1})" + + + + + Set mixer group gain + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + + @CSharpLua.Template = "sound.set_group_gain({0}, {1})" + + + + + Set mixer group gain + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + + @CSharpLua.Template = "sound.set_group_gain({0}, {1})" + + + + + Get mixer group gain + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + + @CSharpLua.Template = "sound.get_group_gain({0})" + + + + + Get mixer group gain + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + + @CSharpLua.Template = "sound.get_group_gain({0})" + + + + + Get a table of all mixer group names (hashes). + + @CSharpLua.Template = "sound.get_groups()" + + + + + Get a mixer group name as a string. + This function is to be used for debugging and + development tooling only. The function does a reverse hash lookup, which does not + return a proper string value when the game is built in release mode. + + @CSharpLua.Template = "sound.get_group_name({0})" + + + + + Get a mixer group name as a string. + This function is to be used for debugging and + development tooling only. The function does a reverse hash lookup, which does not + return a proper string value when the game is built in release mode. + + @CSharpLua.Template = "sound.get_group_name({0})" + + + + + Checks if a phone call is active. If there is an active phone call all + other sounds will be muted until the phone call is finished. + On non mobile platforms, + this function always return false. + + @CSharpLua.Template = "sound.is_phone_call_active()" + + + + + Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + + @CSharpLua.Template = "sound.play({0})" + + + + + Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + + @CSharpLua.Template = "sound.play({0}, {1})" + + + + + Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + + @CSharpLua.Template = "sound.play({0}, {1}, {2})" + + + + + Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + + @CSharpLua.Template = "sound.play({0})" + + + + + Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + + @CSharpLua.Template = "sound.play({0}, {1})" + + + + + Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + + @CSharpLua.Template = "sound.play({0}, {1}, {2})" + + + + + Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + + @CSharpLua.Template = "sound.play({0})" + + + + + Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + + @CSharpLua.Template = "sound.play({0}, {1})" + + + + + Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + + @CSharpLua.Template = "sound.play({0}, {1}, {2})" + + + + + Stop playing all active voices + + @CSharpLua.Template = "sound.stop({0})" + + + + + Stop playing all active voices + + @CSharpLua.Template = "sound.stop({0})" + + + + + Stop playing all active voices + + @CSharpLua.Template = "sound.stop({0})" + + + + + Pause all active voices + + @CSharpLua.Template = "sound.pause({0}, {1})" + + + + + Pause all active voices + + @CSharpLua.Template = "sound.pause({0}, {1})" + + + + + Pause all active voices + + @CSharpLua.Template = "sound.pause({0}, {1})" + + + + + Set gain on all active playing voices of a sound. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + + @CSharpLua.Template = "sound.set_gain({0})" + + + + + Set gain on all active playing voices of a sound. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + + @CSharpLua.Template = "sound.set_gain({0}, {1})" + + + + + Set gain on all active playing voices of a sound. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + + @CSharpLua.Template = "sound.set_gain({0})" + + + + + Set gain on all active playing voices of a sound. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + + @CSharpLua.Template = "sound.set_gain({0}, {1})" + + + + + Set gain on all active playing voices of a sound. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + + @CSharpLua.Template = "sound.set_gain({0})" + + + + + Set gain on all active playing voices of a sound. + Note that gain is in linear scale, between 0 and 1. + To get the dB value from the gain, use the formula 20 * log(gain). + Inversely, to find the linear value from a dB value, use the formula + 10db/20. + + @CSharpLua.Template = "sound.set_gain({0}, {1})" + + + + + Set panning on all active playing voices of a sound. + The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. + + @CSharpLua.Template = "sound.set_pan({0})" + + + + + Set panning on all active playing voices of a sound. + The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. + + @CSharpLua.Template = "sound.set_pan({0}, {1})" + + + + + Set panning on all active playing voices of a sound. + The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. + + @CSharpLua.Template = "sound.set_pan({0})" + + + + + Set panning on all active playing voices of a sound. + The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. + + @CSharpLua.Template = "sound.set_pan({0}, {1})" + + + + + Set panning on all active playing voices of a sound. + The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. + + @CSharpLua.Template = "sound.set_pan({0})" + + + + + Set panning on all active playing voices of a sound. + The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. + + @CSharpLua.Template = "sound.set_pan({0}, {1})" + + + + + Sprite API documentation + + + + + + + + + + + + + + Sets horizontal flipping of the provided sprite's animations. + The sprite is identified by its URL. + If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. + + @CSharpLua.Template = "sprite.set_hflip({0}, {1})" + + + + + Sets horizontal flipping of the provided sprite's animations. + The sprite is identified by its URL. + If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. + + @CSharpLua.Template = "sprite.set_hflip({0}, {1})" + + + + + Sets horizontal flipping of the provided sprite's animations. + The sprite is identified by its URL. + If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. + + @CSharpLua.Template = "sprite.set_hflip({0}, {1})" + + + + + Sets vertical flipping of the provided sprite's animations. + The sprite is identified by its URL. + If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. + + @CSharpLua.Template = "sprite.set_vflip({0}, {1})" + + + + + Sets vertical flipping of the provided sprite's animations. + The sprite is identified by its URL. + If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. + + @CSharpLua.Template = "sprite.set_vflip({0}, {1})" + + + + + Sets vertical flipping of the provided sprite's animations. + The sprite is identified by its URL. + If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. + + @CSharpLua.Template = "sprite.set_vflip({0}, {1})" + + + + + Play an animation on a sprite component from its tile set + An optional completion callback function can be provided that will be called when + the animation has completed playing. If no function is provided, + a animation_done message is sent to the script that started the animation. + + @CSharpLua.Template = "sprite.play_flipbook({0}, {1})" + + + + + Play an animation on a sprite component from its tile set + An optional completion callback function can be provided that will be called when + the animation has completed playing. If no function is provided, + a animation_done message is sent to the script that started the animation. + + @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2})" + + + + + Play an animation on a sprite component from its tile set + An optional completion callback function can be provided that will be called when + the animation has completed playing. If no function is provided, + a animation_done message is sent to the script that started the animation. + + @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2}, {3})" + + + + + Play an animation on a sprite component from its tile set + An optional completion callback function can be provided that will be called when + the animation has completed playing. If no function is provided, + a animation_done message is sent to the script that started the animation. + + @CSharpLua.Template = "sprite.play_flipbook({0}, {1})" + + + + + Play an animation on a sprite component from its tile set + An optional completion callback function can be provided that will be called when + the animation has completed playing. If no function is provided, + a animation_done message is sent to the script that started the animation. + + @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2})" + + + + + Play an animation on a sprite component from its tile set + An optional completion callback function can be provided that will be called when + the animation has completed playing. If no function is provided, + a animation_done message is sent to the script that started the animation. + + @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2}, {3})" + + + + + Play an animation on a sprite component from its tile set + An optional completion callback function can be provided that will be called when + the animation has completed playing. If no function is provided, + a animation_done message is sent to the script that started the animation. + + @CSharpLua.Template = "sprite.play_flipbook({0}, {1})" + + + + + Play an animation on a sprite component from its tile set + An optional completion callback function can be provided that will be called when + the animation has completed playing. If no function is provided, + a animation_done message is sent to the script that started the animation. + + @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2})" + + + + + Play an animation on a sprite component from its tile set + An optional completion callback function can be provided that will be called when + the animation has completed playing. If no function is provided, + a animation_done message is sent to the script that started the animation. + + @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2}, {3})" + + + + + Generic access for both builtin components and user components. + + + + + Specialized variant that will handle a USERCOMPONENT only. But exists as an unsafe private that supposedly + allows any component. However, it really only supports IUserComponent. + + + + + + + + + + Specialized variant that will handle a USERCOMPONENT only. But exists as an unsafe private that supposedly + allows any component. However, it really only supports IBuiltInComponent. + + + + + + + + + + Resolves the component relative to the current game object. + + + + + + Resolves the component relative to the specified game object + + + + + + + A convenience shortcut for Component.At that handles fetching the Component relative + to this gameobject. + + + + + + + + Base class for all game object scripts (.script). + + + + + Called when a script component is initialized. + This is a callback-function, which is called by the engine when a script component is initialized. It can be used + to set the initial state of the script. + + + + + Called when a script component is finalized. + This is a callback-function, which is called by the engine when a script component is finalized (destroyed). It can + be used to e.g. take some last action, report the finalization to other game object instances, delete spawned + objects + or release user input focus (see `release_input_focus`). + + + + + Called every frame to update the script component. + This is a callback-function, which is called by the engine every frame to update the state of a script component. + It can be used to perform any kind of game related tasks, e.g. moving the game object instance. + + frame update timestep + + + + Called every frame to update the script component. + Frame-rate independent update. dt contains the delta time since the last update. + Useful when you wish to manipulate physics objects at regular intervals to achieve a stable physics simulation. + Requires that `physics.use_fixed_timestep` is enabled in game.project. + + frame update timestep + + + + Called when a message has been sent to the script component. + This is a callback-function, which is called by the engine whenever a message has been sent to the script + component. + It can be used to take action on the message, e.g. send a response back to the sender of the message. + The `message` parameter is a table containing the message data. If the message is sent from the engine, the + documentation of the message specifies which data is supplied. + + id of the received message + a table containing the message data + address of the sender + + + + Called when user input is received. + This is a callback-function, which is called by the engine when user input is sent to the game object instance of + the script. + It can be used to take action on the input, e.g. move the instance according to the input. + For an instance to obtain user input, it must first acquire input focuse through the message `acquire_input_focus`. + See the documentation of that message for more information. + The `action` parameter is a table containing data about the input mapped to the `action_id`. + For mapped actions it specifies the value of the input and if it was just pressed or released. + Actions are mapped to input in an input_binding-file. + Mouse movement is specifically handled and uses `nil` as its `action_id`. + The `action` only contains positional parameters in this case, such as x and y of the pointer. + + id of the received input action, as mapped in the input_binding-file + a table containing the input data, see above for a description + boolean to signal if the input should be consumed (not passed on to others) or not, default is false + + + + Called when the script component is reloaded. + This is a callback-function, which is called by the engine when the script component is reloaded, e.g. from the + editor. + It can be used for live development, e.g. to tweak constants or set up the state properly for the instance. + + + + + Base class for all game object scripts (.gui_script). Run by GUI components and usually containing the logic required to display GUI elements like heads up displays, menus etc. GUI scripts have access to the GUI library functions. + + + + + Called when a script component is initialized. + This is a callback-function, which is called by the engine when a script component is initialized. It can be used + to set the initial state of the script. + + + + + Called when a script component is finalized. + This is a callback-function, which is called by the engine when a script component is finalized (destroyed). It can + be used to e.g. take some last action, report the finalization to other game object instances, delete spawned + objects + or release user input focus (see `release_input_focus`). + + + + + Called every frame to update the script component. + This is a callback-function, which is called by the engine every frame to update the state of a script component. + It can be used to perform any kind of game related tasks, e.g. moving the game object instance. + + frame update timestep + + + + Called every frame to update the script component. + Frame-rate independent update. dt contains the delta time since the last update. + Useful when you wish to manipulate physics objects at regular intervals to achieve a stable physics simulation. + Requires that `physics.use_fixed_timestep` is enabled in game.project. + + frame update timestep + + + + Called when a message has been sent to the script component. + This is a callback-function, which is called by the engine whenever a message has been sent to the script + component. + It can be used to take action on the message, e.g. send a response back to the sender of the message. + The `message` parameter is a table containing the message data. If the message is sent from the engine, the + documentation of the message specifies which data is supplied. + + id of the received message + a table containing the message data + address of the sender + + + + Called when user input is received. + This is a callback-function, which is called by the engine when user input is sent to the game object instance of + the script. + It can be used to take action on the input, e.g. move the instance according to the input. + For an instance to obtain user input, it must first acquire input focuse through the message `acquire_input_focus`. + See the documentation of that message for more information. + The `action` parameter is a table containing data about the input mapped to the `action_id`. + For mapped actions it specifies the value of the input and if it was just pressed or released. + Actions are mapped to input in an input_binding-file. + Mouse movement is specifically handled and uses `nil` as its `action_id`. + The `action` only contains positional parameters in this case, such as x and y of the pointer. + + id of the received input action, as mapped in the input_binding-file + a table containing the input data, see above for a description + boolean to signal if the input should be consumed (not passed on to others) or not, default is false + + + + Called when the script component is reloaded. + This is a callback-function, which is called by the engine when the script component is reloaded, e.g. from the + editor. + It can be used for live development, e.g. to tweak constants or set up the state properly for the instance. + + + + + @CSharpLua.Template = "gui.get_node({0})" + + + + + Because Defold will establish properties on the self userobject, we have to create a proxy to source the properties + from. + + + + + @CSharpLua.Ignore + + + + + @CSharpLua.Template = "msg.post('.', 'acquire_input_focus')" + + + + + @CSharpLua.Template = "msg.post('.', 'release_input_focus')" + + + + + @CSharpLua.Template = table + + + + + Base class for all render scripts (render_script). Run by the rendering pipeline and containing the logic required to render all app/game graphics each frame. Render scripts have access to the Render library functions. + + + + + Called when a script component is initialized. + This is a callback-function, which is called by the engine when a script component is initialized. It can be used + to set the initial state of the script. + + + + + Called when a script component is finalized. + This is a callback-function, which is called by the engine when a script component is finalized (destroyed). It can + be used to e.g. take some last action, report the finalization to other game object instances, delete spawned + objects + or release user input focus (see `release_input_focus`). + + + + + Called every frame to update the script component. + This is a callback-function, which is called by the engine every frame to update the state of a script component. + It can be used to perform any kind of game related tasks, e.g. moving the game object instance. + + frame update timestep + + + + Called every frame to update the script component. + Frame-rate independent update. dt contains the delta time since the last update. + Useful when you wish to manipulate physics objects at regular intervals to achieve a stable physics simulation. + Requires that `physics.use_fixed_timestep` is enabled in game.project. + + frame update timestep + + + + Called when a message has been sent to the script component. + This is a callback-function, which is called by the engine whenever a message has been sent to the script + component. + It can be used to take action on the message, e.g. send a response back to the sender of the message. + The `message` parameter is a table containing the message data. If the message is sent from the engine, the + documentation of the message specifies which data is supplied. + + id of the received message + a table containing the message data + address of the sender + + + + Called when user input is received. + This is a callback-function, which is called by the engine when user input is sent to the game object instance of + the script. + It can be used to take action on the input, e.g. move the instance according to the input. + For an instance to obtain user input, it must first acquire input focuse through the message `acquire_input_focus`. + See the documentation of that message for more information. + The `action` parameter is a table containing data about the input mapped to the `action_id`. + For mapped actions it specifies the value of the input and if it was just pressed or released. + Actions are mapped to input in an input_binding-file. + Mouse movement is specifically handled and uses `nil` as its `action_id`. + The `action` only contains positional parameters in this case, such as x and y of the pointer. + + id of the received input action, as mapped in the input_binding-file + a table containing the input data, see above for a description + boolean to signal if the input should be consumed (not passed on to others) or not, default is false + + + + Called when the script component is reloaded. + This is a callback-function, which is called by the engine when the script component is reloaded, e.g. from the + editor. + It can be used for live development, e.g. to tweak constants or set up the state properly for the instance. + + + + + System API documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The table can later be loaded by sys.load. + Use sys.get_save_file to obtain a valid location for the file. + Internally, this function uses a workspace buffer sized output file sized 512kb. + This size reflects the output file size which must not exceed this limit. + Additionally, the total number of rows that any one table may contain is limited to 65536 + (i.e. a 16 bit range). When tables are used to represent arrays, the values of + keys are permitted to fall within a 32 bit range, supporting sparse arrays, however + the limit on the total number of rows remains in effect. + + @CSharpLua.Template = "sys.save({0}, {1})" + + + + + If the file exists, it must have been created by sys.save to be loaded. + + @CSharpLua.Template = "sys.load({0})" + + + + + The save-file path is operating system specific and is typically located under the user's home directory. + + @CSharpLua.Template = "sys.get_save_file({0}, {1})" + + + + + The path from which the application is run. + + @CSharpLua.Template = "sys.get_application_path()" + + + + + Get config value from the game.project configuration file. + In addition to the project file, configuration values can also be passed + to the runtime as command line arguments with the --config argument. + + @CSharpLua.Template = "sys.get_config({0})" + + + + + Get config value from the game.project configuration file with default value + + @CSharpLua.Template = "sys.get_config({0}, {1})" + + + + + Open URL in default application, typically a browser + + @CSharpLua.Template = "sys.open_url({0})" + + + + + Open URL in default application, typically a browser + + @CSharpLua.Template = "sys.open_url({0}, {1})" + + + + + Loads a custom resource. Specify the full filename of the resource that you want + to load. When loaded, the file data is returned as a string. + If loading fails, the function returns nil plus the error message. + In order for the engine to include custom resources in the build process, you need + to specify them in the "custom_resources" key in your "game.project" settings file. + You can specify single resource files or directories. If a directory is included + in the resource list, all files and directories in that directory is recursively + included: + For example "main/data/,assets/level_data.json". + + @CSharpLua.Template = "sys.load_resource({0})" + + + + + Returns a table with system information. + + @CSharpLua.Template = "sys.get_sys_info()" + + + + + Returns a table with system information. + + @CSharpLua.Template = "sys.get_sys_info({0})" + + + + + Returns a table with engine information. + + @CSharpLua.Template = "sys.get_engine_info()" + + + + + Returns a table with application information for the requested app. + On iOS, the app_string is an url scheme for the app that is queried. Your + game needs to list the schemes that are queried in an LSApplicationQueriesSchemes array + in a custom "Info.plist". + On Android, the app_string is the package identifier for the app. + + @CSharpLua.Template = "sys.get_application_info({0})" + + + + + Returns an array of tables with information on network interfaces. + + @CSharpLua.Template = "sys.get_ifaddrs()" + + + + + Set the Lua error handler function. + The error handler is a function which is called whenever a lua runtime error occurs. + + @CSharpLua.Template = "sys.set_error_handler({0})" + + + + + Sets the host that is used to check for network connectivity against. + + @CSharpLua.Template = "sys.set_connectivity_host({0})" + + + + + Returns the current network connectivity status + on mobile platforms. + On desktop, this function always return sys.NETWORK_CONNECTED. + + @CSharpLua.Template = "sys.get_connectivity()" + + + + + Terminates the game application and reports the specified code to the OS. + + @CSharpLua.Template = "sys.exit({0})" + + + + + Reboots the game engine with a specified set of arguments. + Arguments will be translated into command line arguments. Calling reboot + function is equivalent to starting the engine with the same arguments. + On startup the engine reads configuration from "game.project" in the + project root. + + @CSharpLua.Template = "sys.reboot({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Set the vsync swap interval. The interval with which to swap the front and back buffers + in sync with vertical blanks (v-blank), the hardware event where the screen image is updated + with data from the front buffer. A value of 1 swaps the buffers at every v-blank, a value of + 2 swaps the buffers every other v-blank and so on. A value of 0 disables waiting for v-blank + before swapping the buffers. Default value is 1. + When setting the swap interval to 0 and having vsync disabled in + "game.project", the engine will try to respect the set frame cap value from + "game.project" in software instead. + This setting may be overridden by driver settings. + + @CSharpLua.Template = "sys.set_vsync_swap_interval({0})" + + + + + Set game update-frequency (frame cap). This option is equivalent to display.update_frequency in + the "game.project" settings but set in run-time. If Vsync checked in "game.project", the rate will + be clamped to a swap interval that matches any detected main monitor refresh rate. If Vsync is + unchecked the engine will try to respect the rate in software using timers. There is no + guarantee that the frame cap will be achieved depending on platform specifics and hardware settings. + + @CSharpLua.Template = "sys.set_update_frequency({0})" + + + + + The buffer can later deserialized by sys.deserialize. + This method has all the same limitations as sys.save. + + @CSharpLua.Template = "sys.serialize({0})" + + + + + deserializes buffer into a lua table + + @CSharpLua.Template = "sys.deserialize({0})" + + + + + Tilemap API documentation + + + + + + Replace a tile in a tile map with a new tile. + The coordinates of the tiles are indexed so that the "first" tile just + above and to the right of origin has coordinates 1,1. + Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. +
+            +-------+-------+------+------+
+            |  0,3  |  1,3  | 2,3  | 3,3  |
+            +-------+-------+------+------+
+            |  0,2  |  1,2  | 2,2  | 3,2  |
+            +-------+-------+------+------+
+            |  0,1  |  1,1  | 2,1  | 3,1  |
+            +-------O-------+------+------+
+            |  0,0  |  1,0  | 2,0  | 3,0  |
+            +-------+-------+------+------+
+            
+ The coordinates must be within the bounds of the tile map as it were created. + That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + Flip always applies before rotation (clockwise). + + @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" +
+
+ + + Replace a tile in a tile map with a new tile. + The coordinates of the tiles are indexed so that the "first" tile just + above and to the right of origin has coordinates 1,1. + Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. +
+            +-------+-------+------+------+
+            |  0,3  |  1,3  | 2,3  | 3,3  |
+            +-------+-------+------+------+
+            |  0,2  |  1,2  | 2,2  | 3,2  |
+            +-------+-------+------+------+
+            |  0,1  |  1,1  | 2,1  | 3,1  |
+            +-------O-------+------+------+
+            |  0,0  |  1,0  | 2,0  | 3,0  |
+            +-------+-------+------+------+
+            
+ The coordinates must be within the bounds of the tile map as it were created. + That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + Flip always applies before rotation (clockwise). + + @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" +
+
+ + + Replace a tile in a tile map with a new tile. + The coordinates of the tiles are indexed so that the "first" tile just + above and to the right of origin has coordinates 1,1. + Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. +
+            +-------+-------+------+------+
+            |  0,3  |  1,3  | 2,3  | 3,3  |
+            +-------+-------+------+------+
+            |  0,2  |  1,2  | 2,2  | 3,2  |
+            +-------+-------+------+------+
+            |  0,1  |  1,1  | 2,1  | 3,1  |
+            +-------O-------+------+------+
+            |  0,0  |  1,0  | 2,0  | 3,0  |
+            +-------+-------+------+------+
+            
+ The coordinates must be within the bounds of the tile map as it were created. + That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + Flip always applies before rotation (clockwise). + + @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" +
+
+ + + Replace a tile in a tile map with a new tile. + The coordinates of the tiles are indexed so that the "first" tile just + above and to the right of origin has coordinates 1,1. + Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. +
+            +-------+-------+------+------+
+            |  0,3  |  1,3  | 2,3  | 3,3  |
+            +-------+-------+------+------+
+            |  0,2  |  1,2  | 2,2  | 3,2  |
+            +-------+-------+------+------+
+            |  0,1  |  1,1  | 2,1  | 3,1  |
+            +-------O-------+------+------+
+            |  0,0  |  1,0  | 2,0  | 3,0  |
+            +-------+-------+------+------+
+            
+ The coordinates must be within the bounds of the tile map as it were created. + That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + Flip always applies before rotation (clockwise). + + @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" +
+
+ + + Replace a tile in a tile map with a new tile. + The coordinates of the tiles are indexed so that the "first" tile just + above and to the right of origin has coordinates 1,1. + Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. +
+            +-------+-------+------+------+
+            |  0,3  |  1,3  | 2,3  | 3,3  |
+            +-------+-------+------+------+
+            |  0,2  |  1,2  | 2,2  | 3,2  |
+            +-------+-------+------+------+
+            |  0,1  |  1,1  | 2,1  | 3,1  |
+            +-------O-------+------+------+
+            |  0,0  |  1,0  | 2,0  | 3,0  |
+            +-------+-------+------+------+
+            
+ The coordinates must be within the bounds of the tile map as it were created. + That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + Flip always applies before rotation (clockwise). + + @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" +
+
+ + + Replace a tile in a tile map with a new tile. + The coordinates of the tiles are indexed so that the "first" tile just + above and to the right of origin has coordinates 1,1. + Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. +
+            +-------+-------+------+------+
+            |  0,3  |  1,3  | 2,3  | 3,3  |
+            +-------+-------+------+------+
+            |  0,2  |  1,2  | 2,2  | 3,2  |
+            +-------+-------+------+------+
+            |  0,1  |  1,1  | 2,1  | 3,1  |
+            +-------O-------+------+------+
+            |  0,0  |  1,0  | 2,0  | 3,0  |
+            +-------+-------+------+------+
+            
+ The coordinates must be within the bounds of the tile map as it were created. + That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + Flip always applies before rotation (clockwise). + + @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" +
+
+ + + Replace a tile in a tile map with a new tile. + The coordinates of the tiles are indexed so that the "first" tile just + above and to the right of origin has coordinates 1,1. + Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. +
+            +-------+-------+------+------+
+            |  0,3  |  1,3  | 2,3  | 3,3  |
+            +-------+-------+------+------+
+            |  0,2  |  1,2  | 2,2  | 3,2  |
+            +-------+-------+------+------+
+            |  0,1  |  1,1  | 2,1  | 3,1  |
+            +-------O-------+------+------+
+            |  0,0  |  1,0  | 2,0  | 3,0  |
+            +-------+-------+------+------+
+            
+ The coordinates must be within the bounds of the tile map as it were created. + That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + Flip always applies before rotation (clockwise). + + @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" +
+
+ + + Replace a tile in a tile map with a new tile. + The coordinates of the tiles are indexed so that the "first" tile just + above and to the right of origin has coordinates 1,1. + Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. +
+            +-------+-------+------+------+
+            |  0,3  |  1,3  | 2,3  | 3,3  |
+            +-------+-------+------+------+
+            |  0,2  |  1,2  | 2,2  | 3,2  |
+            +-------+-------+------+------+
+            |  0,1  |  1,1  | 2,1  | 3,1  |
+            +-------O-------+------+------+
+            |  0,0  |  1,0  | 2,0  | 3,0  |
+            +-------+-------+------+------+
+            
+ The coordinates must be within the bounds of the tile map as it were created. + That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + Flip always applies before rotation (clockwise). + + @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" +
+
+ + + Replace a tile in a tile map with a new tile. + The coordinates of the tiles are indexed so that the "first" tile just + above and to the right of origin has coordinates 1,1. + Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. +
+            +-------+-------+------+------+
+            |  0,3  |  1,3  | 2,3  | 3,3  |
+            +-------+-------+------+------+
+            |  0,2  |  1,2  | 2,2  | 3,2  |
+            +-------+-------+------+------+
+            |  0,1  |  1,1  | 2,1  | 3,1  |
+            +-------O-------+------+------+
+            |  0,0  |  1,0  | 2,0  | 3,0  |
+            +-------+-------+------+------+
+            
+ The coordinates must be within the bounds of the tile map as it were created. + That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + Flip always applies before rotation (clockwise). + + @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" +
+
+ + + Replace a tile in a tile map with a new tile. + The coordinates of the tiles are indexed so that the "first" tile just + above and to the right of origin has coordinates 1,1. + Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. +
+            +-------+-------+------+------+
+            |  0,3  |  1,3  | 2,3  | 3,3  |
+            +-------+-------+------+------+
+            |  0,2  |  1,2  | 2,2  | 3,2  |
+            +-------+-------+------+------+
+            |  0,1  |  1,1  | 2,1  | 3,1  |
+            +-------O-------+------+------+
+            |  0,0  |  1,0  | 2,0  | 3,0  |
+            +-------+-------+------+------+
+            
+ The coordinates must be within the bounds of the tile map as it were created. + That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + Flip always applies before rotation (clockwise). + + @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" +
+
+ + + Replace a tile in a tile map with a new tile. + The coordinates of the tiles are indexed so that the "first" tile just + above and to the right of origin has coordinates 1,1. + Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. +
+            +-------+-------+------+------+
+            |  0,3  |  1,3  | 2,3  | 3,3  |
+            +-------+-------+------+------+
+            |  0,2  |  1,2  | 2,2  | 3,2  |
+            +-------+-------+------+------+
+            |  0,1  |  1,1  | 2,1  | 3,1  |
+            +-------O-------+------+------+
+            |  0,0  |  1,0  | 2,0  | 3,0  |
+            +-------+-------+------+------+
+            
+ The coordinates must be within the bounds of the tile map as it were created. + That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + Flip always applies before rotation (clockwise). + + @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" +
+
+ + + Replace a tile in a tile map with a new tile. + The coordinates of the tiles are indexed so that the "first" tile just + above and to the right of origin has coordinates 1,1. + Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. +
+            +-------+-------+------+------+
+            |  0,3  |  1,3  | 2,3  | 3,3  |
+            +-------+-------+------+------+
+            |  0,2  |  1,2  | 2,2  | 3,2  |
+            +-------+-------+------+------+
+            |  0,1  |  1,1  | 2,1  | 3,1  |
+            +-------O-------+------+------+
+            |  0,0  |  1,0  | 2,0  | 3,0  |
+            +-------+-------+------+------+
+            
+ The coordinates must be within the bounds of the tile map as it were created. + That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + Flip always applies before rotation (clockwise). + + @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" +
+
+ + + Get the tile set at the specified position in the tilemap. + The position is identified by the tile index starting at origin + with index 1, 1. (see tilemap.set_tile()) + Which tile map and layer to query is identified by the URL and the + layer name parameters. + + @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" + + + + + Get the tile set at the specified position in the tilemap. + The position is identified by the tile index starting at origin + with index 1, 1. (see tilemap.set_tile()) + Which tile map and layer to query is identified by the URL and the + layer name parameters. + + @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" + + + + + Get the tile set at the specified position in the tilemap. + The position is identified by the tile index starting at origin + with index 1, 1. (see tilemap.set_tile()) + Which tile map and layer to query is identified by the URL and the + layer name parameters. + + @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" + + + + + Get the tile set at the specified position in the tilemap. + The position is identified by the tile index starting at origin + with index 1, 1. (see tilemap.set_tile()) + Which tile map and layer to query is identified by the URL and the + layer name parameters. + + @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" + + + + + Get the tile set at the specified position in the tilemap. + The position is identified by the tile index starting at origin + with index 1, 1. (see tilemap.set_tile()) + Which tile map and layer to query is identified by the URL and the + layer name parameters. + + @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" + + + + + Get the tile set at the specified position in the tilemap. + The position is identified by the tile index starting at origin + with index 1, 1. (see tilemap.set_tile()) + Which tile map and layer to query is identified by the URL and the + layer name parameters. + + @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" + + + + + Get the bounds for a tile map. This function returns multiple values: + The lower left corner index x and y coordinates (1-indexed), + the tile map width and the tile map height. + The resulting values take all tile map layers into account, meaning that + the bounds are calculated as if all layers were collapsed into one. + + @CSharpLua.Template = "tilemap.get_bounds({0})" + + + + + Get the bounds for a tile map. This function returns multiple values: + The lower left corner index x and y coordinates (1-indexed), + the tile map width and the tile map height. + The resulting values take all tile map layers into account, meaning that + the bounds are calculated as if all layers were collapsed into one. + + @CSharpLua.Template = "tilemap.get_bounds({0})" + + + + + Get the bounds for a tile map. This function returns multiple values: + The lower left corner index x and y coordinates (1-indexed), + the tile map width and the tile map height. + The resulting values take all tile map layers into account, meaning that + the bounds are calculated as if all layers were collapsed into one. + + @CSharpLua.Template = "tilemap.get_bounds({0})" + + + + + Sets the visibility of the tilemap layer + + @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" + + + + + Sets the visibility of the tilemap layer + + @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" + + + + + Sets the visibility of the tilemap layer + + @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" + + + + + Sets the visibility of the tilemap layer + + @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" + + + + + Sets the visibility of the tilemap layer + + @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" + + + + + Sets the visibility of the tilemap layer + + @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" + + + + + Gets the bounds for the tilemap. Allocates memory, so use sparingly. + + + + + + Fetches the bounds without allocating memory + + + + + + + + + Timer API documentation + + + + + + Adds a timer and returns a unique handle + You may create more timers from inside a timer callback. + Using a delay of 0 will result in a timer that triggers at the next frame just before + script update functions. + If you want a timer that triggers on each frame, set delay to 0.0f and repeat to true. + Timers created within a script will automatically die when the script is deleted. + + @CSharpLua.Template = "timer.delay({0}, {1}, {2})" + + + + + You may cancel a timer from inside a timer callback. + Cancelling a timer that is already executed or cancelled is safe. + + @CSharpLua.Template = "timer.cancel({0})" + + + + + Manual triggering a callback for a timer. + + @CSharpLua.Template = "timer.trigger({0})" + + + + + Vector math API documentation + + + + + + Creates a new zero vector with all components set to 0. + + @CSharpLua.Template = "vmath.vector3()" + + + + + Creates a new vector with all components set to the + supplied scalar value. + + @CSharpLua.Template = "vmath.vector3({0})" + + + + + Creates a new vector with all components set to the + corresponding values from the supplied vector. I.e. + This function creates a copy of the given vector. + + @CSharpLua.Template = "vmath.vector3({0})" + + + + + Creates a new vector with the components set to the + supplied values. + + @CSharpLua.Template = "vmath.vector3({0}, {1}, {2})" + + + + + Creates a new zero vector with all components set to 0. + + @CSharpLua.Template = "vmath.vector4()" + + + + + Creates a new vector with all components set to the + supplied scalar value. + + @CSharpLua.Template = "vmath.vector4({0})" + + + + + Creates a new vector with all components set to the + corresponding values from the supplied vector. I.e. + This function creates a copy of the given vector. + + @CSharpLua.Template = "vmath.vector4({0})" + + + + + Creates a new vector with the components set to the + supplied values. + + @CSharpLua.Template = "vmath.vector4({0}, {1}, {2}, {3})" + + + + + Creates a new identity quaternion. The identity + quaternion is equal to: + vmath.quat(0, 0, 0, 1) + + @CSharpLua.Template = "vmath.quat()" + + + + + Creates a new quaternion with all components set to the + corresponding values from the supplied quaternion. I.e. + This function creates a copy of the given quaternion. + + @CSharpLua.Template = "vmath.quat({0})" + + + + + Creates a new quaternion with the components set + according to the supplied parameter values. + + @CSharpLua.Template = "vmath.quat({0}, {1}, {2}, {3})" + + + + + The resulting quaternion describes the rotation that, + if applied to the first vector, would rotate the first + vector to the second. The two vectors must be unit + vectors (of length 1). + The result is undefined if the two vectors point in opposite directions + + @CSharpLua.Template = "vmath.quat_from_to({0}, {1})" + + + + + The resulting quaternion describes a rotation of angle + radians around the axis described by the unit vector v. + + @CSharpLua.Template = "vmath.quat_axis_angle({0}, {1})" + + + + + The resulting quaternion describes the rotation from the + identity quaternion (no rotation) to the coordinate system + as described by the given x, y and z base unit vectors. + + @CSharpLua.Template = "vmath.quat_basis({0}, {1}, {2})" + + + + + The resulting quaternion describes a rotation of angle + radians around the x-axis. + + @CSharpLua.Template = "vmath.quat_rotation_x({0})" + + + + + The resulting quaternion describes a rotation of angle + radians around the y-axis. + + @CSharpLua.Template = "vmath.quat_rotation_y({0})" + + + + + The resulting quaternion describes a rotation of angle + radians around the z-axis. + + @CSharpLua.Template = "vmath.quat_rotation_z({0})" + + + + + The resulting identity matrix describes a transform with + no translation or rotation. + + @CSharpLua.Template = "vmath.matrix4()" + + + + + Creates a new matrix with all components set to the + corresponding values from the supplied matrix. I.e. + the function creates a copy of the given matrix. + + @CSharpLua.Template = "vmath.matrix4({0})" + + + + + Constructs a frustum matrix from the given values. The left, right, + top and bottom coordinates of the view cone are expressed as distances + from the center of the near clipping plane. The near and far coordinates + are expressed as distances from the tip of the view frustum cone. + + @CSharpLua.Template = "vmath.matrix4_frustum({0}, {1}, {2}, {3}, {4}, {5})" + + + + + The resulting matrix is created from the supplied look-at parameters. + This is useful for constructing a view matrix for a camera or + rendering in general. + + @CSharpLua.Template = "vmath.matrix4_look_at({0}, {1}, {2})" + + + + + Creates an orthographic projection matrix. + This is useful to construct a projection matrix for a camera or rendering in general. + + @CSharpLua.Template = "vmath.matrix4_orthographic({0}, {1}, {2}, {3}, {4}, {5})" + + + + + Creates a perspective projection matrix. + This is useful to construct a projection matrix for a camera or rendering in general. + + @CSharpLua.Template = "vmath.matrix4_perspective({0}, {1}, {2}, {3})" + + + + + The resulting matrix describes the same rotation as the quaternion, but does not have any translation (also like the quaternion). + + @CSharpLua.Template = "vmath.matrix4_from_quat({0})" + + + + + The resulting matrix describes a rotation around the axis by the specified angle. + + @CSharpLua.Template = "vmath.matrix4_axis_angle({0}, {1})" + + + + + The resulting matrix describes a rotation around the x-axis + by the specified angle. + + @CSharpLua.Template = "vmath.matrix4_rotation_x({0})" + + + + + The resulting matrix describes a rotation around the y-axis + by the specified angle. + + @CSharpLua.Template = "vmath.matrix4_rotation_y({0})" + + + + + The resulting matrix describes a rotation around the z-axis + by the specified angle. + + @CSharpLua.Template = "vmath.matrix4_rotation_z({0})" + + + + + The resulting matrix describes a translation of a point + in euclidean space. + + @CSharpLua.Template = "vmath.matrix4_translation({0})" + + + + + The resulting matrix describes a translation of a point + in euclidean space. + + @CSharpLua.Template = "vmath.matrix4_translation({0})" + + + + + The resulting matrix is the inverse of the supplied matrix. + For ortho-normal matrices, e.g. regular object transformation, + use vmath.ortho_inv() instead. + The specialized inverse for ortho-normalized matrices is much faster + than the general inverse. + + @CSharpLua.Template = "vmath.inv({0})" + + + + + The resulting matrix is the inverse of the supplied matrix. + The supplied matrix has to be an ortho-normal matrix, e.g. + describe a regular object transformation. + For matrices that are not ortho-normal + use the general inverse vmath.inv() instead. + + @CSharpLua.Template = "vmath.ortho_inv({0})" + + + + + The returned value is a scalar defined as: + P ⋅ Q = |P| |Q| cos θ + where θ is the angle between the vectors P and Q. +
    +
  • If the dot product is positive then the angle between the vectors is below 90 degrees.
  • +
  • If the dot product is zero the vectors are perpendicular (at right-angles to each other).
  • +
  • If the dot product is negative then the angle between the vectors is more than 90 degrees.
  • +
+ + @CSharpLua.Template = "vmath.dot({0}, {1})" +
+
+ + + The returned value is a scalar defined as: + P ⋅ Q = |P| |Q| cos θ + where θ is the angle between the vectors P and Q. +
    +
  • If the dot product is positive then the angle between the vectors is below 90 degrees.
  • +
  • If the dot product is zero the vectors are perpendicular (at right-angles to each other).
  • +
  • If the dot product is negative then the angle between the vectors is more than 90 degrees.
  • +
+ + @CSharpLua.Template = "vmath.dot({0}, {1})" +
+
+ + + The returned value is a scalar defined as: + P ⋅ Q = |P| |Q| cos θ + where θ is the angle between the vectors P and Q. +
    +
  • If the dot product is positive then the angle between the vectors is below 90 degrees.
  • +
  • If the dot product is zero the vectors are perpendicular (at right-angles to each other).
  • +
  • If the dot product is negative then the angle between the vectors is more than 90 degrees.
  • +
+ + @CSharpLua.Template = "vmath.dot({0}, {1})" +
+
+ + + The returned value is a scalar defined as: + P ⋅ Q = |P| |Q| cos θ + where θ is the angle between the vectors P and Q. +
    +
  • If the dot product is positive then the angle between the vectors is below 90 degrees.
  • +
  • If the dot product is zero the vectors are perpendicular (at right-angles to each other).
  • +
  • If the dot product is negative then the angle between the vectors is more than 90 degrees.
  • +
+ + @CSharpLua.Template = "vmath.dot({0}, {1})" +
+
+ + + Returns the squared length of the supplied vector or quaternion. + + @CSharpLua.Template = "vmath.length_sqr({0})" + + + + + Returns the squared length of the supplied vector or quaternion. + + @CSharpLua.Template = "vmath.length_sqr({0})" + + + + + Returns the squared length of the supplied vector or quaternion. + + @CSharpLua.Template = "vmath.length_sqr({0})" + + + + + Returns the length of the supplied vector or quaternion. + If you are comparing the lengths of vectors or quaternions, you should compare + the length squared instead as it is slightly more efficient to calculate + (it eliminates a square root calculation). + + @CSharpLua.Template = "vmath.length({0})" + + + + + Returns the length of the supplied vector or quaternion. + If you are comparing the lengths of vectors or quaternions, you should compare + the length squared instead as it is slightly more efficient to calculate + (it eliminates a square root calculation). + + @CSharpLua.Template = "vmath.length({0})" + + + + + Returns the length of the supplied vector or quaternion. + If you are comparing the lengths of vectors or quaternions, you should compare + the length squared instead as it is slightly more efficient to calculate + (it eliminates a square root calculation). + + @CSharpLua.Template = "vmath.length({0})" + + + + + Normalizes a vector, i.e. returns a new vector with the same + direction as the input vector, but with length 1. + The length of the vector must be above 0, otherwise a + division-by-zero will occur. + + @CSharpLua.Template = "vmath.normalize({0})" + + + + + Normalizes a vector, i.e. returns a new vector with the same + direction as the input vector, but with length 1. + The length of the vector must be above 0, otherwise a + division-by-zero will occur. + + @CSharpLua.Template = "vmath.normalize({0})" + + + + + Normalizes a vector, i.e. returns a new vector with the same + direction as the input vector, but with length 1. + The length of the vector must be above 0, otherwise a + division-by-zero will occur. + + @CSharpLua.Template = "vmath.normalize({0})" + + + + + Given two linearly independent vectors P and Q, the cross product, + P × Q, is a vector that is perpendicular to both P and Q and + therefore normal to the plane containing them. + If the two vectors have the same direction (or have the exact + opposite direction from one another, i.e. are not linearly independent) + or if either one has zero length, then their cross product is zero. + + @CSharpLua.Template = "vmath.cross({0}, {1})" + + + + + Linearly interpolate between two vectors. The function + treats the vectors as positions and interpolates between + the positions in a straight line. Lerp is useful to describe + transitions from one place to another over time. + The function does not clamp t between 0 and 1. + + @CSharpLua.Template = "vmath.lerp({0}, {1}, {2})" + + + + + Linearly interpolate between two vectors. The function + treats the vectors as positions and interpolates between + the positions in a straight line. Lerp is useful to describe + transitions from one place to another over time. + The function does not clamp t between 0 and 1. + + @CSharpLua.Template = "vmath.lerp({0}, {1}, {2})" + + + + + Linearly interpolate between two vectors. The function + treats the vectors as positions and interpolates between + the positions in a straight line. Lerp is useful to describe + transitions from one place to another over time. + The function does not clamp t between 0 and 1. + + @CSharpLua.Template = "vmath.lerp({0}, {1}, {2})" + + + + + Linearly interpolate between two vectors. The function + treats the vectors as positions and interpolates between + the positions in a straight line. Lerp is useful to describe + transitions from one place to another over time. + The function does not clamp t between 0 and 1. + + @CSharpLua.Template = "vmath.lerp({0}, {1}, {2})" + + + + + Spherically interpolates between two vectors. The difference to + lerp is that slerp treats the vectors as directions instead of + positions in space. + The direction of the returned vector is interpolated by the angle + and the magnitude is interpolated between the magnitudes of the + from and to vectors. + Slerp is computationally more expensive than lerp. + The function does not clamp t between 0 and 1. + + @CSharpLua.Template = "vmath.slerp({0}, {1}, {2})" + + + + + Spherically interpolates between two vectors. The difference to + lerp is that slerp treats the vectors as directions instead of + positions in space. + The direction of the returned vector is interpolated by the angle + and the magnitude is interpolated between the magnitudes of the + from and to vectors. + Slerp is computationally more expensive than lerp. + The function does not clamp t between 0 and 1. + + @CSharpLua.Template = "vmath.slerp({0}, {1}, {2})" + + + + + Spherically interpolates between two vectors. The difference to + lerp is that slerp treats the vectors as directions instead of + positions in space. + The direction of the returned vector is interpolated by the angle + and the magnitude is interpolated between the magnitudes of the + from and to vectors. + Slerp is computationally more expensive than lerp. + The function does not clamp t between 0 and 1. + + @CSharpLua.Template = "vmath.slerp({0}, {1}, {2})" + + + + + Calculates the conjugate of a quaternion. The result is a + quaternion with the same magnitudes but with the sign of + the imaginary (vector) parts changed: + q* = [w, -v] + + @CSharpLua.Template = "vmath.conj({0})" + + + + + Returns a new vector from the supplied vector that is + rotated by the rotation described by the supplied + quaternion. + + @CSharpLua.Template = "vmath.rotate({0}, {1})" + + + + + Calculates the extent the projection of the first vector onto the second. + The returned value is a scalar p defined as: + p = |P| cos θ / |Q| + where θ is the angle between the vectors P and Q. + + @CSharpLua.Template = "vmath.project({0}, {1})" + + + + + Performs an element wise multiplication between two vectors of the same type + The returned value is a vector defined as (e.g. for a vector3): + v = vmath.mul_per_elem(a, b) = vmath.vector3(a.x * b.x, a.y * b.y, a.z * b.z) + + @CSharpLua.Template = "vmath.mul_per_elem({0}, {1})" + + + + + Performs an element wise multiplication between two vectors of the same type + The returned value is a vector defined as (e.g. for a vector3): + v = vmath.mul_per_elem(a, b) = vmath.vector3(a.x * b.x, a.y * b.y, a.z * b.z) + + @CSharpLua.Template = "vmath.mul_per_elem({0}, {1})" + + + + + Webview API documentation + + + + + + Window API documentation + + + + + + Sets a window event listener. + + @CSharpLua.Template = "window.set_listener({0})" + + + + + Set the locking state for current mouse cursor on a PC platform. + This function locks or unlocks the mouse cursor to the center point of the window. While the cursor is locked, + mouse position updates will still be sent to the scripts as usual. + + @CSharpLua.Template = "window.set_mouse_lock({0})" + + + + + Sets the dimming mode on a mobile device. + The dimming mode specifies whether or not a mobile device should dim the screen after a period without user interaction. The dimming mode will only affect the mobile device while the game is in focus on the device, but not when the game is running in the background. + This function has no effect on platforms that does not support dimming. + + @CSharpLua.Template = "window.set_dim_mode({0})" + + + + + Returns the current dimming mode set on a mobile device. + The dimming mode specifies whether or not a mobile device should dim the screen after a period without user interaction. + On platforms that does not support dimming, window.DIMMING_UNKNOWN is always returned. + + @CSharpLua.Template = "window.get_dim_mode()" + + + + + This returns the current window size (width and height). + + @CSharpLua.Template = "window.get_size()" + + + + + This returns the current lock state of the mouse cursor + + @CSharpLua.Template = "window.get_mouse_lock()" + + + + + Zlib compression API documentation + + + + + + A lua error is raised is on error + + @CSharpLua.Template = "zlib.inflate({0})" + + + + + A lua error is raised is on error + + @CSharpLua.Template = "zlib.deflate({0})" + + +
+
diff --git a/DefoldSharpLib/bin/Release/net6.0/ref/DefoldSharp.dll b/DefoldSharpLib/bin/Release/net6.0/ref/DefoldSharp.dll new file mode 100644 index 0000000..e204516 Binary files /dev/null and b/DefoldSharpLib/bin/Release/net6.0/ref/DefoldSharp.dll differ diff --git a/DefoldSharpLib/buffer.cs b/DefoldSharpLib/buffer.cs new file mode 100644 index 0000000..ce3c87c --- /dev/null +++ b/DefoldSharpLib/buffer.cs @@ -0,0 +1,68 @@ +namespace DefoldSharp +{ + /// + /// Buffer API documentation + /// + /// + public static class Buffer + { + #region Defold API + /// + /// Create a new data buffer containing a specified set of streams. A data buffer + /// can contain one or more streams with typed data. This is useful for managing + /// compound data, for instance a vertex buffer could contain separate streams for + /// vertex position, color, normal etc. + /// + /// @CSharpLua.Template = "buffer.create({0}, {1})" + /// + public static extern DataBuffer create(double element_count_p1, LuaTableBase declaration_p2); + + + /// + /// Get a specified stream from a buffer. + /// + /// @CSharpLua.Template = "buffer.get_stream({0}, {1})" + /// + public static extern BufferStream get_stream(DataBuffer buffer_p1, Hash stream_name_p2); + + + /// + /// Get a specified stream from a buffer. + /// + /// @CSharpLua.Template = "buffer.get_stream({0}, {1})" + /// + public static extern BufferStream get_stream(DataBuffer buffer_p1, string stream_name_p2); + + + /// + /// Copy a specified amount of data from one stream to another. + /// The value type and size must match between source and destination streams. + /// The source and destination streams can be the same. + /// + /// @CSharpLua.Template = "buffer.copy_stream({0}, {1}, {2}, {3}, {4})" + /// + public static extern void copy_stream(BufferStream dst_p1, double dstoffset_p2, BufferStream src_p3, double srcoffset_p4, double count_p5); + + + /// + /// Copy all data streams from one buffer to another, element wise. + /// Each of the source streams must have a matching stream in the + /// destination buffer. The streams must match in both type and size. + /// The source and destination buffer can be the same. + /// + /// @CSharpLua.Template = "buffer.copy_buffer({0}, {1}, {2}, {3}, {4})" + /// + public static extern void copy_buffer(DataBuffer dst_p1, double dstoffset_p2, DataBuffer src_p3, double srcoffset_p4, double count_p5); + + + /// + /// Get a copy of all the bytes from a specified stream as a Lua string. + /// + /// @CSharpLua.Template = "buffer.get_bytes({0}, {1})" + /// + public static extern string get_bytes(DataBuffer buffer_p1, Hash stream_name_p2); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/builtins.cs b/DefoldSharpLib/builtins.cs new file mode 100644 index 0000000..1bcf92d --- /dev/null +++ b/DefoldSharpLib/builtins.cs @@ -0,0 +1,41 @@ +namespace DefoldSharp +{ + /// + /// Built-ins API documentation + /// + /// + public static class Builtins + { + #region Defold API + /// + /// Pretty printing of Lua values. This function prints Lua values + /// in a manner similar to +print()+, but will also recurse into tables + /// and pretty print them. There is a limit to how deep the function + /// will recurse. + /// + /// @CSharpLua.Template = "builtins.pprint({0})" + /// + public static extern void pprint(LuaType v_p1); + + + /// + /// All ids in the engine are represented as hashes, so a string needs to be hashed + /// before it can be compared with an id. + /// + /// @CSharpLua.Template = "builtins.hash({0})" + /// + public static extern Hash hash(string s_p1); + + + /// + /// Returns a hexadecimal representation of a hash value. + /// The returned string is always padded with leading zeros. + /// + /// @CSharpLua.Template = "builtins.hash_to_hex({0})" + /// + public static extern string hash_to_hex(Hash h_p1); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/camera.cs b/DefoldSharpLib/camera.cs new file mode 100644 index 0000000..b8d35b3 --- /dev/null +++ b/DefoldSharpLib/camera.cs @@ -0,0 +1,52 @@ +namespace DefoldSharp +{ + /// + /// Camera API documentation + /// + /// + public static class Camera + { + #region Defold API + #region Messages + /// + /// + public class set_camera_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("set_camera"); + public override Hash FetchCode() => __CODE__; + + public double aspect_ratio; + public double fov; + public double near_z; + public double far_z; + public bool orthographic_projection; + public double orthographic_zoom; + } + + + /// + /// + public class acquire_camera_focus_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("acquire_camera_focus"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class release_camera_focus_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("release_camera_focus"); + public override Hash FetchCode() => __CODE__; + + } + + + #endregion Messages + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/collectionfactory.cs b/DefoldSharpLib/collectionfactory.cs new file mode 100644 index 0000000..16d9a38 --- /dev/null +++ b/DefoldSharpLib/collectionfactory.cs @@ -0,0 +1,501 @@ +using System; + +namespace DefoldSharp +{ + /// + /// Collection factory API documentation + /// + /// + public class CollectionFactory : BuiltInComponentBase + { + #region Defold API + /// + /// This returns status of the collection factory. + /// Calling this function when the factory is not marked as dynamic loading always returns COMP_COLLECTION_FACTORY_STATUS_LOADED. + /// + /// @CSharpLua.Template = "collectionfactory.get_status()" + /// + public static extern FactoryStatus get_status(); + + + /// + /// This returns status of the collection factory. + /// Calling this function when the factory is not marked as dynamic loading always returns COMP_COLLECTION_FACTORY_STATUS_LOADED. + /// + /// @CSharpLua.Template = "collectionfactory.get_status({0})" + /// + public static extern FactoryStatus get_status(string url_p1); + + + /// + /// This returns status of the collection factory. + /// Calling this function when the factory is not marked as dynamic loading always returns COMP_COLLECTION_FACTORY_STATUS_LOADED. + /// + /// @CSharpLua.Template = "collectionfactory.get_status({0})" + /// + public static extern FactoryStatus get_status(Hash url_p1); + + + /// + /// This returns status of the collection factory. + /// Calling this function when the factory is not marked as dynamic loading always returns COMP_COLLECTION_FACTORY_STATUS_LOADED. + /// + /// @CSharpLua.Template = "collectionfactory.get_status({0})" + /// + public static extern FactoryStatus get_status(Url url_p1); + + + /// + /// This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "collectionfactory.unload()" + /// + public static extern void unload(); + + + /// + /// This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "collectionfactory.unload({0})" + /// + public static extern void unload(string url_p1); + + + /// + /// This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "collectionfactory.unload({0})" + /// + public static extern void unload(Hash url_p1); + + + /// + /// This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "collectionfactory.unload({0})" + /// + public static extern void unload(Url url_p1); + + + /// + /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "collectionfactory.load()" + /// + public static extern void load(); + + + /// + /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "collectionfactory.load({0})" + /// + public static extern void load(string url_p1); + + + /// + /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "collectionfactory.load({0}, {1})" + /// + public static extern void load(string url_p1, Action complete_function_p2); + + + /// + /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "collectionfactory.load({0})" + /// + public static extern void load(Hash url_p1); + + + /// + /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "collectionfactory.load({0}, {1})" + /// + public static extern void load(Hash url_p1, Action complete_function_p2); + + + /// + /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "collectionfactory.load({0})" + /// + public static extern void load(Url url_p1); + + + /// + /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "collectionfactory.load({0}, {1})" + /// + public static extern void load(Url url_p1, Action complete_function_p2); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0})" + /// + public static extern LuaTable create(string url_p1); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0}, {1})" + /// + public static extern LuaTable create(string url_p1, vector3 position_p2); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2})" + /// + public static extern LuaTable create(string url_p1, vector3 position_p2, Quaternion rotation_p3); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3})" + /// + public static extern LuaTable create(string url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3}, {4})" + /// + public static extern LuaTable create(string url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4, double scale_p5); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0})" + /// + public static extern LuaTable create(Hash url_p1); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0}, {1})" + /// + public static extern LuaTable create(Hash url_p1, vector3 position_p2); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2})" + /// + public static extern LuaTable create(Hash url_p1, vector3 position_p2, Quaternion rotation_p3); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3})" + /// + public static extern LuaTable create(Hash url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3}, {4})" + /// + public static extern LuaTable create(Hash url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4, double scale_p5); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0})" + /// + public static extern LuaTable create(Url url_p1); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0}, {1})" + /// + public static extern LuaTable create(Url url_p1, vector3 position_p2); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2})" + /// + public static extern LuaTable create(Url url_p1, vector3 position_p2, Quaternion rotation_p3); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3})" + /// + public static extern LuaTable create(Url url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4); + + + /// + /// The URL identifies the collectionfactory component that should do the spawning. + /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale + /// will be applied to the whole collection when spawned. + /// Script properties in the created game objects can be overridden through + /// a properties-parameter table. The table should contain game object ids + /// (hash) as keys and property tables as values to be used when initiating each + /// spawned game object. + /// See go.property for more information on script properties. + /// The function returns a table that contains a key for each game object + /// id (hash), as addressed if the collection file was top level, and the + /// corresponding spawned instance id (hash) as value with a unique path + /// prefix added to each instance. + /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources + /// using collectionfactory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3}, {4})" + /// + public static extern LuaTable create(Url url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4, double scale_p5); + + + #endregion Defold API + + + public readonly struct CollectionFactoryCreateResult + { + public readonly Hash RelativeHash; + public readonly Hash UniqueHash; + + + public CollectionFactoryCreateResult(Hash relativeHash, Hash uniqueHash) + { + RelativeHash = relativeHash; + UniqueHash = uniqueHash; + } + } + + public FactoryStatus Status => get_status(this); + + + public LuaTableOf Create() + { + return (dynamic)create(this); + } + + public LuaTableOf Create(vector3 position) + { + return (dynamic)create(this, position); + } + + public LuaTableOf Create(vector3 position, Quaternion rotation) + { + return (dynamic)create(this, position, rotation); + } + + public LuaTableOf Create(vector3 position, Quaternion rotation, LuaTableBase properties) + { + return (dynamic)create(this, position, rotation, properties); + } + } +} diff --git a/DefoldSharpLib/collectionproxy.cs b/DefoldSharpLib/collectionproxy.cs new file mode 100644 index 0000000..8564f80 --- /dev/null +++ b/DefoldSharpLib/collectionproxy.cs @@ -0,0 +1,226 @@ +namespace DefoldSharp +{ + /// + /// Collection proxy API documentation + /// + /// + public class CollectionProxy : BuiltInComponentBase + { + #region Defold API + #region Messages + /// + /// + public class set_time_step_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("set_time_step"); + public override Hash FetchCode() => __CODE__; + + public double factor; + public double mode; + } + + + /// + /// + public class load_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("load"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class async_load_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("async_load"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class proxy_loaded_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("proxy_loaded"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class init_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("init"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class enable_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("enable"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class disable_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("disable"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class final_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("final"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class unload_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("unload"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class proxy_unloaded_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("proxy_unloaded"); + public override Hash FetchCode() => __CODE__; + + } + + + #endregion Messages + + + /// + /// return an indexed table of resources for a collection proxy. Each + /// entry is a hexadecimal string that represents the data of the specific + /// resource. This representation corresponds with the filename for each + /// individual resource that is exported when you bundle an application with + /// LiveUpdate functionality. + /// + /// @CSharpLua.Template = "collectionproxy.get_resources({0})" + /// + public static extern LuaTable get_resources(Url collectionproxy_p1); + + + /// + /// return an array of missing resources for a collection proxy. Each + /// entry is a hexadecimal string that represents the data of the specific + /// resource. This representation corresponds with the filename for each + /// individual resource that is exported when you bundle an application with + /// LiveUpdate functionality. It should be considered good practise to always + /// check whether or not there are any missing resources in a collection proxy + /// before attempting to load the collection proxy. + /// + /// @CSharpLua.Template = "collectionproxy.missing_resources({0})" + /// + public static extern LuaTable missing_resources(Url collectionproxy_p1); + + + #endregion Defold API + + + /// + /// Posts a load message to the collection-proxy-component to start the loading of the referenced collection. When the loading has completed, the message proxy_loaded will be sent back to the script. A loaded collection must be initialized (message init) and enabled (message enable) in order to be simulated and drawn. + /// + public void Load() + { + var message = new load_message(); + Message.postMessage(this, message); + } + + + /// + /// Posts a async_load message to a collection-proxy-component to start background loading of the referenced collection. When the loading has completed, the message proxy_loaded will be sent back to the script. A loaded collection must be initialized (message init) and enabled (message enable) in order to be simulated and drawn. + /// + public void LoadAsync() + { + var message = new async_load_message(); + Message.postMessage(this, message); + } + + + /// + /// Post this message to a collection-proxy-component to initialize the game objects and components in the referenced collection. Sending enable to an uninitialized collection proxy automatically initializes it. The init message simply provides a higher level of control. + /// + public void Init() + { + var message = new init_message(); + Message.postMessage(this, message); + } + + + /// + /// Post this message to a collection-proxy-component to enable the referenced collection, which in turn enables the contained game objects and components. If the referenced collection was not initialized prior to this call, it will automatically be initialized. + /// + public void Enable() + { + var message = new enable_message(); + Message.postMessage(this, message); + } + + + /// + /// Post this message to a collection-proxy-component to disable the referenced collection, which in turn disables the contained game objects and components. + /// + public void Disable() + { + var message = new disable_message(); + Message.postMessage(this, message); + } + + + /// + /// Post this message to a collection-proxy-component to finalize the referenced collection, which in turn finalizes the contained game objects and components. + /// + public void Final() + { + var message = new final_message(); + Message.postMessage(this, message); + } + + + /// + /// Post this message to a collection-proxy-component to start the unloading of the referenced collection. When the unloading has completed, the message proxy_unloaded will be sent back to the script. + /// + public void Unload() + { + var message = new unload_message(); + Message.postMessage(this, message); + } + + + /// + /// Post this message to a collection-proxy-component to modify the time-step used when updating the collection controlled by the proxy. The time-step is modified by a scaling factor and can be incremented either continuously or in discrete steps. The continuous mode can be used for slow-motion or fast-forward effects. The discrete mode is only useful when scaling the time-step to pass slower than real time (factor is below 1). The time-step will then be set to 0 for as many frames as the scaling demands and then take on the full real-time-step for one frame, to simulate pulses. E.g. if factor is set to 0.1 the time-step would be 0 for 9 frames, then be 1/60 for one frame, 0 for 9 frames, and so on. The result in practice is that the game looks like it's updated at a much lower frequency than 60 Hz, which can be useful for debugging when each frame needs to be inspected. + /// + /// + /// + public void SetTimeStep(double factor, TimeStepMode mode) + { + var message = new set_time_step_message() { factor = factor, mode = (dynamic)mode }; + Message.postMessage(this, message); + } + } +} diff --git a/DefoldSharpLib/crash.cs b/DefoldSharpLib/crash.cs new file mode 100644 index 0000000..9334c94 --- /dev/null +++ b/DefoldSharpLib/crash.cs @@ -0,0 +1,108 @@ +namespace DefoldSharp +{ + /// + /// Crash API documentation + /// + /// + public static class Crash + { + #region Defold API + /// + /// Performs the same steps as if a crash had just occured but + /// allows the program to continue. + /// The generated dump can be read by crash.load_previous + /// + /// @CSharpLua.Template = "crash.write_dump()" + /// + public static extern void write_dump(); + + + /// + /// Crashes occuring before the path is set will be stored to a default engine location. + /// + /// @CSharpLua.Template = "crash.set_file_path({0})" + /// + public static extern void set_file_path(string path_p1); + + + /// + /// The crash dump will be removed from disk upon a successful + /// load, so loading is one-shot. + /// + /// @CSharpLua.Template = "crash.load_previous()" + /// + public static extern double load_previous(); + + + /// + /// releases a previously loaded crash dump + /// + /// @CSharpLua.Template = "crash.release({0})" + /// + public static extern void release(double handle_p1); + + + /// + /// Store a user value that will get written to a crash dump when + /// a crash occurs. This can be user id:s, breadcrumb data etc. + /// There are 32 slots indexed from 0. Each slot stores at most 255 characters. + /// + /// @CSharpLua.Template = "crash.set_user_field({0}, {1})" + /// + public static extern void set_user_field(double index_p1, string value_p2); + + + /// + /// The function returns a table containing entries with sub-tables that + /// have fields 'name' and 'address' set for all loaded modules. + /// + /// @CSharpLua.Template = "crash.get_modules({0})" + /// + public static extern LuaTable get_modules(double handle_p1); + + + /// + /// reads user field from a loaded crash dump + /// + /// @CSharpLua.Template = "crash.get_user_field({0}, {1})" + /// + public static extern string get_user_field(double handle_p1, double index_p2); + + + /// + /// reads a system field from a loaded crash dump + /// + /// @CSharpLua.Template = "crash.get_sys_field({0}, {1})" + /// + public static extern string get_sys_field(double handle_p1, double index_p2); + + + /// + /// read signal number from a crash report + /// + /// @CSharpLua.Template = "crash.get_signum({0})" + /// + public static extern double get_signum(double handle_p1); + + + /// + /// A table is returned containing the addresses of the call stack. + /// + /// @CSharpLua.Template = "crash.get_backtrace({0})" + /// + public static extern LuaTable get_backtrace(double handle_p1); + + + /// + /// The format of read text blob is platform specific + /// and not guaranteed + /// but can be useful for manual inspection. + /// + /// @CSharpLua.Template = "crash.get_extra_data({0})" + /// + public static extern string get_extra_data(double handle_p1); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/facebook.cs b/DefoldSharpLib/facebook.cs new file mode 100644 index 0000000..8d7ab41 --- /dev/null +++ b/DefoldSharpLib/facebook.cs @@ -0,0 +1,12 @@ +namespace DefoldSharp +{ + /// + /// Facebook API documentation + /// + /// + public static class Facebook + { + #region Defold API + #endregion Defold API + } +} \ No newline at end of file diff --git a/DefoldSharpLib/factory.cs b/DefoldSharpLib/factory.cs new file mode 100644 index 0000000..3baeee7 --- /dev/null +++ b/DefoldSharpLib/factory.cs @@ -0,0 +1,449 @@ +using System; + +namespace DefoldSharp +{ + /// + /// Factory API documentation + /// + /// + public class Factory : BuiltInComponentBase + { + #region Defold API + /// + /// This returns status of the factory. + /// Calling this function when the factory is not marked as dynamic loading always returns + /// factory.STATUS_LOADED. + /// + /// @CSharpLua.Template = "factory.get_status()" + /// + public static extern FactoryStatus get_status(); + + + /// + /// This returns status of the factory. + /// Calling this function when the factory is not marked as dynamic loading always returns + /// factory.STATUS_LOADED. + /// + /// @CSharpLua.Template = "factory.get_status({0})" + /// + public static extern FactoryStatus get_status(string url_p1); + + + /// + /// This returns status of the factory. + /// Calling this function when the factory is not marked as dynamic loading always returns + /// factory.STATUS_LOADED. + /// + /// @CSharpLua.Template = "factory.get_status({0})" + /// + public static extern FactoryStatus get_status(Hash url_p1); + + + /// + /// This returns status of the factory. + /// Calling this function when the factory is not marked as dynamic loading always returns + /// factory.STATUS_LOADED. + /// + /// @CSharpLua.Template = "factory.get_status({0})" + /// + public static extern FactoryStatus get_status(Url url_p1); + + + /// + /// This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "factory.unload()" + /// + public static extern void unload(); + + + /// + /// This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "factory.unload({0})" + /// + public static extern void unload(string url_p1); + + + /// + /// This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "factory.unload({0})" + /// + public static extern void unload(Hash url_p1); + + + /// + /// This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "factory.unload({0})" + /// + public static extern void unload(Url url_p1); + + + /// + /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "factory.load()" + /// + public static extern void load(); + + + /// + /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "factory.load({0})" + /// + public static extern void load(string url_p1); + + + /// + /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "factory.load({0}, {1})" + /// + public static extern void load(string url_p1, Action complete_function_p2); + + + /// + /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "factory.load({0})" + /// + public static extern void load(Hash url_p1); + + + /// + /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "factory.load({0}, {1})" + /// + public static extern void load(Hash url_p1, Action complete_function_p2); + + + /// + /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "factory.load({0})" + /// + public static extern void load(Url url_p1); + + + /// + /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + /// @CSharpLua.Template = "factory.load({0}, {1})" + /// + public static extern void load(Url url_p1, Action complete_function_p2); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0})" + /// + public static extern Hash create(string url_p1); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1})" + /// + public static extern Hash create(string url_p1, vector3 position_p2); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1}, {2})" + /// + public static extern Hash create(string url_p1, vector3 position_p2, Quaternion rotation_p3); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3})" + /// + public static extern Hash create(string url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" + /// + public static extern Hash create(string url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4, double scale_p5); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" + /// + public static extern Hash create(string url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4, vector3 scale_p5); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0})" + /// + public static extern Hash create(Hash url_p1); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1})" + /// + public static extern Hash create(Hash url_p1, vector3 position_p2); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1}, {2})" + /// + public static extern Hash create(Hash url_p1, vector3 position_p2, Quaternion rotation_p3); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3})" + /// + public static extern Hash create(Hash url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" + /// + public static extern Hash create(Hash url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4, double scale_p5); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" + /// + public static extern Hash create(Hash url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4, vector3 scale_p5); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0})" + /// + public static extern Hash create(Url url_p1); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1})" + /// + public static extern Hash create(Url url_p1, vector3 position_p2); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1}, {2})" + /// + public static extern Hash create(Url url_p1, vector3 position_p2, Quaternion rotation_p3); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3})" + /// + public static extern Hash create(Url url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" + /// + public static extern Hash create(Url url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4, double scale_p5); + + + /// + /// The URL identifies which factory should create the game object. + /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. + /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. + /// See go.property for more information on script properties. + /// Calling factory.create on a factory that is marked as dynamic without having loaded resources + /// using factory.load will synchronously load and create resources which may affect application performance. + /// + /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" + /// + public static extern Hash create(Url url_p1, vector3 position_p2, Quaternion rotation_p3, LuaTableBase properties_p4, vector3 scale_p5); + + + #endregion Defold API + + + /// + /// Calling this function when the factory is not marked as dynamic loading always returns + /// factory.STATUS_LOADED. + /// + public FactoryStatus Status => get_status(this); + + + /// + /// This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + public void Unload() => unload(this); + + + /// + /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. + /// Calling this function when the factory is not marked as dynamic loading does nothing. + /// + public void Load() => load(this); + + + public void Load(Action callback) + { + void IntermediateCallback(object obj, Url url, bool b) + { + callback(obj, this, b); + } + + load(this, IntermediateCallback); + } + + + public Hash Create() + { + return (dynamic)create(this); + } + + + public Hash Create(vector3 position) + { + return (dynamic)create(this, position); + } + + + public Hash Create(vector3 position, Quaternion rotation) + { + return (dynamic)create(this, position, rotation); + } + + + public Hash Create(vector3 position, Quaternion rotation, LuaTableBase properties) + { + return (dynamic)create(this, position, rotation, properties); + } + + + public Hash Create(vector3 position, Quaternion rotation, LuaTableBase properties, double scale) + { + return (dynamic)create(this, position, rotation, properties, scale); + } + } +} diff --git a/DefoldSharpLib/go.cs b/DefoldSharpLib/go.cs new file mode 100644 index 0000000..f3f7043 --- /dev/null +++ b/DefoldSharpLib/go.cs @@ -0,0 +1,2392 @@ +using System; + +namespace DefoldSharp +{ + /// + /// Game object API documentation + /// + /// + public static class Go + { + #region Defold API + #region Messages + /// + /// + public class acquire_input_focus_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("acquire_input_focus"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class release_input_focus_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("release_input_focus"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class set_parent_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("set_parent"); + public override Hash FetchCode() => __CODE__; + + public Hash parent_id; + public double keep_world_transform; + } + + + /// + /// + public class enable_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("enable"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class disable_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("disable"); + public override Hash FetchCode() => __CODE__; + + } + + + #endregion Messages + + + /// + /// gets a named property of the specified game object or component + /// + /// @CSharpLua.Template = "go.get({0}, {1})" + /// + public static extern LuaType get(string url_p1, string property_p2); + + + /// + /// gets a named property of the specified game object or component + /// + /// @CSharpLua.Template = "go.get({0}, {1}, {2})" + /// + public static extern LuaType get(string url_p1, string property_p2, LuaTableBase options_p3); + + + /// + /// gets a named property of the specified game object or component + /// + /// @CSharpLua.Template = "go.get({0}, {1})" + /// + public static extern LuaType get(string url_p1, Hash property_p2); + + + /// + /// gets a named property of the specified game object or component + /// + /// @CSharpLua.Template = "go.get({0}, {1}, {2})" + /// + public static extern LuaType get(string url_p1, Hash property_p2, LuaTableBase options_p3); + + + /// + /// gets a named property of the specified game object or component + /// + /// @CSharpLua.Template = "go.get({0}, {1})" + /// + public static extern LuaType get(Hash url_p1, string property_p2); + + + /// + /// gets a named property of the specified game object or component + /// + /// @CSharpLua.Template = "go.get({0}, {1}, {2})" + /// + public static extern LuaType get(Hash url_p1, string property_p2, LuaTableBase options_p3); + + + /// + /// gets a named property of the specified game object or component + /// + /// @CSharpLua.Template = "go.get({0}, {1})" + /// + public static extern LuaType get(Hash url_p1, Hash property_p2); + + + /// + /// gets a named property of the specified game object or component + /// + /// @CSharpLua.Template = "go.get({0}, {1}, {2})" + /// + public static extern LuaType get(Hash url_p1, Hash property_p2, LuaTableBase options_p3); + + + /// + /// gets a named property of the specified game object or component + /// + /// @CSharpLua.Template = "go.get({0}, {1})" + /// + public static extern LuaType get(Url url_p1, string property_p2); + + + /// + /// gets a named property of the specified game object or component + /// + /// @CSharpLua.Template = "go.get({0}, {1}, {2})" + /// + public static extern LuaType get(Url url_p1, string property_p2, LuaTableBase options_p3); + + + /// + /// gets a named property of the specified game object or component + /// + /// @CSharpLua.Template = "go.get({0}, {1})" + /// + public static extern LuaType get(Url url_p1, Hash property_p2); + + + /// + /// gets a named property of the specified game object or component + /// + /// @CSharpLua.Template = "go.get({0}, {1}, {2})" + /// + public static extern LuaType get(Url url_p1, Hash property_p2, LuaTableBase options_p3); + + + /// + /// sets a named property of the specified game object or component, or a material constant + /// + /// @CSharpLua.Template = "go.set({0}, {1}, {2})" + /// + public static extern void set(string url_p1, string property_p2, LuaType value_p3); + + + /// + /// sets a named property of the specified game object or component, or a material constant + /// + /// @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" + /// + public static extern void set(string url_p1, string property_p2, LuaType value_p3, LuaTableBase options_p4); + + + /// + /// sets a named property of the specified game object or component, or a material constant + /// + /// @CSharpLua.Template = "go.set({0}, {1}, {2})" + /// + public static extern void set(string url_p1, Hash property_p2, LuaType value_p3); + + + /// + /// sets a named property of the specified game object or component, or a material constant + /// + /// @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" + /// + public static extern void set(string url_p1, Hash property_p2, LuaType value_p3, LuaTableBase options_p4); + + + /// + /// sets a named property of the specified game object or component, or a material constant + /// + /// @CSharpLua.Template = "go.set({0}, {1}, {2})" + /// + public static extern void set(Hash url_p1, string property_p2, LuaType value_p3); + + + /// + /// sets a named property of the specified game object or component, or a material constant + /// + /// @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" + /// + public static extern void set(Hash url_p1, string property_p2, LuaType value_p3, LuaTableBase options_p4); + + + /// + /// sets a named property of the specified game object or component, or a material constant + /// + /// @CSharpLua.Template = "go.set({0}, {1}, {2})" + /// + public static extern void set(Hash url_p1, Hash property_p2, LuaType value_p3); + + + /// + /// sets a named property of the specified game object or component, or a material constant + /// + /// @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" + /// + public static extern void set(Hash url_p1, Hash property_p2, LuaType value_p3, LuaTableBase options_p4); + + + /// + /// sets a named property of the specified game object or component, or a material constant + /// + /// @CSharpLua.Template = "go.set({0}, {1}, {2})" + /// + public static extern void set(Url url_p1, string property_p2, LuaType value_p3); + + + /// + /// sets a named property of the specified game object or component, or a material constant + /// + /// @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" + /// + public static extern void set(Url url_p1, string property_p2, LuaType value_p3, LuaTableBase options_p4); + + + /// + /// sets a named property of the specified game object or component, or a material constant + /// + /// @CSharpLua.Template = "go.set({0}, {1}, {2})" + /// + public static extern void set(Url url_p1, Hash property_p2, LuaType value_p3); + + + /// + /// sets a named property of the specified game object or component, or a material constant + /// + /// @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" + /// + public static extern void set(Url url_p1, Hash property_p2, LuaType value_p3, LuaTableBase options_p4); + + + /// + /// The position is relative the parent (if any). Use go.get_world_position to retrieve the global world position. + /// + /// @CSharpLua.Template = "go.get_position()" + /// + public static extern vector3 get_position(); + + + /// + /// The position is relative the parent (if any). Use go.get_world_position to retrieve the global world position. + /// + /// @CSharpLua.Template = "go.get_position({0})" + /// + public static extern vector3 get_position(string id_p1); + + + /// + /// The position is relative the parent (if any). Use go.get_world_position to retrieve the global world position. + /// + /// @CSharpLua.Template = "go.get_position({0})" + /// + public static extern vector3 get_position(Hash id_p1); + + + /// + /// The position is relative the parent (if any). Use go.get_world_position to retrieve the global world position. + /// + /// @CSharpLua.Template = "go.get_position({0})" + /// + public static extern vector3 get_position(Url id_p1); + + + /// + /// The rotation is relative to the parent (if any). Use go.get_world_rotation to retrieve the global world rotation. + /// + /// @CSharpLua.Template = "go.get_rotation()" + /// + public static extern Quaternion get_rotation(); + + + /// + /// The rotation is relative to the parent (if any). Use go.get_world_rotation to retrieve the global world rotation. + /// + /// @CSharpLua.Template = "go.get_rotation({0})" + /// + public static extern Quaternion get_rotation(string id_p1); + + + /// + /// The rotation is relative to the parent (if any). Use go.get_world_rotation to retrieve the global world rotation. + /// + /// @CSharpLua.Template = "go.get_rotation({0})" + /// + public static extern Quaternion get_rotation(Hash id_p1); + + + /// + /// The rotation is relative to the parent (if any). Use go.get_world_rotation to retrieve the global world rotation. + /// + /// @CSharpLua.Template = "go.get_rotation({0})" + /// + public static extern Quaternion get_rotation(Url id_p1); + + + /// + /// The scale is relative the parent (if any). Use go.get_world_scale to retrieve the global world 3D scale factor. + /// + /// @CSharpLua.Template = "go.get_scale()" + /// + public static extern vector3 get_scale(); + + + /// + /// The scale is relative the parent (if any). Use go.get_world_scale to retrieve the global world 3D scale factor. + /// + /// @CSharpLua.Template = "go.get_scale({0})" + /// + public static extern vector3 get_scale(string id_p1); + + + /// + /// The scale is relative the parent (if any). Use go.get_world_scale to retrieve the global world 3D scale factor. + /// + /// @CSharpLua.Template = "go.get_scale({0})" + /// + public static extern vector3 get_scale(Hash id_p1); + + + /// + /// The scale is relative the parent (if any). Use go.get_world_scale to retrieve the global world 3D scale factor. + /// + /// @CSharpLua.Template = "go.get_scale({0})" + /// + public static extern vector3 get_scale(Url id_p1); + + + /// + /// The uniform scale is relative the parent (if any). If the underlying scale vector is non-uniform the min element of the vector is returned as the uniform scale factor. + /// + /// @CSharpLua.Template = "go.get_scale_uniform()" + /// + public static extern double get_scale_uniform(); + + + /// + /// The uniform scale is relative the parent (if any). If the underlying scale vector is non-uniform the min element of the vector is returned as the uniform scale factor. + /// + /// @CSharpLua.Template = "go.get_scale_uniform({0})" + /// + public static extern double get_scale_uniform(string id_p1); + + + /// + /// The uniform scale is relative the parent (if any). If the underlying scale vector is non-uniform the min element of the vector is returned as the uniform scale factor. + /// + /// @CSharpLua.Template = "go.get_scale_uniform({0})" + /// + public static extern double get_scale_uniform(Hash id_p1); + + + /// + /// The uniform scale is relative the parent (if any). If the underlying scale vector is non-uniform the min element of the vector is returned as the uniform scale factor. + /// + /// @CSharpLua.Template = "go.get_scale_uniform({0})" + /// + public static extern double get_scale_uniform(Url id_p1); + + + /// + /// The position is relative to the parent (if any). The global world position cannot be manually set. + /// + /// @CSharpLua.Template = "go.set_position({0})" + /// + public static extern void set_position(vector3 position_p1); + + + /// + /// The position is relative to the parent (if any). The global world position cannot be manually set. + /// + /// @CSharpLua.Template = "go.set_position({0}, {1})" + /// + public static extern void set_position(vector3 position_p1, string id_p2); + + + /// + /// The position is relative to the parent (if any). The global world position cannot be manually set. + /// + /// @CSharpLua.Template = "go.set_position({0}, {1})" + /// + public static extern void set_position(vector3 position_p1, Hash id_p2); + + + /// + /// The position is relative to the parent (if any). The global world position cannot be manually set. + /// + /// @CSharpLua.Template = "go.set_position({0}, {1})" + /// + public static extern void set_position(vector3 position_p1, Url id_p2); + + + /// + /// The rotation is relative to the parent (if any). The global world rotation cannot be manually set. + /// + /// @CSharpLua.Template = "go.set_rotation({0})" + /// + public static extern void set_rotation(Quaternion rotation_p1); + + + /// + /// The rotation is relative to the parent (if any). The global world rotation cannot be manually set. + /// + /// @CSharpLua.Template = "go.set_rotation({0}, {1})" + /// + public static extern void set_rotation(Quaternion rotation_p1, string id_p2); + + + /// + /// The rotation is relative to the parent (if any). The global world rotation cannot be manually set. + /// + /// @CSharpLua.Template = "go.set_rotation({0}, {1})" + /// + public static extern void set_rotation(Quaternion rotation_p1, Hash id_p2); + + + /// + /// The rotation is relative to the parent (if any). The global world rotation cannot be manually set. + /// + /// @CSharpLua.Template = "go.set_rotation({0}, {1})" + /// + public static extern void set_rotation(Quaternion rotation_p1, Url id_p2); + + + /// + /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + /// Physics are currently not affected when setting scale from this function. + /// + /// @CSharpLua.Template = "go.set_scale({0})" + /// + public static extern void set_scale(double scale_p1); + + + /// + /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + /// Physics are currently not affected when setting scale from this function. + /// + /// @CSharpLua.Template = "go.set_scale({0}, {1})" + /// + public static extern void set_scale(double scale_p1, string id_p2); + + + /// + /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + /// Physics are currently not affected when setting scale from this function. + /// + /// @CSharpLua.Template = "go.set_scale({0}, {1})" + /// + public static extern void set_scale(double scale_p1, Hash id_p2); + + + /// + /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + /// Physics are currently not affected when setting scale from this function. + /// + /// @CSharpLua.Template = "go.set_scale({0}, {1})" + /// + public static extern void set_scale(double scale_p1, Url id_p2); + + + /// + /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + /// Physics are currently not affected when setting scale from this function. + /// + /// @CSharpLua.Template = "go.set_scale({0})" + /// + public static extern void set_scale(vector3 scale_p1); + + + /// + /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + /// Physics are currently not affected when setting scale from this function. + /// + /// @CSharpLua.Template = "go.set_scale({0}, {1})" + /// + public static extern void set_scale(vector3 scale_p1, string id_p2); + + + /// + /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + /// Physics are currently not affected when setting scale from this function. + /// + /// @CSharpLua.Template = "go.set_scale({0}, {1})" + /// + public static extern void set_scale(vector3 scale_p1, Hash id_p2); + + + /// + /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. + /// Physics are currently not affected when setting scale from this function. + /// + /// @CSharpLua.Template = "go.set_scale({0}, {1})" + /// + public static extern void set_scale(vector3 scale_p1, Url id_p2); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent()" + /// + public static extern void set_parent(); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0})" + /// + public static extern void set_parent(string id_p1); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1})" + /// + public static extern void set_parent(string id_p1, string parent_id_p2); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + /// + public static extern void set_parent(string id_p1, string parent_id_p2, bool keep_world_transform_p3); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1})" + /// + public static extern void set_parent(string id_p1, Hash parent_id_p2); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + /// + public static extern void set_parent(string id_p1, Hash parent_id_p2, bool keep_world_transform_p3); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1})" + /// + public static extern void set_parent(string id_p1, Url parent_id_p2); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + /// + public static extern void set_parent(string id_p1, Url parent_id_p2, bool keep_world_transform_p3); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0})" + /// + public static extern void set_parent(Hash id_p1); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1})" + /// + public static extern void set_parent(Hash id_p1, string parent_id_p2); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + /// + public static extern void set_parent(Hash id_p1, string parent_id_p2, bool keep_world_transform_p3); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1})" + /// + public static extern void set_parent(Hash id_p1, Hash parent_id_p2); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + /// + public static extern void set_parent(Hash id_p1, Hash parent_id_p2, bool keep_world_transform_p3); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1})" + /// + public static extern void set_parent(Hash id_p1, Url parent_id_p2); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + /// + public static extern void set_parent(Hash id_p1, Url parent_id_p2, bool keep_world_transform_p3); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0})" + /// + public static extern void set_parent(Url id_p1); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1})" + /// + public static extern void set_parent(Url id_p1, string parent_id_p2); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + /// + public static extern void set_parent(Url id_p1, string parent_id_p2, bool keep_world_transform_p3); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1})" + /// + public static extern void set_parent(Url id_p1, Hash parent_id_p2); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + /// + public static extern void set_parent(Url id_p1, Hash parent_id_p2, bool keep_world_transform_p3); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1})" + /// + public static extern void set_parent(Url id_p1, Url parent_id_p2); + + + /// + /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, + /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world + /// space. + /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This + /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the + /// engine. + /// + /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" + /// + public static extern void set_parent(Url id_p1, Url parent_id_p2, bool keep_world_transform_p3); + + + /// + /// Get the parent for a game object instance. + /// + /// @CSharpLua.Template = "go.get_parent()" + /// + public static extern Hash get_parent(); + + + /// + /// Get the parent for a game object instance. + /// + /// @CSharpLua.Template = "go.get_parent({0})" + /// + public static extern Hash get_parent(string id_p1); + + + /// + /// Get the parent for a game object instance. + /// + /// @CSharpLua.Template = "go.get_parent({0})" + /// + public static extern Hash get_parent(Hash id_p1); + + + /// + /// Get the parent for a game object instance. + /// + /// @CSharpLua.Template = "go.get_parent({0})" + /// + public static extern Hash get_parent(Url id_p1); + + + /// + /// The function will return the world position calculated at the end of the previous frame. + /// Use go.get_position to retrieve the position relative to the parent. + /// + /// @CSharpLua.Template = "go.get_world_position()" + /// + public static extern vector3 get_world_position(); + + + /// + /// The function will return the world position calculated at the end of the previous frame. + /// Use go.get_position to retrieve the position relative to the parent. + /// + /// @CSharpLua.Template = "go.get_world_position({0})" + /// + public static extern vector3 get_world_position(string id_p1); + + + /// + /// The function will return the world position calculated at the end of the previous frame. + /// Use go.get_position to retrieve the position relative to the parent. + /// + /// @CSharpLua.Template = "go.get_world_position({0})" + /// + public static extern vector3 get_world_position(Hash id_p1); + + + /// + /// The function will return the world position calculated at the end of the previous frame. + /// Use go.get_position to retrieve the position relative to the parent. + /// + /// @CSharpLua.Template = "go.get_world_position({0})" + /// + public static extern vector3 get_world_position(Url id_p1); + + + /// + /// The function will return the world rotation calculated at the end of the previous frame. + /// Use go.get_rotation to retrieve the rotation relative to the parent. + /// + /// @CSharpLua.Template = "go.get_world_rotation()" + /// + public static extern Quaternion get_world_rotation(); + + + /// + /// The function will return the world rotation calculated at the end of the previous frame. + /// Use go.get_rotation to retrieve the rotation relative to the parent. + /// + /// @CSharpLua.Template = "go.get_world_rotation({0})" + /// + public static extern Quaternion get_world_rotation(string id_p1); + + + /// + /// The function will return the world rotation calculated at the end of the previous frame. + /// Use go.get_rotation to retrieve the rotation relative to the parent. + /// + /// @CSharpLua.Template = "go.get_world_rotation({0})" + /// + public static extern Quaternion get_world_rotation(Hash id_p1); + + + /// + /// The function will return the world rotation calculated at the end of the previous frame. + /// Use go.get_rotation to retrieve the rotation relative to the parent. + /// + /// @CSharpLua.Template = "go.get_world_rotation({0})" + /// + public static extern Quaternion get_world_rotation(Url id_p1); + + + /// + /// The function will return the world 3D scale factor calculated at the end of the previous frame. + /// Use go.get_scale to retrieve the 3D scale factor relative to the parent. + /// This vector is derived by decomposing the transformation matrix and should be used with care. + /// For most cases it should be fine to use go.get_world_scale_uniform instead. + /// + /// @CSharpLua.Template = "go.get_world_scale()" + /// + public static extern vector3 get_world_scale(); + + + /// + /// The function will return the world 3D scale factor calculated at the end of the previous frame. + /// Use go.get_scale to retrieve the 3D scale factor relative to the parent. + /// This vector is derived by decomposing the transformation matrix and should be used with care. + /// For most cases it should be fine to use go.get_world_scale_uniform instead. + /// + /// @CSharpLua.Template = "go.get_world_scale({0})" + /// + public static extern vector3 get_world_scale(string id_p1); + + + /// + /// The function will return the world 3D scale factor calculated at the end of the previous frame. + /// Use go.get_scale to retrieve the 3D scale factor relative to the parent. + /// This vector is derived by decomposing the transformation matrix and should be used with care. + /// For most cases it should be fine to use go.get_world_scale_uniform instead. + /// + /// @CSharpLua.Template = "go.get_world_scale({0})" + /// + public static extern vector3 get_world_scale(Hash id_p1); + + + /// + /// The function will return the world 3D scale factor calculated at the end of the previous frame. + /// Use go.get_scale to retrieve the 3D scale factor relative to the parent. + /// This vector is derived by decomposing the transformation matrix and should be used with care. + /// For most cases it should be fine to use go.get_world_scale_uniform instead. + /// + /// @CSharpLua.Template = "go.get_world_scale({0})" + /// + public static extern vector3 get_world_scale(Url id_p1); + + + /// + /// The function will return the world scale factor calculated at the end of the previous frame. + /// Use go.get_scale_uniform to retrieve the scale factor relative to the parent. + /// + /// @CSharpLua.Template = "go.get_world_scale_uniform()" + /// + public static extern double get_world_scale_uniform(); + + + /// + /// The function will return the world scale factor calculated at the end of the previous frame. + /// Use go.get_scale_uniform to retrieve the scale factor relative to the parent. + /// + /// @CSharpLua.Template = "go.get_world_scale_uniform({0})" + /// + public static extern double get_world_scale_uniform(string id_p1); + + + /// + /// The function will return the world scale factor calculated at the end of the previous frame. + /// Use go.get_scale_uniform to retrieve the scale factor relative to the parent. + /// + /// @CSharpLua.Template = "go.get_world_scale_uniform({0})" + /// + public static extern double get_world_scale_uniform(Hash id_p1); + + + /// + /// The function will return the world scale factor calculated at the end of the previous frame. + /// Use go.get_scale_uniform to retrieve the scale factor relative to the parent. + /// + /// @CSharpLua.Template = "go.get_world_scale_uniform({0})" + /// + public static extern double get_world_scale_uniform(Url id_p1); + + + /// + /// The function will return the world transform matrix calculated at the end of the previous frame. + /// + /// @CSharpLua.Template = "go.get_world_transform()" + /// + public static extern Matrix4 get_world_transform(); + + + /// + /// The function will return the world transform matrix calculated at the end of the previous frame. + /// + /// @CSharpLua.Template = "go.get_world_transform({0})" + /// + public static extern Matrix4 get_world_transform(string id_p1); + + + /// + /// The function will return the world transform matrix calculated at the end of the previous frame. + /// + /// @CSharpLua.Template = "go.get_world_transform({0})" + /// + public static extern Matrix4 get_world_transform(Hash id_p1); + + + /// + /// The function will return the world transform matrix calculated at the end of the previous frame. + /// + /// @CSharpLua.Template = "go.get_world_transform({0})" + /// + public static extern Matrix4 get_world_transform(Url id_p1); + + + /// + /// Returns or constructs an instance identifier. The instance id is a hash + /// of the absolute path to the instance. + ///
    + ///
  • If path is specified, it can either be absolute or relative to the instance of the calling script.
  • + ///
  • If path is not specified, the id of the game object instance the script is attached to will be returned.
  • + ///
+ /// + /// @CSharpLua.Template = "go.get_id()" + ///
+ public static extern Hash get_id(); + + + /// + /// Returns or constructs an instance identifier. The instance id is a hash + /// of the absolute path to the instance. + ///
    + ///
  • If path is specified, it can either be absolute or relative to the instance of the calling script.
  • + ///
  • If path is not specified, the id of the game object instance the script is attached to will be returned.
  • + ///
+ /// + /// @CSharpLua.Template = "go.get_id({0})" + ///
+ public static extern Hash get_id(string path_p1); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7); + + + /// + /// This is only supported for numerical properties. If the node property is already being + /// animated, that animation will be canceled and replaced by the new one. + /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. + /// If you call go.animate() from a game object's final() function, + /// any passed complete_function will be ignored and never called upon animation completion. + /// See the properties guide for which properties can be animated and the animation guide for how + /// them. + /// + /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); + + + /// + /// By calling this function, all or specified stored property animations of the game object or component will be canceled. + /// See the properties guide for which properties can be animated and the animation guide for how to animate them. + /// + /// @CSharpLua.Template = "go.cancel_animations({0})" + /// + public static extern void cancel_animations(string url_p1); + + + /// + /// By calling this function, all or specified stored property animations of the game object or component will be canceled. + /// See the properties guide for which properties can be animated and the animation guide for how to animate them. + /// + /// @CSharpLua.Template = "go.cancel_animations({0}, {1})" + /// + public static extern void cancel_animations(string url_p1, string property_p2); + + + /// + /// By calling this function, all or specified stored property animations of the game object or component will be canceled. + /// See the properties guide for which properties can be animated and the animation guide for how to animate them. + /// + /// @CSharpLua.Template = "go.cancel_animations({0}, {1})" + /// + public static extern void cancel_animations(string url_p1, Hash property_p2); + + + /// + /// By calling this function, all or specified stored property animations of the game object or component will be canceled. + /// See the properties guide for which properties can be animated and the animation guide for how to animate them. + /// + /// @CSharpLua.Template = "go.cancel_animations({0})" + /// + public static extern void cancel_animations(Hash url_p1); + + + /// + /// By calling this function, all or specified stored property animations of the game object or component will be canceled. + /// See the properties guide for which properties can be animated and the animation guide for how to animate them. + /// + /// @CSharpLua.Template = "go.cancel_animations({0}, {1})" + /// + public static extern void cancel_animations(Hash url_p1, string property_p2); + + + /// + /// By calling this function, all or specified stored property animations of the game object or component will be canceled. + /// See the properties guide for which properties can be animated and the animation guide for how to animate them. + /// + /// @CSharpLua.Template = "go.cancel_animations({0}, {1})" + /// + public static extern void cancel_animations(Hash url_p1, Hash property_p2); + + + /// + /// By calling this function, all or specified stored property animations of the game object or component will be canceled. + /// See the properties guide for which properties can be animated and the animation guide for how to animate them. + /// + /// @CSharpLua.Template = "go.cancel_animations({0})" + /// + public static extern void cancel_animations(Url url_p1); + + + /// + /// By calling this function, all or specified stored property animations of the game object or component will be canceled. + /// See the properties guide for which properties can be animated and the animation guide for how to animate them. + /// + /// @CSharpLua.Template = "go.cancel_animations({0}, {1})" + /// + public static extern void cancel_animations(Url url_p1, string property_p2); + + + /// + /// By calling this function, all or specified stored property animations of the game object or component will be canceled. + /// See the properties guide for which properties can be animated and the animation guide for how to animate them. + /// + /// @CSharpLua.Template = "go.cancel_animations({0}, {1})" + /// + public static extern void cancel_animations(Url url_p1, Hash property_p2); + + + /// + /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that + /// the game object(s) are scheduled for deletion which will happen at the end of the current + /// frame. Note that game objects scheduled for deletion will be counted against + /// max_instances in "game.project" until they are actually removed. + /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + /// + /// @CSharpLua.Template = "go.delete()" + /// + public static extern void delete(); + + + /// + /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that + /// the game object(s) are scheduled for deletion which will happen at the end of the current + /// frame. Note that game objects scheduled for deletion will be counted against + /// max_instances in "game.project" until they are actually removed. + /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + /// + /// @CSharpLua.Template = "go.delete({0})" + /// + public static extern void delete(string id_p1); + + + /// + /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that + /// the game object(s) are scheduled for deletion which will happen at the end of the current + /// frame. Note that game objects scheduled for deletion will be counted against + /// max_instances in "game.project" until they are actually removed. + /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + /// + /// @CSharpLua.Template = "go.delete({0}, {1})" + /// + public static extern void delete(string id_p1, bool recursive_p2); + + + /// + /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that + /// the game object(s) are scheduled for deletion which will happen at the end of the current + /// frame. Note that game objects scheduled for deletion will be counted against + /// max_instances in "game.project" until they are actually removed. + /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + /// + /// @CSharpLua.Template = "go.delete({0})" + /// + public static extern void delete(Hash id_p1); + + + /// + /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that + /// the game object(s) are scheduled for deletion which will happen at the end of the current + /// frame. Note that game objects scheduled for deletion will be counted against + /// max_instances in "game.project" until they are actually removed. + /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + /// + /// @CSharpLua.Template = "go.delete({0}, {1})" + /// + public static extern void delete(Hash id_p1, bool recursive_p2); + + + /// + /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that + /// the game object(s) are scheduled for deletion which will happen at the end of the current + /// frame. Note that game objects scheduled for deletion will be counted against + /// max_instances in "game.project" until they are actually removed. + /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + /// + /// @CSharpLua.Template = "go.delete({0})" + /// + public static extern void delete(Url id_p1); + + + /// + /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that + /// the game object(s) are scheduled for deletion which will happen at the end of the current + /// frame. Note that game objects scheduled for deletion will be counted against + /// max_instances in "game.project" until they are actually removed. + /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + /// + /// @CSharpLua.Template = "go.delete({0}, {1})" + /// + public static extern void delete(Url id_p1, bool recursive_p2); + + + /// + /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that + /// the game object(s) are scheduled for deletion which will happen at the end of the current + /// frame. Note that game objects scheduled for deletion will be counted against + /// max_instances in "game.project" until they are actually removed. + /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + /// + /// @CSharpLua.Template = "go.delete({0})" + /// + public static extern void delete(LuaTableBase id_p1); + + + /// + /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that + /// the game object(s) are scheduled for deletion which will happen at the end of the current + /// frame. Note that game objects scheduled for deletion will be counted against + /// max_instances in "game.project" until they are actually removed. + /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). + /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). + /// + /// @CSharpLua.Template = "go.delete({0}, {1})" + /// + public static extern void delete(LuaTableBase id_p1, bool recursive_p2); + + + /// + /// This function defines a property which can then be used in the script through the self-reference. + /// The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. + /// Note that you can only use this function outside any callback-functions like init and update. + /// + /// @CSharpLua.Template = "go.property({0}, {1})" + /// + public static extern void property(string name_p1, double value_p2); + + + /// + /// This function defines a property which can then be used in the script through the self-reference. + /// The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. + /// Note that you can only use this function outside any callback-functions like init and update. + /// + /// @CSharpLua.Template = "go.property({0}, {1})" + /// + public static extern void property(string name_p1, Hash value_p2); + + + /// + /// This function defines a property which can then be used in the script through the self-reference. + /// The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. + /// Note that you can only use this function outside any callback-functions like init and update. + /// + /// @CSharpLua.Template = "go.property({0}, {1})" + /// + public static extern void property(string name_p1, Url value_p2); + + + /// + /// This function defines a property which can then be used in the script through the self-reference. + /// The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. + /// Note that you can only use this function outside any callback-functions like init and update. + /// + /// @CSharpLua.Template = "go.property({0}, {1})" + /// + public static extern void property(string name_p1, vector3 value_p2); + + + /// + /// This function defines a property which can then be used in the script through the self-reference. + /// The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. + /// Note that you can only use this function outside any callback-functions like init and update. + /// + /// @CSharpLua.Template = "go.property({0}, {1})" + /// + public static extern void property(string name_p1, vector4 value_p2); + + + /// + /// This function defines a property which can then be used in the script through the self-reference. + /// The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. + /// Note that you can only use this function outside any callback-functions like init and update. + /// + /// @CSharpLua.Template = "go.property({0}, {1})" + /// + public static extern void property(string name_p1, Quaternion value_p2); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/gui.cs b/DefoldSharpLib/gui.cs new file mode 100644 index 0000000..4903b6a --- /dev/null +++ b/DefoldSharpLib/gui.cs @@ -0,0 +1,1780 @@ +using System; + +namespace DefoldSharp +{ + /// + /// GUI API documentation + /// + /// + public static class Gui + { + #region Defold API + #region Messages + /// + /// + public class layout_changed_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("layout_changed"); + public override Hash FetchCode() => __CODE__; + + public Hash id; + public Hash previous_id; + } + + + #endregion Messages + + + /// + /// Retrieves the node with the specified id. + /// + /// @CSharpLua.Template = "gui.get_node({0})" + /// + public static extern Node get_node(string id_p1); + + + /// + /// Retrieves the node with the specified id. + /// + /// @CSharpLua.Template = "gui.get_node({0})" + /// + public static extern Node get_node(Hash id_p1); + + + /// + /// Retrieves the id of the specified node. + /// + /// @CSharpLua.Template = "gui.get_id({0})" + /// + public static extern Hash get_id(Node node_p1); + + + /// + /// Set the id of the specicied node to a new value. + /// Nodes created with the gui.new_*_node() functions get + /// an empty id. This function allows you to give dynamically + /// created nodes an id. + /// No checking is done on the uniqueness of supplied ids. + /// It is up to you to make sure you use unique ids. + /// + /// @CSharpLua.Template = "gui.set_id({0}, {1})" + /// + public static extern void set_id(Node node_p1, string id_p2); + + + /// + /// Set the id of the specicied node to a new value. + /// Nodes created with the gui.new_*_node() functions get + /// an empty id. This function allows you to give dynamically + /// created nodes an id. + /// No checking is done on the uniqueness of supplied ids. + /// It is up to you to make sure you use unique ids. + /// + /// @CSharpLua.Template = "gui.set_id({0}, {1})" + /// + public static extern void set_id(Node node_p1, Hash id_p2); + + + /// + /// Retrieve the index of the specified node among its siblings. + /// The index defines the order in which a node appear in a GUI scene. + /// Higher index means the node is drawn on top of lower indexed nodes. + /// + /// @CSharpLua.Template = "gui.get_index({0})" + /// + public static extern double get_index(Node node_p1); + + + /// + /// Deletes the specified node. Any child nodes of the specified node will be + /// recursively deleted. + /// + /// @CSharpLua.Template = "gui.delete_node({0})" + /// + public static extern void delete_node(Node node_p1); + + + /// + /// This starts an animation of a node property according to the specified parameters. + /// If the node property is already being animated, that animation will be canceled and + /// replaced by the new one. Note however that several different node properties + /// can be animated simultaneously. Use gui.cancel_animation to stop the animation + /// before it has completed. + /// Composite properties of type vector3, vector4 or quaternion + /// also expose their sub-components (x, y, z and w). + /// You can address the components individually by suffixing the name with a dot '.' + /// and the name of the component. + /// For instance, "position.x" (the position x coordinate) or "color.w" + /// (the color alpha value). + /// If a complete_function (Lua function) is specified, that function will be called + /// when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced + /// together. See the examples below for more information. + /// + /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4})" + /// + public static extern void animate(Node node_p1, string property_p2, double to_p3, Easing easing_p4, double duration_p5); + + + /// + /// This starts an animation of a node property according to the specified parameters. + /// If the node property is already being animated, that animation will be canceled and + /// replaced by the new one. Note however that several different node properties + /// can be animated simultaneously. Use gui.cancel_animation to stop the animation + /// before it has completed. + /// Composite properties of type vector3, vector4 or quaternion + /// also expose their sub-components (x, y, z and w). + /// You can address the components individually by suffixing the name with a dot '.' + /// and the name of the component. + /// For instance, "position.x" (the position x coordinate) or "color.w" + /// (the color alpha value). + /// If a complete_function (Lua function) is specified, that function will be called + /// when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced + /// together. See the examples below for more information. + /// + /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Node node_p1, string property_p2, double to_p3, Easing easing_p4, double duration_p5, double delay_p6); + + + /// + /// This starts an animation of a node property according to the specified parameters. + /// If the node property is already being animated, that animation will be canceled and + /// replaced by the new one. Note however that several different node properties + /// can be animated simultaneously. Use gui.cancel_animation to stop the animation + /// before it has completed. + /// Composite properties of type vector3, vector4 or quaternion + /// also expose their sub-components (x, y, z and w). + /// You can address the components individually by suffixing the name with a dot '.' + /// and the name of the component. + /// For instance, "position.x" (the position x coordinate) or "color.w" + /// (the color alpha value). + /// If a complete_function (Lua function) is specified, that function will be called + /// when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced + /// together. See the examples below for more information. + /// + /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Node node_p1, string property_p2, double to_p3, Easing easing_p4, double duration_p5, double delay_p6, Action complete_function_p7); + + + /// + /// This starts an animation of a node property according to the specified parameters. + /// If the node property is already being animated, that animation will be canceled and + /// replaced by the new one. Note however that several different node properties + /// can be animated simultaneously. Use gui.cancel_animation to stop the animation + /// before it has completed. + /// Composite properties of type vector3, vector4 or quaternion + /// also expose their sub-components (x, y, z and w). + /// You can address the components individually by suffixing the name with a dot '.' + /// and the name of the component. + /// For instance, "position.x" (the position x coordinate) or "color.w" + /// (the color alpha value). + /// If a complete_function (Lua function) is specified, that function will be called + /// when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced + /// together. See the examples below for more information. + /// + /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Node node_p1, string property_p2, double to_p3, Easing easing_p4, double duration_p5, double delay_p6, Action complete_function_p7, GuiPlaybackMode playback_p8); + + + /// + /// This starts an animation of a node property according to the specified parameters. + /// If the node property is already being animated, that animation will be canceled and + /// replaced by the new one. Note however that several different node properties + /// can be animated simultaneously. Use gui.cancel_animation to stop the animation + /// before it has completed. + /// Composite properties of type vector3, vector4 or quaternion + /// also expose their sub-components (x, y, z and w). + /// You can address the components individually by suffixing the name with a dot '.' + /// and the name of the component. + /// For instance, "position.x" (the position x coordinate) or "color.w" + /// (the color alpha value). + /// If a complete_function (Lua function) is specified, that function will be called + /// when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced + /// together. See the examples below for more information. + /// + /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4})" + /// + public static extern void animate(Node node_p1, string property_p2, vector3 to_p3, Easing easing_p4, double duration_p5); + + + /// + /// This starts an animation of a node property according to the specified parameters. + /// If the node property is already being animated, that animation will be canceled and + /// replaced by the new one. Note however that several different node properties + /// can be animated simultaneously. Use gui.cancel_animation to stop the animation + /// before it has completed. + /// Composite properties of type vector3, vector4 or quaternion + /// also expose their sub-components (x, y, z and w). + /// You can address the components individually by suffixing the name with a dot '.' + /// and the name of the component. + /// For instance, "position.x" (the position x coordinate) or "color.w" + /// (the color alpha value). + /// If a complete_function (Lua function) is specified, that function will be called + /// when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced + /// together. See the examples below for more information. + /// + /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Node node_p1, string property_p2, vector3 to_p3, Easing easing_p4, double duration_p5, double delay_p6); + + + /// + /// This starts an animation of a node property according to the specified parameters. + /// If the node property is already being animated, that animation will be canceled and + /// replaced by the new one. Note however that several different node properties + /// can be animated simultaneously. Use gui.cancel_animation to stop the animation + /// before it has completed. + /// Composite properties of type vector3, vector4 or quaternion + /// also expose their sub-components (x, y, z and w). + /// You can address the components individually by suffixing the name with a dot '.' + /// and the name of the component. + /// For instance, "position.x" (the position x coordinate) or "color.w" + /// (the color alpha value). + /// If a complete_function (Lua function) is specified, that function will be called + /// when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced + /// together. See the examples below for more information. + /// + /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Node node_p1, string property_p2, vector3 to_p3, Easing easing_p4, double duration_p5, double delay_p6, Action complete_function_p7); + + + /// + /// This starts an animation of a node property according to the specified parameters. + /// If the node property is already being animated, that animation will be canceled and + /// replaced by the new one. Note however that several different node properties + /// can be animated simultaneously. Use gui.cancel_animation to stop the animation + /// before it has completed. + /// Composite properties of type vector3, vector4 or quaternion + /// also expose their sub-components (x, y, z and w). + /// You can address the components individually by suffixing the name with a dot '.' + /// and the name of the component. + /// For instance, "position.x" (the position x coordinate) or "color.w" + /// (the color alpha value). + /// If a complete_function (Lua function) is specified, that function will be called + /// when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced + /// together. See the examples below for more information. + /// + /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Node node_p1, string property_p2, vector3 to_p3, Easing easing_p4, double duration_p5, double delay_p6, Action complete_function_p7, GuiPlaybackMode playback_p8); + + + /// + /// This starts an animation of a node property according to the specified parameters. + /// If the node property is already being animated, that animation will be canceled and + /// replaced by the new one. Note however that several different node properties + /// can be animated simultaneously. Use gui.cancel_animation to stop the animation + /// before it has completed. + /// Composite properties of type vector3, vector4 or quaternion + /// also expose their sub-components (x, y, z and w). + /// You can address the components individually by suffixing the name with a dot '.' + /// and the name of the component. + /// For instance, "position.x" (the position x coordinate) or "color.w" + /// (the color alpha value). + /// If a complete_function (Lua function) is specified, that function will be called + /// when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced + /// together. See the examples below for more information. + /// + /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4})" + /// + public static extern void animate(Node node_p1, string property_p2, vector4 to_p3, Easing easing_p4, double duration_p5); + + + /// + /// This starts an animation of a node property according to the specified parameters. + /// If the node property is already being animated, that animation will be canceled and + /// replaced by the new one. Note however that several different node properties + /// can be animated simultaneously. Use gui.cancel_animation to stop the animation + /// before it has completed. + /// Composite properties of type vector3, vector4 or quaternion + /// also expose their sub-components (x, y, z and w). + /// You can address the components individually by suffixing the name with a dot '.' + /// and the name of the component. + /// For instance, "position.x" (the position x coordinate) or "color.w" + /// (the color alpha value). + /// If a complete_function (Lua function) is specified, that function will be called + /// when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced + /// together. See the examples below for more information. + /// + /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void animate(Node node_p1, string property_p2, vector4 to_p3, Easing easing_p4, double duration_p5, double delay_p6); + + + /// + /// This starts an animation of a node property according to the specified parameters. + /// If the node property is already being animated, that animation will be canceled and + /// replaced by the new one. Note however that several different node properties + /// can be animated simultaneously. Use gui.cancel_animation to stop the animation + /// before it has completed. + /// Composite properties of type vector3, vector4 or quaternion + /// also expose their sub-components (x, y, z and w). + /// You can address the components individually by suffixing the name with a dot '.' + /// and the name of the component. + /// For instance, "position.x" (the position x coordinate) or "color.w" + /// (the color alpha value). + /// If a complete_function (Lua function) is specified, that function will be called + /// when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced + /// together. See the examples below for more information. + /// + /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void animate(Node node_p1, string property_p2, vector4 to_p3, Easing easing_p4, double duration_p5, double delay_p6, Action complete_function_p7); + + + /// + /// This starts an animation of a node property according to the specified parameters. + /// If the node property is already being animated, that animation will be canceled and + /// replaced by the new one. Note however that several different node properties + /// can be animated simultaneously. Use gui.cancel_animation to stop the animation + /// before it has completed. + /// Composite properties of type vector3, vector4 or quaternion + /// also expose their sub-components (x, y, z and w). + /// You can address the components individually by suffixing the name with a dot '.' + /// and the name of the component. + /// For instance, "position.x" (the position x coordinate) or "color.w" + /// (the color alpha value). + /// If a complete_function (Lua function) is specified, that function will be called + /// when the animation has completed. + /// By starting a new animation in that function, several animations can be sequenced + /// together. See the examples below for more information. + /// + /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" + /// + public static extern void animate(Node node_p1, string property_p2, vector4 to_p3, Easing easing_p4, double duration_p5, double delay_p6, Action complete_function_p7, GuiPlaybackMode playback_p8); + + + /// + /// If an animation of the specified node is currently running (started by gui.animate), it will immediately be canceled. + /// + /// @CSharpLua.Template = "gui.cancel_animation({0}, {1})" + /// + public static extern void cancel_animation(Node node_p1, string property_p2); + + + /// + /// Dynamically create a new box node. + /// + /// @CSharpLua.Template = "gui.new_box_node({0}, {1})" + /// + public static extern Node new_box_node(vector3 pos_p1, vector3 size_p2); + + + /// + /// Dynamically create a new box node. + /// + /// @CSharpLua.Template = "gui.new_box_node({0}, {1})" + /// + public static extern Node new_box_node(vector4 pos_p1, vector3 size_p2); + + + /// + /// Dynamically create a new text node. + /// + /// @CSharpLua.Template = "gui.new_text_node({0}, {1})" + /// + public static extern Node new_text_node(vector3 pos_p1, string text_p2); + + + /// + /// Dynamically create a new text node. + /// + /// @CSharpLua.Template = "gui.new_text_node({0}, {1})" + /// + public static extern Node new_text_node(vector4 pos_p1, string text_p2); + + + /// + /// Dynamically create a new pie node. + /// + /// @CSharpLua.Template = "gui.new_pie_node({0}, {1})" + /// + public static extern Node new_pie_node(vector3 pos_p1, vector3 size_p2); + + + /// + /// Dynamically create a new pie node. + /// + /// @CSharpLua.Template = "gui.new_pie_node({0}, {1})" + /// + public static extern Node new_pie_node(vector4 pos_p1, vector3 size_p2); + + + /// + /// Returns the text value of a text node. This is only useful for text nodes. + /// + /// @CSharpLua.Template = "gui.get_text({0})" + /// + public static extern string get_text(Node node_p1); + + + /// + /// Set the text value of a text node. This is only useful for text nodes. + /// + /// @CSharpLua.Template = "gui.set_text({0}, {1})" + /// + public static extern void set_text(Node node_p1, string text_p2); + + + /// + /// Returns whether a text node is in line-break mode or not. + /// This is only useful for text nodes. + /// + /// @CSharpLua.Template = "gui.get_line_break({0})" + /// + public static extern bool get_line_break(Node node_p1); + + + /// + /// Sets the line-break mode on a text node. + /// This is only useful for text nodes. + /// + /// @CSharpLua.Template = "gui.set_line_break({0}, {1})" + /// + public static extern void set_line_break(Node node_p1, bool line_break_p2); + + + /// + /// Returns the blend mode of a node. + /// Blend mode defines how the node will be blended with the background. + /// + /// @CSharpLua.Template = "gui.get_blend_mode()" + /// + public static extern BlendMode get_blend_mode(); + + + /// + /// Set the blend mode of a node. + /// Blend mode defines how the node will be blended with the background. + /// + /// @CSharpLua.Template = "gui.set_blend_mode({0}, {1})" + /// + public static extern void set_blend_mode(Node node_p1, BlendMode blend_mode_p2); + + + /// + /// Returns the texture of a node. + /// This is currently only useful for box or pie nodes. + /// The texture must be mapped to the gui scene in the gui editor. + /// + /// @CSharpLua.Template = "gui.get_texture({0})" + /// + public static extern Hash get_texture(Node node_p1); + + + /// + /// Set the texture on a box or pie node. The texture must be mapped to + /// the gui scene in the gui editor. The function points out which texture + /// the node should render from. If the texture is an atlas, further + /// information is needed to select which image/animation in the atlas + /// to render. In such cases, use gui.play_flipbook() in + /// addition to this function. + /// + /// @CSharpLua.Template = "gui.set_texture({0}, {1})" + /// + public static extern void set_texture(Node node_p1, string texture_p2); + + + /// + /// Set the texture on a box or pie node. The texture must be mapped to + /// the gui scene in the gui editor. The function points out which texture + /// the node should render from. If the texture is an atlas, further + /// information is needed to select which image/animation in the atlas + /// to render. In such cases, use gui.play_flipbook() in + /// addition to this function. + /// + /// @CSharpLua.Template = "gui.set_texture({0}, {1})" + /// + public static extern void set_texture(Node node_p1, Hash texture_p2); + + + /// + /// Get node flipbook animation. + /// + /// @CSharpLua.Template = "gui.get_flipbook({0})" + /// + public static extern Hash get_flipbook(Node node_p1); + + + /// + /// Play flipbook animation on a box or pie node. + /// The current node texture must contain the animation. + /// Use this function to set one-frame still images on the node. + /// + /// @CSharpLua.Template = "gui.play_flipbook({0}, {1})" + /// + public static extern void play_flipbook(Node node_p1, string animation_p2); + + + /// + /// Play flipbook animation on a box or pie node. + /// The current node texture must contain the animation. + /// Use this function to set one-frame still images on the node. + /// + /// @CSharpLua.Template = "gui.play_flipbook({0}, {1}, {2})" + /// + public static extern void play_flipbook(Node node_p1, string animation_p2, Action complete_function_p3); + + + /// + /// Play flipbook animation on a box or pie node. + /// The current node texture must contain the animation. + /// Use this function to set one-frame still images on the node. + /// + /// @CSharpLua.Template = "gui.play_flipbook({0}, {1}, {2}, {3})" + /// + public static extern void play_flipbook(Node node_p1, string animation_p2, Action complete_function_p3, LuaTableBase play_properties_p4); + + + /// + /// Play flipbook animation on a box or pie node. + /// The current node texture must contain the animation. + /// Use this function to set one-frame still images on the node. + /// + /// @CSharpLua.Template = "gui.play_flipbook({0}, {1})" + /// + public static extern void play_flipbook(Node node_p1, Hash animation_p2); + + + /// + /// Play flipbook animation on a box or pie node. + /// The current node texture must contain the animation. + /// Use this function to set one-frame still images on the node. + /// + /// @CSharpLua.Template = "gui.play_flipbook({0}, {1}, {2})" + /// + public static extern void play_flipbook(Node node_p1, Hash animation_p2, Action complete_function_p3); + + + /// + /// Play flipbook animation on a box or pie node. + /// The current node texture must contain the animation. + /// Use this function to set one-frame still images on the node. + /// + /// @CSharpLua.Template = "gui.play_flipbook({0}, {1}, {2}, {3})" + /// + public static extern void play_flipbook(Node node_p1, Hash animation_p2, Action complete_function_p3, LuaTableBase play_properties_p4); + + + /// + /// Cancels any running flipbook animation on the specified node. + /// + /// @CSharpLua.Template = "gui.cancel_flipbook({0})" + /// + public static extern void cancel_flipbook(Node node_p1); + + + /// + /// Dynamically create a new texture. + /// + /// @CSharpLua.Template = "gui.new_texture({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern bool new_texture(string texture_p1, double width_p2, double height_p3, GuiTextureType type_p4, string buffer_p5, bool flip_p6, out double code_o1); + + + /// + /// Dynamically create a new texture. + /// + /// @CSharpLua.Template = "gui.new_texture({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern bool new_texture(Hash texture_p1, double width_p2, double height_p3, GuiTextureType type_p4, string buffer_p5, bool flip_p6, out double code_o1); + + + /// + /// Delete a dynamically created texture. + /// + /// @CSharpLua.Template = "gui.delete_texture({0})" + /// + public static extern void delete_texture(string texture_p1); + + + /// + /// Delete a dynamically created texture. + /// + /// @CSharpLua.Template = "gui.delete_texture({0})" + /// + public static extern void delete_texture(Hash texture_p1); + + + /// + /// Set the texture buffer data for a dynamically created texture. + /// + /// @CSharpLua.Template = "gui.set_texture_data({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern bool set_texture_data(string texture_p1, double width_p2, double height_p3, GuiTextureType type_p4, string buffer_p5, bool flip_p6); + + + /// + /// Set the texture buffer data for a dynamically created texture. + /// + /// @CSharpLua.Template = "gui.set_texture_data({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern bool set_texture_data(Hash texture_p1, double width_p2, double height_p3, GuiTextureType type_p4, string buffer_p5, bool flip_p6); + + + /// + /// This is only useful for text nodes. The font must be mapped to the gui scene in the gui editor. + /// + /// @CSharpLua.Template = "gui.get_font({0})" + /// + public static extern Hash get_font(Node node_p1); + + + /// + /// This is only useful for text nodes. The font must be mapped to the gui scene in the gui editor. + /// + /// @CSharpLua.Template = "gui.get_font_resource({0})" + /// + public static extern Hash get_font_resource(Hash font_name_p1); + + + /// + /// This is only useful for text nodes. The font must be mapped to the gui scene in the gui editor. + /// + /// @CSharpLua.Template = "gui.get_font_resource({0})" + /// + public static extern Hash get_font_resource(string font_name_p1); + + + /// + /// This is only useful for text nodes. + /// The font must be mapped to the gui scene in the gui editor. + /// + /// @CSharpLua.Template = "gui.set_font({0}, {1})" + /// + public static extern void set_font(Node node_p1, string font_p2); + + + /// + /// This is only useful for text nodes. + /// The font must be mapped to the gui scene in the gui editor. + /// + /// @CSharpLua.Template = "gui.set_font({0}, {1})" + /// + public static extern void set_font(Node node_p1, Hash font_p2); + + + /// + /// The layer must be mapped to the gui scene in the gui editor. + /// + /// @CSharpLua.Template = "gui.get_layer({0})" + /// + public static extern Hash get_layer(Node node_p1); + + + /// + /// The layer must be mapped to the gui scene in the gui editor. + /// + /// @CSharpLua.Template = "gui.set_layer({0}, {1})" + /// + public static extern void set_layer(Node node_p1, string layer_p2); + + + /// + /// The layer must be mapped to the gui scene in the gui editor. + /// + /// @CSharpLua.Template = "gui.set_layer({0}, {1})" + /// + public static extern void set_layer(Node node_p1, Hash layer_p2); + + + /// + /// gets the scene current layout + /// + /// @CSharpLua.Template = "gui.get_layout()" + /// + public static extern Hash get_layout(); + + + /// + /// Clipping mode defines how the node will clip it's children nodes + /// + /// @CSharpLua.Template = "gui.get_clipping_mode()" + /// + public static extern ClippingMode get_clipping_mode(); + + + /// + /// Clipping mode defines how the node will clip it's children nodes + /// + /// @CSharpLua.Template = "gui.set_clipping_mode({0}, {1})" + /// + public static extern void set_clipping_mode(Node node_p1, ClippingMode clipping_mode_p2); + + + /// + /// If node is set as visible clipping node, it will be shown as well as clipping. Otherwise, it will only clip but not show visually. + /// + /// @CSharpLua.Template = "gui.get_clipping_visible({0})" + /// + public static extern bool get_clipping_visible(Node node_p1); + + + /// + /// If node is set as an visible clipping node, it will be shown as well as clipping. Otherwise, it will only clip but not show visually. + /// + /// @CSharpLua.Template = "gui.set_clipping_visible({0}, {1})" + /// + public static extern void set_clipping_visible(Node node_p1, bool visible_p2); + + + /// + /// If node is set as an inverted clipping node, it will clip anything inside as opposed to outside. + /// + /// @CSharpLua.Template = "gui.get_clipping_inverted({0})" + /// + public static extern bool get_clipping_inverted(Node node_p1); + + + /// + /// If node is set as an inverted clipping node, it will clip anything inside as opposed to outside. + /// + /// @CSharpLua.Template = "gui.set_clipping_inverted({0}, {1})" + /// + public static extern void set_clipping_inverted(Node node_p1, bool inverted_p2); + + + /// + /// The x-anchor specifies how the node is moved when the game is run in a different resolution. + /// + /// @CSharpLua.Template = "gui.get_xanchor()" + /// + public static extern GuiAnchor get_xanchor(); + + + /// + /// The x-anchor specifies how the node is moved when the game is run in a different resolution. + /// + /// @CSharpLua.Template = "gui.set_xanchor({0}, {1})" + /// + public static extern void set_xanchor(Node node_p1, GuiAnchor anchor_p2); + + + /// + /// The y-anchor specifies how the node is moved when the game is run in a different resolution. + /// + /// @CSharpLua.Template = "gui.get_yanchor()" + /// + public static extern GuiAnchor get_yanchor(); + + + /// + /// The y-anchor specifies how the node is moved when the game is run in a different resolution. + /// + /// @CSharpLua.Template = "gui.set_yanchor({0}, {1})" + /// + public static extern void set_yanchor(Node node_p1, GuiAnchor anchor_p2); + + + /// + /// The pivot specifies how the node is drawn and rotated from its position. + /// + /// @CSharpLua.Template = "gui.get_pivot()" + /// + public static extern Node get_pivot(out GuiPivot pivot_o1); + + + /// + /// The pivot specifies how the node is drawn and rotated from its position. + /// + /// @CSharpLua.Template = "gui.set_pivot({0}, {1})" + /// + public static extern void set_pivot(Node node_p1, GuiPivot pivot_p2); + + + /// + /// Returns the scene width. + /// + /// @CSharpLua.Template = "gui.get_width()" + /// + public static extern double get_width(); + + + /// + /// Returns the scene height. + /// + /// @CSharpLua.Template = "gui.get_height()" + /// + public static extern double get_height(); + + + /// + /// Set the slice9 configuration values for the node. + /// + /// @CSharpLua.Template = "gui.set_slice9({0}, {1})" + /// + public static extern void set_slice9(Node node_p1, vector4 values_p2); + + + /// + /// Returns the slice9 configuration values for the node. + /// + /// @CSharpLua.Template = "gui.get_slice9({0})" + /// + public static extern vector4 get_slice9(Node node_p1); + + + /// + /// Sets the number of generated vertices around the perimeter of a pie node. + /// + /// @CSharpLua.Template = "gui.set_perimeter_vertices({0}, {1})" + /// + public static extern void set_perimeter_vertices(Node node_p1, double vertices_p2); + + + /// + /// Returns the number of generated vertices around the perimeter + /// of a pie node. + /// + /// @CSharpLua.Template = "gui.get_perimeter_vertices({0})" + /// + public static extern double get_perimeter_vertices(Node node_p1); + + + /// + /// Set the sector angle of a pie node. + /// + /// @CSharpLua.Template = "gui.set_fill_angle({0}, {1})" + /// + public static extern void set_fill_angle(Node node_p1, double angle_p2); + + + /// + /// Returns the sector angle of a pie node. + /// + /// @CSharpLua.Template = "gui.get_fill_angle({0})" + /// + public static extern double get_fill_angle(Node node_p1); + + + /// + /// Sets the inner radius of a pie node. + /// The radius is defined along the x-axis. + /// + /// @CSharpLua.Template = "gui.set_inner_radius({0}, {1})" + /// + public static extern void set_inner_radius(Node node_p1, double radius_p2); + + + /// + /// Returns the inner radius of a pie node. + /// The radius is defined along the x-axis. + /// + /// @CSharpLua.Template = "gui.get_inner_radius({0})" + /// + public static extern double get_inner_radius(Node node_p1); + + + /// + /// Sets the outer bounds mode for a pie node. + /// + /// @CSharpLua.Template = "gui.set_outer_bounds({0}, {1})" + /// + public static extern void set_outer_bounds(Node node_p1, PieBounds bounds_mode_p2); + + + /// + /// Returns the outer bounds mode for a pie node. + /// + /// @CSharpLua.Template = "gui.get_outer_bounds({0})" + /// + public static extern PieBounds get_outer_bounds(Node node_p1); + + + /// + /// Sets the leading value for a text node. This value is used to + /// scale the line spacing of text. + /// + /// @CSharpLua.Template = "gui.set_leading({0}, {1})" + /// + public static extern void set_leading(Node node_p1, double leading_p2); + + + /// + /// Returns the leading value for a text node. + /// + /// @CSharpLua.Template = "gui.get_leading({0})" + /// + public static extern double get_leading(Node node_p1); + + + /// + /// Sets the tracking value of a text node. This value is used to + /// adjust the vertical spacing of characters in the text. + /// + /// @CSharpLua.Template = "gui.set_tracking({0}, {1})" + /// + public static extern void set_tracking(Node node_p1, double tracking_p2); + + + /// + /// Returns the tracking value of a text node. + /// + /// @CSharpLua.Template = "gui.get_tracking({0})" + /// + public static extern double get_tracking(Node node_p1); + + + /// + /// Tests whether a coordinate is within the bounding box of a + /// node. + /// + /// @CSharpLua.Template = "gui.pick_node({0}, {1}, {2})" + /// + public static extern bool pick_node(Node node_p1, double x_p2, double y_p3); + + + /// + /// Returns true if a node is enabled and false if it's not. + /// Disabled nodes are not rendered and animations acting on them are not evaluated. + /// + /// @CSharpLua.Template = "gui.is_enabled({0}, {1})" + /// + public static extern bool is_enabled(Node node_p1, bool recursive_p2); + + + /// + /// Sets a node to the disabled or enabled state. + /// Disabled nodes are not rendered and animations acting on them are not evaluated. + /// + /// @CSharpLua.Template = "gui.set_enabled({0}, {1})" + /// + public static extern void set_enabled(Node node_p1, bool enabled_p2); + + + /// + /// Returns true if a node is visible and false if it's not. + /// Invisible nodes are not rendered. + /// + /// @CSharpLua.Template = "gui.get_visible({0})" + /// + public static extern bool get_visible(Node node_p1); + + + /// + /// Set if a node should be visible or not. Only visible nodes are rendered. + /// + /// @CSharpLua.Template = "gui.set_visible({0}, {1})" + /// + public static extern void set_visible(Node node_p1, bool visible_p2); + + + /// + /// Returns the adjust mode of a node. + /// The adjust mode defines how the node will adjust itself to screen + /// resolutions that differs from the one in the project settings. + /// + /// @CSharpLua.Template = "gui.get_adjust_mode({0})" + /// + public static extern AdjustMode get_adjust_mode(Node node_p1); + + + /// + /// Sets the adjust mode on a node. + /// The adjust mode defines how the node will adjust itself to screen + /// resolutions that differs from the one in the project settings. + /// + /// @CSharpLua.Template = "gui.set_adjust_mode({0}, {1})" + /// + public static extern void set_adjust_mode(Node node_p1, AdjustMode adjust_mode_p2); + + + /// + /// Returns the size of a node. + /// The size mode defines how the node will adjust itself in size. Automatic + /// size mode alters the node size based on the node's content. Automatic size + /// mode works for Box nodes and Pie nodes which will both adjust their size + /// to match the assigned image. Particle fx and Text nodes will ignore + /// any size mode setting. + /// + /// @CSharpLua.Template = "gui.get_size_mode({0})" + /// + public static extern SizeMode get_size_mode(Node node_p1); + + + /// + /// Sets the size mode of a node. + /// The size mode defines how the node will adjust itself in size. Automatic + /// size mode alters the node size based on the node's content. Automatic size + /// mode works for Box nodes and Pie nodes which will both adjust their size + /// to match the assigned image. Particle fx and Text nodes will ignore + /// any size mode setting. + /// + /// @CSharpLua.Template = "gui.set_size_mode({0}, {1})" + /// + public static extern void set_size_mode(Node node_p1, SizeMode size_mode_p2); + + + /// + /// Alters the ordering of the two supplied nodes by moving the first node + /// above the second. + /// If the second argument is nil the first node is moved to the top. + /// + /// @CSharpLua.Template = "gui.move_above({0}, {1})" + /// + public static extern void move_above(Node node_p1, Node node_p2); + + + /// + /// Alters the ordering of the two supplied nodes by moving the first node + /// above the second. + /// If the second argument is nil the first node is moved to the top. + /// + /// @CSharpLua.Template = "gui.move_above({0})" + /// + public static extern void move_above(Node node_p1); + + + /// + /// Alters the ordering of the two supplied nodes by moving the first node + /// below the second. + /// If the second argument is nil the first node is moved to the bottom. + /// + /// @CSharpLua.Template = "gui.move_below({0}, {1})" + /// + public static extern void move_below(Node node_p1, Node node_p2); + + + /// + /// Alters the ordering of the two supplied nodes by moving the first node + /// below the second. + /// If the second argument is nil the first node is moved to the bottom. + /// + /// @CSharpLua.Template = "gui.move_below({0})" + /// + public static extern void move_below(Node node_p1); + + + /// + /// Returns the parent node of the specified node. + /// If the supplied node does not have a parent, nil is returned. + /// + /// @CSharpLua.Template = "gui.get_parent({0})" + /// + public static extern Node get_parent(Node node_p1); + + + /// + /// Sets the parent node of the specified node. + /// + /// @CSharpLua.Template = "gui.set_parent({0}, {1}, {2})" + /// + public static extern void set_parent(Node node_p1, Node parent_p2, bool keep_scene_transform_p3); + + + /// + /// Make a clone instance of a node. + /// This function does not clone the supplied node's children nodes. + /// Use gui.clone_tree for that purpose. + /// + /// @CSharpLua.Template = "gui.clone({0})" + /// + public static extern Node clone(Node node_p1); + + + /// + /// Make a clone instance of a node and all its children. + /// Use gui.clone to clone a node excluding its children. + /// + /// @CSharpLua.Template = "gui.clone_tree({0})" + /// + public static extern LuaTable clone_tree(Node node_p1); + + + /// + /// Resets all nodes in the current GUI scene to their initial state. + /// The reset only applies to static node loaded from the scene. + /// Nodes that are created dynamically from script are not affected. + /// + /// @CSharpLua.Template = "gui.reset_nodes()" + /// + public static extern void reset_nodes(); + + + /// + /// Set the order number for the current GUI scene. + /// The number dictates the sorting of the "gui" render predicate, + /// in other words in which order the scene will be rendered in relation + /// to other currently rendered GUI scenes. + /// The number must be in the range 0 to 15. + /// + /// @CSharpLua.Template = "gui.set_render_order({0})" + /// + public static extern void set_render_order(double order_p1); + + + /// + /// Shows the on-display touch keyboard. + /// The specified type of keyboard is displayed if it is available on + /// the device. + /// This function is only available on iOS and Android. . + /// + /// @CSharpLua.Template = "gui.show_keyboard({0}, {1})" + /// + public static extern void show_keyboard(KeyboardType type_p1, bool autoclose_p2); + + + /// + /// Hides the on-display touch keyboard on the device. + /// + /// @CSharpLua.Template = "gui.hide_keyboard()" + /// + public static extern void hide_keyboard(); + + + /// + /// Resets the input context of keyboard. This will clear marked text. + /// + /// @CSharpLua.Template = "gui.reset_keyboard()" + /// + public static extern void reset_keyboard(); + + + /// + /// Returns the position of the supplied node. + /// + /// @CSharpLua.Template = "gui.get_position({0})" + /// + public static extern vector3 get_position(Node node_p1); + + + /// + /// Sets the position of the supplied node. + /// + /// @CSharpLua.Template = "gui.set_position({0}, {1})" + /// + public static extern void set_position(Node node_p1, vector3 position_p2); + + + /// + /// Sets the position of the supplied node. + /// + /// @CSharpLua.Template = "gui.set_position({0}, {1})" + /// + public static extern void set_position(Node node_p1, vector4 position_p2); + + + /// + /// Returns the rotation of the supplied node. + /// The rotation is expressed in degree Euler angles. + /// + /// @CSharpLua.Template = "gui.get_rotation({0})" + /// + public static extern vector3 get_rotation(Node node_p1); + + + /// + /// Sets the rotation of the supplied node. + /// The rotation is expressed in degree Euler angles. + /// + /// @CSharpLua.Template = "gui.set_rotation({0}, {1})" + /// + public static extern void set_rotation(Node node_p1, vector3 rotation_p2); + + + /// + /// Sets the rotation of the supplied node. + /// The rotation is expressed in degree Euler angles. + /// + /// @CSharpLua.Template = "gui.set_rotation({0}, {1})" + /// + public static extern void set_rotation(Node node_p1, vector4 rotation_p2); + + + /// + /// Returns the scale of the supplied node. + /// + /// @CSharpLua.Template = "gui.get_scale({0})" + /// + public static extern vector3 get_scale(Node node_p1); + + + /// + /// Sets the scaling of the supplied node. + /// + /// @CSharpLua.Template = "gui.set_scale({0}, {1})" + /// + public static extern void set_scale(Node node_p1, vector3 scale_p2); + + + /// + /// Sets the scaling of the supplied node. + /// + /// @CSharpLua.Template = "gui.set_scale({0}, {1})" + /// + public static extern void set_scale(Node node_p1, vector4 scale_p2); + + + /// + /// Returns the color of the supplied node. The components + /// of the returned vector4 contains the color channel values: + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + ///
ComponentColor value
xRed value
yGreen value
zBlue value
wAlpha value
+ /// + /// @CSharpLua.Template = "gui.get_color({0})" + ///
+ public static extern vector4 get_color(Node node_p1); + + + /// + /// Sets the color of the supplied node. The components + /// of the supplied vector3 or vector4 should contain the color channel values: + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + ///
ComponentColor value
xRed value
yGreen value
zBlue value
w vector4Alpha value
+ /// + /// @CSharpLua.Template = "gui.set_color({0}, {1})" + ///
+ public static extern void set_color(Node node_p1, vector3 color_p2); + + + /// + /// Sets the color of the supplied node. The components + /// of the supplied vector3 or vector4 should contain the color channel values: + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + ///
ComponentColor value
xRed value
yGreen value
zBlue value
w vector4Alpha value
+ /// + /// @CSharpLua.Template = "gui.set_color({0}, {1})" + ///
+ public static extern void set_color(Node node_p1, vector4 color_p2); + + + /// + /// Returns the outline color of the supplied node. + /// See gui.get_color for info how vectors encode color values. + /// + /// @CSharpLua.Template = "gui.get_outline({0})" + /// + public static extern vector4 get_outline(Node node_p1); + + + /// + /// Sets the outline color of the supplied node. + /// See gui.set_color for info how vectors encode color values. + /// + /// @CSharpLua.Template = "gui.set_outline({0}, {1})" + /// + public static extern void set_outline(Node node_p1, vector3 color_p2); + + + /// + /// Sets the outline color of the supplied node. + /// See gui.set_color for info how vectors encode color values. + /// + /// @CSharpLua.Template = "gui.set_outline({0}, {1})" + /// + public static extern void set_outline(Node node_p1, vector4 color_p2); + + + /// + /// Returns the shadow color of the supplied node. + /// See gui.get_color for info how vectors encode color values. + /// + /// @CSharpLua.Template = "gui.get_shadow({0})" + /// + public static extern vector4 get_shadow(Node node_p1); + + + /// + /// Sets the shadow color of the supplied node. + /// See gui.set_color for info how vectors encode color values. + /// + /// @CSharpLua.Template = "gui.set_shadow({0}, {1})" + /// + public static extern void set_shadow(Node node_p1, vector3 color_p2); + + + /// + /// Sets the shadow color of the supplied node. + /// See gui.set_color for info how vectors encode color values. + /// + /// @CSharpLua.Template = "gui.set_shadow({0}, {1})" + /// + public static extern void set_shadow(Node node_p1, vector4 color_p2); + + + /// + /// Sets the size of the supplied node. + /// You can only set size on nodes with size mode set to SIZE_MODE_MANUAL + /// + /// @CSharpLua.Template = "gui.set_size({0}, {1})" + /// + public static extern void set_size(Node node_p1, vector3 size_p2); + + + /// + /// Sets the size of the supplied node. + /// You can only set size on nodes with size mode set to SIZE_MODE_MANUAL + /// + /// @CSharpLua.Template = "gui.set_size({0}, {1})" + /// + public static extern void set_size(Node node_p1, vector4 size_p2); + + + /// + /// Returns the size of the supplied node. + /// + /// @CSharpLua.Template = "gui.get_size({0})" + /// + public static extern vector3 get_size(Node node_p1); + + + /// + /// Returns the screen position of the supplied node. This function returns the + /// calculated transformed position of the node, taking into account any parent node + /// transforms. + /// + /// @CSharpLua.Template = "gui.get_screen_position({0})" + /// + public static extern vector3 get_screen_position(Node node_p1); + + + /// + /// Set the screen position to the supplied node + /// + /// @CSharpLua.Template = "gui.set_screen_position({0}, {1})" + /// + public static extern void set_screen_position(Node node_p1, vector3 screen_position_p2); + + + /// + /// Convert the screen position to the local position of supplied node + /// + /// @CSharpLua.Template = "gui.screen_to_local({0}, {1})" + /// + public static extern vector3 screen_to_local(Node node_p1, vector3 screen_position_p2); + + + /// + /// This is only useful nodes with flipbook animations. The cursor is normalized. + /// + /// @CSharpLua.Template = "gui.set_flipbook_cursor({0}, {1})" + /// + public static extern void set_flipbook_cursor(Node node_p1, double cursor_p2); + + + /// + /// This is only useful nodes with flipbook animations. Gets the playback rate of the flipbook animation on a node. + /// + /// @CSharpLua.Template = "gui.get_flipbook_playback_rate({0})" + /// + public static extern double get_flipbook_playback_rate(Node node_p1); + + + /// + /// This is only useful nodes with flipbook animations. Sets the playback rate of the flipbook animation on a node. Must be positive. + /// + /// @CSharpLua.Template = "gui.set_flipbook_playback_rate({0}, {1})" + /// + public static extern void set_flipbook_playback_rate(Node node_p1, double playback_rate_p2); + + + /// + /// Dynamically create a particle fx node. + /// + /// @CSharpLua.Template = "gui.new_particlefx_node({0}, {1})" + /// + public static extern Node new_particlefx_node(vector3 pos_p1, Hash particlefx_p2); + + + /// + /// Dynamically create a particle fx node. + /// + /// @CSharpLua.Template = "gui.new_particlefx_node({0}, {1})" + /// + public static extern Node new_particlefx_node(vector3 pos_p1, string particlefx_p2); + + + /// + /// Dynamically create a particle fx node. + /// + /// @CSharpLua.Template = "gui.new_particlefx_node({0}, {1})" + /// + public static extern Node new_particlefx_node(vector4 pos_p1, Hash particlefx_p2); + + + /// + /// Dynamically create a particle fx node. + /// + /// @CSharpLua.Template = "gui.new_particlefx_node({0}, {1})" + /// + public static extern Node new_particlefx_node(vector4 pos_p1, string particlefx_p2); + + + /// + /// Plays the paricle fx for a gui node + /// + /// @CSharpLua.Template = "gui.play_particlefx({0})" + /// + public static extern void play_particlefx(Node node_p1); + + + /// + /// Plays the paricle fx for a gui node + /// + /// @CSharpLua.Template = "gui.play_particlefx({0}, {1})" + /// + public static extern void play_particlefx(Node node_p1, Action emitter_state_function_p2); + + + /// + /// Stops the particle fx for a gui node + /// + /// @CSharpLua.Template = "gui.stop_particlefx({0}, {1})" + /// + public static extern void stop_particlefx(Node node_p1, LuaTableBase options_p2); + + + /// + /// Set the paricle fx for a gui node + /// + /// @CSharpLua.Template = "gui.set_particlefx({0}, {1})" + /// + public static extern void set_particlefx(Node node_p1, Hash particlefx_p2); + + + /// + /// Set the paricle fx for a gui node + /// + /// @CSharpLua.Template = "gui.set_particlefx({0}, {1})" + /// + public static extern void set_particlefx(Node node_p1, string particlefx_p2); + + + /// + /// Get the paricle fx for a gui node + /// + /// @CSharpLua.Template = "gui.get_particlefx({0})" + /// + public static extern Hash get_particlefx(Node node_p1); + + + /// + /// gets the node inherit alpha state + /// + /// @CSharpLua.Template = "gui.get_inherit_alpha({0})" + /// + public static extern void get_inherit_alpha(Node node_p1); + + + /// + /// sets the node inherit alpha state + /// + /// @CSharpLua.Template = "gui.set_inherit_alpha({0}, {1})" + /// + public static extern void set_inherit_alpha(Node node_p1, bool inherit_alpha_p2); + + + /// + /// gets the node alpha + /// + /// @CSharpLua.Template = "gui.get_alpha({0})" + /// + public static extern void get_alpha(Node node_p1); + + + /// + /// sets the node alpha + /// + /// @CSharpLua.Template = "gui.set_alpha({0}, {1})" + /// + public static extern void set_alpha(Node node_p1, double alpha_p2); + + + /// + /// This is a callback-function, which is called by the engine when a gui component is initialized. It can be used + /// to set the initial state of the script and gui scene. + /// + /// @CSharpLua.Template = "gui.init({0})" + /// + public static extern void init(object self_p1); + + + /// + /// This is a callback-function, which is called by the engine when a gui component is finalized (destroyed). It can + /// be used to e.g. take some last action, report the finalization to other game object instances + /// or release user input focus (see release_input_focus). There is no use in starting any animations or similar + /// from this function since the gui component is about to be destroyed. + /// + /// @CSharpLua.Template = "gui.final({0})" + /// + public static extern void final(object self_p1); + + + /// + /// This is a callback-function, which is called by the engine every frame to update the state of a gui component. + /// It can be used to perform any kind of gui related tasks, e.g. animating nodes. + /// + /// @CSharpLua.Template = "gui.update({0}, {1})" + /// + public static extern void update(object self_p1, double dt_p2); + + + /// + /// This is a callback-function, which is called by the engine whenever a message has been sent to the gui component. + /// It can be used to take action on the message, e.g. update the gui or send a response back to the sender of the message. + /// The message parameter is a table containing the message data. If the message is sent from the engine, the + /// documentation of the message specifies which data is supplied. + /// See the update function for examples on how to use this callback-function. + /// + /// @CSharpLua.Template = "gui.on_message({0}, {1}, {2})" + /// + public static extern void on_message(object self_p1, Hash message_id_p2, LuaTableBase message_p3); + + + /// + /// This is a callback-function, which is called by the engine when user input is sent to the instance of the gui component. + /// It can be used to take action on the input, e.g. modify the gui according to the input. + /// For an instance to obtain user input, it must first acquire input + /// focus through the message acquire_input_focus. + /// Any instance that has obtained input will be put on top of an + /// input stack. Input is sent to all listeners on the stack until the + /// end of stack is reached, or a listener returns true + /// to signal that it wants input to be consumed. + /// See the documentation of acquire_input_focus for more + /// information. + /// The action parameter is a table containing data about the input mapped to the + /// action_id. + /// For mapped actions it specifies the value of the input and if it was just pressed or released. + /// Actions are mapped to input in an input_binding-file. + /// Mouse movement is specifically handled and uses nil as its action_id. + /// The action only contains positional parameters in this case, such as x and y of the pointer. + /// Here is a brief description of the available table fields: + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + ///
FieldDescription
valueThe amount of input given by the user. This is usually 1 for buttons and 0-1 for analogue inputs. This is not present for mouse movement.
pressedIf the input was pressed this frame. This is not present for mouse movement.
releasedIf the input was released this frame. This is not present for mouse movement.
repeatedIf the input was repeated this frame. This is similar to how a key on a keyboard is repeated when you hold it down. This is not present for mouse movement.
xThe x value of a pointer device, if present.
yThe y value of a pointer device, if present.
screen_xThe screen space x value of a pointer device, if present.
screen_yThe screen space y value of a pointer device, if present.
dxThe change in x value of a pointer device, if present.
dyThe change in y value of a pointer device, if present.
screen_dxThe change in screen space x value of a pointer device, if present.
screen_dyThe change in screen space y value of a pointer device, if present.
gamepadThe index of the gamepad device that provided the input.
touchList of touch input, one element per finger, if present. See table below about touch input
+ /// Touch input table: + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + ///
FieldDescription
idA number identifying the touch input during its duration.
pressedTrue if the finger was pressed this frame.
releasedTrue if the finger was released this frame.
tap_countNumber of taps, one for single, two for double-tap, etc
xThe x touch location.
yThe y touch location.
dxThe change in x value.
dyThe change in y value.
acc_xAccelerometer x value (if present).
acc_yAccelerometer y value (if present).
acc_zAccelerometer z value (if present).
+ /// + /// @CSharpLua.Template = "gui.on_input({0}, {1}, {2})" + ///
+ public static extern bool on_input(object self_p1, Hash action_id_p2, LuaTableBase action_p3); + + + /// + /// This is a callback-function, which is called by the engine when the gui script is reloaded, e.g. from the editor. + /// It can be used for live development, e.g. to tweak constants or set up the state properly for the script. + /// + /// @CSharpLua.Template = "gui.on_reload({0})" + /// + public static extern void on_reload(object self_p1); + + + #endregion Defold API + + + /// + /// @CSharpLua.Template = "gui.get_node({0})" + /// + public static extern Node GetNode(Hash id); + + + public static TNode GetNode(Hash id) where TNode : NodeProxy, new() + { + var node = new TNode(); + node.__assignproxy__(Gui.get_node(id)); + return node; + } + } +} diff --git a/DefoldSharpLib/html5.cs b/DefoldSharpLib/html5.cs new file mode 100644 index 0000000..1f88c64 --- /dev/null +++ b/DefoldSharpLib/html5.cs @@ -0,0 +1,33 @@ +namespace DefoldSharp +{ + /// + /// HTML5 API documentation + /// + /// + public static class Html5 + { + #region Defold API + /// + /// Executes the supplied string as JavaScript inside the browser. + /// A call to this function is blocking, the result is returned as-is, as a string. + /// (Internally this will execute the string using the eval() JavaScript function.) + /// + /// @CSharpLua.Template = "html5.run({0})" + /// + public static extern string run(string code_p1); + + + /// + /// Set a JavaScript interaction listener callaback from lua that will be + /// invoked when a user interacts with the web page by clicking, touching or typing. + /// The callback can then call DOM restricted actions like requesting a pointer lock, + /// or start playing sounds the first time the callback is invoked. + /// + /// @CSharpLua.Template = "html5.set_interaction_listener()" + /// + public static extern void set_interaction_listener(); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/http.cs b/DefoldSharpLib/http.cs new file mode 100644 index 0000000..d26a316 --- /dev/null +++ b/DefoldSharpLib/http.cs @@ -0,0 +1,50 @@ +using System; + +namespace DefoldSharp +{ + /// + /// HTTP API documentation + /// + /// + public static class Http + { + #region Defold API + /// + /// Perform a HTTP/HTTPS request. + /// If no timeout value is passed, the configuration value "network.http_timeout" is used. If that is not set, the timeout value is 0 (which blocks indefinitely). + /// + /// @CSharpLua.Template = "http.request({0}, {1}, {2})" + /// + public static extern void request(string url_p1, string method_p2, Action callback_p3); + + + /// + /// Perform a HTTP/HTTPS request. + /// If no timeout value is passed, the configuration value "network.http_timeout" is used. If that is not set, the timeout value is 0 (which blocks indefinitely). + /// + /// @CSharpLua.Template = "http.request({0}, {1}, {2}, {3})" + /// + public static extern void request(string url_p1, string method_p2, Action callback_p3, LuaTableBase headers_p4); + + + /// + /// Perform a HTTP/HTTPS request. + /// If no timeout value is passed, the configuration value "network.http_timeout" is used. If that is not set, the timeout value is 0 (which blocks indefinitely). + /// + /// @CSharpLua.Template = "http.request({0}, {1}, {2}, {3}, {4})" + /// + public static extern void request(string url_p1, string method_p2, Action callback_p3, LuaTableBase headers_p4, string post_data_p5); + + + /// + /// Perform a HTTP/HTTPS request. + /// If no timeout value is passed, the configuration value "network.http_timeout" is used. If that is not set, the timeout value is 0 (which blocks indefinitely). + /// + /// @CSharpLua.Template = "http.request({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void request(string url_p1, string method_p2, Action callback_p3, LuaTableBase headers_p4, string post_data_p5, LuaTableBase options_p6); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/iac.cs b/DefoldSharpLib/iac.cs new file mode 100644 index 0000000..33c62f7 --- /dev/null +++ b/DefoldSharpLib/iac.cs @@ -0,0 +1,12 @@ +namespace DefoldSharp +{ + /// + /// Inter-app communication API documentation + /// + /// + public static class Iac + { + #region Defold API + #endregion Defold API + } +} diff --git a/DefoldSharpLib/iap.cs b/DefoldSharpLib/iap.cs new file mode 100644 index 0000000..c0f16a4 --- /dev/null +++ b/DefoldSharpLib/iap.cs @@ -0,0 +1,12 @@ +namespace DefoldSharp +{ + /// + /// In-app purchases API documentation + /// + /// + public static class Iap + { + #region Defold API + #endregion Defold API + } +} diff --git a/DefoldSharpLib/image.cs b/DefoldSharpLib/image.cs new file mode 100644 index 0000000..5269123 --- /dev/null +++ b/DefoldSharpLib/image.cs @@ -0,0 +1,28 @@ +namespace DefoldSharp +{ + /// + /// Image API documentation + /// + /// + public static class Image + { + #region Defold API + /// + /// Load image (PNG or JPEG) from buffer. + /// + /// @CSharpLua.Template = "image.load({0})" + /// + public static extern LuaTable load(string buffer_p1); + + + /// + /// Load image (PNG or JPEG) from buffer. + /// + /// @CSharpLua.Template = "image.load({0}, {1})" + /// + public static extern LuaTable load(string buffer_p1, bool premult_p2); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/json.cs b/DefoldSharpLib/json.cs new file mode 100644 index 0000000..2e50085 --- /dev/null +++ b/DefoldSharpLib/json.cs @@ -0,0 +1,30 @@ +namespace DefoldSharp +{ + /// + /// JSON API documentation + /// + /// + public static class Json + { + #region Defold API + /// + /// Decode a string of JSON data into a Lua table. + /// A Lua error is raised for syntax errors. + /// + /// @CSharpLua.Template = "json.decode({0})" + /// + public static extern LuaTable decode(string json_p1); + + + /// + /// Encode a lua table to a JSON string. + /// A Lua error is raised for syntax errors. + /// + /// @CSharpLua.Template = "json.encode({0})" + /// + public static extern string encode(LuaTableBase tbl_p1); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/label.cs b/DefoldSharpLib/label.cs new file mode 100644 index 0000000..0bf1f7e --- /dev/null +++ b/DefoldSharpLib/label.cs @@ -0,0 +1,66 @@ +namespace DefoldSharp +{ + /// + /// Label API documentation + /// + /// + public static class Label + { + #region Defold API + /// + /// Sets the text of a label component + /// This method uses the message passing that means the value will be set after dispatch messages step. + /// More information is available in the Application Lifecycle manual. + /// + /// @CSharpLua.Template = "label.set_text({0}, {1})" + /// + public static extern void set_text(string url_p1, string text_p2); + + + /// + /// Sets the text of a label component + /// This method uses the message passing that means the value will be set after dispatch messages step. + /// More information is available in the Application Lifecycle manual. + /// + /// @CSharpLua.Template = "label.set_text({0}, {1})" + /// + public static extern void set_text(Hash url_p1, string text_p2); + + + /// + /// Sets the text of a label component + /// This method uses the message passing that means the value will be set after dispatch messages step. + /// More information is available in the Application Lifecycle manual. + /// + /// @CSharpLua.Template = "label.set_text({0}, {1})" + /// + public static extern void set_text(Url url_p1, string text_p2); + + + /// + /// Gets the text from a label component + /// + /// @CSharpLua.Template = "label.get_text({0})" + /// + public static extern string get_text(string url_p1); + + + /// + /// Gets the text from a label component + /// + /// @CSharpLua.Template = "label.get_text({0})" + /// + public static extern string get_text(Hash url_p1); + + + /// + /// Gets the text from a label component + /// + /// @CSharpLua.Template = "label.get_text({0})" + /// + public static extern string get_text(Url url_p1); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/lua/LuaArray.cs b/DefoldSharpLib/lua/LuaArray.cs new file mode 100644 index 0000000..4cabdd6 --- /dev/null +++ b/DefoldSharpLib/lua/LuaArray.cs @@ -0,0 +1,233 @@ +using System; + +namespace DefoldSharp +{ + public abstract class LuaArrayBase : ILuaType + { + + } + + + /// + /// An array of a particular type. + /// + /// + public class LuaArrayOf : LuaArrayBase + { + /// + /// @CSharpLua.Template = "{}" + /// + public LuaArrayOf() + { + } + } + + + /// + /// + public class LuaArray : LuaArrayOf + { + /// + /// @CSharpLua.Template = "{}" + /// + public LuaArray() + { + } + + /// + /// @CSharpLua.Template = "{}" + /// + public static extern LuaArray Create(); + + + /// + /// @CSharpLua.Template = "{}" + /// + public static extern LuaArrayOf Create(); + + + + + /// + /// @CSharpLua.Template = "#{0}" + /// + public static LuaArrayOf Create(params TValue[] initialValues) + { + var newArray = Create(); + + foreach (var initialValue in initialValues) + { + newArray.Add(initialValue); + } + + return newArray; + } + + + + /// + /// @CSharpLua.Template = "{{0}}" + /// + public extern static LuaArrayOf Create(TValue value1); + + + + /// + /// @CSharpLua.Template = "{{0}, {1}}" + /// + public extern static LuaArrayOf Create(TValue value1, TValue value2); + + + /// + /// @CSharpLua.Template = "{{0},{1},{2}}" + /// + public extern static LuaArrayOf Create(TValue value1, TValue value2, TValue value3); + + + /// + /// @CSharpLua.Template = "{{0},{1},{2},{3}}" + /// + public extern static LuaArrayOf Create(TValue value1, TValue value2, TValue value3, + TValue value4); + + + /// + /// @CSharpLua.Template = "{{0},{1},{2},{3},{4}}" + /// + public extern static LuaArrayOf Create(TValue value1, TValue value2, TValue value3, + TValue value4, TValue value5); + + + /// + /// @CSharpLua.Template = "{{0},{1},{2},{3},{4},{5}}" + /// + public extern static LuaArrayOf Create(TValue value1, TValue value2, TValue value3, + TValue value4, TValue value5, TValue value6); + + + /// + /// @CSharpLua.Template = "{{0},{1},{2},{3},{4},{5},{6}}" + /// + public extern static LuaArrayOf Create(TValue value1, TValue value2, TValue value3, + TValue value4, TValue value5, TValue value6, TValue value7); + + + /// + /// @CSharpLua.Template = "{{0},{1},{2},{3},{4},{5},{6},{7}}" + /// + public extern static LuaArrayOf Create(TValue value1, TValue value2, TValue value3, + TValue value4, TValue value5, TValue value6, TValue value7, TValue value8); + } + + + + public static class __LuaArrayExt + { + /// + /// @CSharpLua.Template = "#{0}" + /// + public static extern int Count(this LuaArrayBase arr); + + + /// + /// Adds the value to the end of the array. + /// + /// @CSharpLua.Template = "table.insert({0}, {1})" + /// + /// value to insert + public static extern void Add(this LuaArrayOf arr, TValue value); + + + + /// + /// Inserts a value into the array at the specified position + /// + /// @CSharpLua.Template = "table.insert({0}, {1} + 1, {2})" + /// + /// index to insert at + /// value to insert + public static extern void Insert(this LuaArrayOf arr, int index, TValue value); + + + /// + /// Removes the element at the passed index + /// + /// @CSharpLua.Template = "table.remove({0}, {1} + 1)" + /// + /// index to remove + /// + public static extern TValue Remove(this LuaArrayOf arr, int index); + + + /// + /// Removes the element at the passed index + /// + /// @CSharpLua.Template = "table.remove({0})" + /// + /// index to remove + /// + public static extern TValue RemoveLast(this LuaArrayOf arr); + + + /// + /// Sorts table elements in a given order, in-place, from table[1] to table[n], where n is the length of the table. + /// the standard Lua operator 'less than' is used instead. The sort algorithm is not stable; that is, elements considered equal by the given order may have their relative positions changed by the sort. + /// + /// @CSharpLua.Template = "table.sort({0})" + /// + public static extern void Sort(this LuaArrayBase arr); + + + /// + /// Sorts table elements in a given order, in-place, from table[1] to table[n], where n is the length of the table. + /// the standard Lua operator 'less than' is used instead. The sort algorithm is not stable; that is, elements considered equal by the given order may have their relative positions changed by the sort. + /// + /// @CSharpLua.Template = "table.sort({0}, {1})" + /// + public static extern void Sort(this LuaArrayOf arr, Func a); + + + + /// + /// Given an array where all elements are strings or numbers, concatenates all of them together. + /// + /// @CSharpLua.Template = "table.concat({0})" + /// The table to concatenate values + /// + public static extern string concat(this LuaArrayBase arr); + + + /// + /// Given an array where all elements are strings or numbers, concatenates all of them together, separated by sep. + /// + /// @CSharpLua.Template = "table.concat({0}, {1})" + /// The table to concatenate values + /// The separator to insert between elements. + /// + public static extern string concat(this LuaArrayBase arr, string separator); + + + /// + /// Given an array where all elements are strings or numbers, concatenates all of them together, separated by sep, starting with startOffset. + /// + /// @CSharpLua.Template = "table.concat({0}, {1}, {2} + 1)" + /// The table to concatenate values + /// The separator to insert between elements. + /// The starting offset for the concatenation. Zero-based. ( + 1 in lua ) + /// + public static extern string concat(this LuaArrayBase arr, string separator, int startOffset); + + + /// + /// Given an array where all elements are strings or numbers, concatenates all of them together, separated by sep, starting with startOffset and ending at endOffset. + /// + /// @CSharpLua.Template = "table.concat({0}, {1}, {2} + 1, {3} + 1)" + /// + /// The table to concatenate values + /// The separator to insert between elements. + /// The starting offset for the concatenation. Zero-based. ( + 1 in lua ) + /// The ending offset for the concatenation. Defaults to the length of the table. Zero-based. ( + 1 in lua ) + /// + public static extern string concat(this LuaArrayBase arr, string separator, int startOffset, int endOffset); + } +} \ No newline at end of file diff --git a/DefoldSharpLib/lua/LuaTable.cs b/DefoldSharpLib/lua/LuaTable.cs new file mode 100644 index 0000000..b5ac356 --- /dev/null +++ b/DefoldSharpLib/lua/LuaTable.cs @@ -0,0 +1,77 @@ +namespace DefoldSharp +{ + public class LuaTableBase : ILuaType + { + + } + + public class LuaTableOf : LuaTableBase + { + + } + + /// + /// + public class LuaTable : LuaTableOf + { + /// + /// Use one of the create methods instead. + /// + private LuaTable() + { + + } + + /// + /// @CSharpLua.Template = "{}" + /// + public static extern LuaTable Create(); + + + /// + /// @CSharpLua.Template = "{}" + /// + public static extern LuaTableOf Create(); + } + + + + public static class __LuaTableExt + { + /// + /// @CSharpLua.Template = "{0}[{1}] = {2}" + /// + public static extern void Add(this LuaTableOf tbl, TKey key, TValue value); + + + + /// + /// @CSharpLua.Template = "{0}[{1}] = nil" + /// + public static extern void Remove(this LuaTableOf tbl, TKey key); + + + /// + /// @CSharpLua.Template = for k in next, {0} do rawset({0}, k, nil) end + /// + public static extern void Clear(this LuaTableBase tbl); + + + /// + /// @CSharpLua.Template = "{0}[{1}]" + /// + public static extern bool ContainsKey(this LuaTableOf tbl, TKey key); + + + /// + /// @CSharpLua.Template = "{0}[{1}]" + /// + public static extern TValue Get(this LuaTableOf tbl, TKey key); + + + /// + /// @CSharpLua.Template = "{0}[{1}] = {2}" + /// + public static extern void Set(this LuaTableOf tbl, TKey key, TValue value); + } +} diff --git a/src/defold/types/LuaType.cs b/DefoldSharpLib/lua/LuaType.cs similarity index 73% rename from src/defold/types/LuaType.cs rename to DefoldSharpLib/lua/LuaType.cs index ad377a2..f4a757d 100644 --- a/src/defold/types/LuaType.cs +++ b/DefoldSharpLib/lua/LuaType.cs @@ -1,10 +1,13 @@ -using System; - -namespace types +namespace DefoldSharp { + public interface ILuaType + { + + } + /// /// - public class LuaType + public class LuaType : ILuaType { /// /// @CSharpLua.Template = "{0}" @@ -67,7 +70,7 @@ public static implicit operator LuaType(double v) /// /// @CSharpLua.Template = "{0}" /// - public static implicit operator LuaType(Vector2 v) + public static implicit operator LuaType(vector2 v) { return default; } @@ -75,7 +78,7 @@ public static implicit operator LuaType(Vector2 v) /// /// @CSharpLua.Template = "{0}" /// - public static implicit operator LuaType(Vector3 v) + public static implicit operator LuaType(vector3 v) { return default; } @@ -84,7 +87,7 @@ public static implicit operator LuaType(Vector3 v) /// /// @CSharpLua.Template = "{0}" /// - public static implicit operator LuaType(Vector4 v) + public static implicit operator LuaType(vector4 v) { return default; } @@ -96,14 +99,32 @@ public static implicit operator LuaType(bool v) { return default; } - - + + + /// + /// @CSharpLua.Template = "{0}" + /// + public static implicit operator LuaType(LuaArrayBase v) + { + return default; + } + + /// /// @CSharpLua.Template = "{0}" /// public static implicit operator LuaType(LuaTableBase v) { - return default; + return default; } } + + + public static class __LuaTypeExt + { + /// + /// @CSharpLua.Template = "{0}" + /// + public static extern LuaType AsLuaType(this ILuaType input); + } } diff --git a/DefoldSharpLib/lua/debug.cs b/DefoldSharpLib/lua/debug.cs new file mode 100644 index 0000000..c26e328 --- /dev/null +++ b/DefoldSharpLib/lua/debug.cs @@ -0,0 +1,76 @@ +namespace DefoldSharp +{ + /// + /// @CSharpLua.Ignore + /// + public static class Debug + { + /// + /// @CSharpLua.Template = "sys.get_engine_info().is_debug" + /// + public extern static bool IsEditorDebug(); + + + static Debug() + { + if (IsEditorDebug()) + { + _debuggingEnabled = true; + + _hook = _getHook(out _mask, out _count); + } + } + + + /// + /// @CSharpLua.Template = "debug.gethook()" + /// + private static extern object _getHook(out object mask, out object count); + + + /// + /// @CSharpLua.Template = "debug.sethook()" + /// + private static extern object _setHook(); + + + /// + /// @CSharpLua.Template = "debug.sethook({0},{1},{2})" + /// + private static extern object _setHook(object hook, object mask, object count); + + + private static object _hook; + private static object _mask; + private static object _count; + private static bool _debuggingEnabled = true; + + + public static void SetEditorDebug(bool shouldDebug = true) + { + if (!IsEditorDebug()) + return; + + if (shouldDebug) + { + _setHook(_hook, _mask, _count); + _debuggingEnabled = true; + } + else + { + _setHook(); + _debuggingEnabled = false; + } + } + + + public static bool ToggleEditorDebug() + { + if (!IsEditorDebug()) + return false; + + SetEditorDebug(!_debuggingEnabled); + return _debuggingEnabled; + } + } +} \ No newline at end of file diff --git a/DefoldSharpLib/lua/math.cs b/DefoldSharpLib/lua/math.cs new file mode 100644 index 0000000..563e169 --- /dev/null +++ b/DefoldSharpLib/lua/math.cs @@ -0,0 +1,346 @@ +namespace DefoldSharp +{ + /// + /// Lua math standard library + /// + /// @CSharpLua.Ignore + /// + /// + public static class math + { + #region Defold API + /// + /// This function is an interface to the simple + /// pseudo-random generator function rand provided by ANSI C. + /// (No guarantees can be given for its statistical properties.) + /// When called without arguments, + /// returns a uniform pseudo-random real number + /// in the range [0,1). + /// When called with an integer number m, + /// math.random returns + /// a uniform pseudo-random integer in the range [1, m]. + /// When called with two integer numbers m and n, + /// math.random returns a uniform pseudo-random + /// integer in the range [m, n]. + /// + /// @CSharpLua.Template = "math.random()" + /// + public static extern double random(); + + + #endregion Defold API + + + + /// + /// @CSharpLua.Template = "math.abs({0})" + /// + public static extern double abs(double x); + + + /// + /// @CSharpLua.Template = "math.acos({0})" + /// + public static extern double acos(double x); + + + /// + /// @CSharpLua.Template = "math.asin({0})" + /// + public static extern double asin(double x); + + + /// + /// @CSharpLua.Template = "math.atan({0})" + /// + public static extern double atan(double x); + + + + /// + /// @CSharpLua.Template = "math.atan2({0},{1})" + /// + public static extern double atan2(double x, double y); + + + /// + /// @CSharpLua.Template = "math.ceil({0})" + /// + public static extern double ceil(double x); + + + /// + /// @CSharpLua.Template = "math.cos({0})" + /// + public static extern double cos(double x); + + + /// + /// @CSharpLua.Template = "math.cosh({0})" + /// + public static extern double cosh(double x); + + + /// + /// @CSharpLua.Template = "math.deg({0})" + /// + public static extern double deg(double x); + + + /// + /// @CSharpLua.Template = "math.exp({0})" + /// + public static extern double exp(double x); + + + /// + /// @CSharpLua.Template = "math.floor({0})" + /// + public static extern double floor(double x); + + + /// + /// @CSharpLua.Template = "math.fmod({0},{1})" + /// + public static extern double fmod(double x, double y); + + + /// + /// @CSharpLua.Template = "math.frexp({0})" + /// + public static extern double frexp(double x); + + + /// + /// @CSharpLua.Template = "math.ldexp({0},{1})" + /// + public static extern double ldexp(double x, double y); + + + /// + /// @CSharpLua.Template = "math.log({0})" + /// + public static extern double log(double x); + + + /// + /// @CSharpLua.Template = "math.log10({0})" + /// + public static extern double log10(double x); + + + /// + /// @CSharpLua.Template = "math.max({0},{1})" + /// + public static extern double max(double x1, double x2); + + + /// + /// @CSharpLua.Template = "math.max({0},{1},{2})" + /// + public static extern double max(double x1, double x2, double x3); + + + /// + /// @CSharpLua.Template = "math.max({0},{1},{2},{3})" + /// + public static extern double max(double x1, double x2, double x3, double x4); + + + /// + /// @CSharpLua.Template = "math.max({0},{1},{2},{3},{4})" + /// + public static extern double max(double x1, double x2, double x3, double x4, double x5); + + + /// + /// @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5})" + /// + public static extern double max(double x1, double x2, double x3, double x4, double x5, double x6); + + + /// + /// @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5},{6})" + /// + public static extern double max(double x1, double x2, double x3, double x4, double x5, double x6, double x7); + + + /// + /// @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5},{6},{7})" + /// + public static extern double max(double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8); + + + /// + /// @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5},{6},{7},{8})" + /// + public static extern double max(double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, double x9); + + + /// + /// @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5},{6},{7},{8},{9})" + /// + public static extern double max(double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, double x9, double x10); + + + /// + /// @CSharpLua.Template = "math.min({0},{1})" + /// + public static extern double min(double x1, double x2); + + + /// + /// @CSharpLua.Template = "math.min({0},{1},{2})" + /// + public static extern double min(double x1, double x2, double x3); + + + /// + /// @CSharpLua.Template = "math.min({0},{1},{2},{3})" + /// + public static extern double min(double x1, double x2, double x3, double x4); + + + /// + /// @CSharpLua.Template = "math.min({0},{1},{2},{3},{4})" + /// + public static extern double min(double x1, double x2, double x3, double x4, double x5); + + + /// + /// @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5})" + /// + public static extern double min(double x1, double x2, double x3, double x4, double x5, double x6); + + + /// + /// @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5},{6})" + /// + public static extern double min(double x1, double x2, double x3, double x4, double x5, double x6, double x7); + + + /// + /// @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5},{6},{7})" + /// + public static extern double min(double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8); + + + /// + /// @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5},{6},{7},{8})" + /// + public static extern double min(double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, double x9); + + + /// + /// @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5},{6},{7},{8},{9})" + /// + public static extern double min(double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, double x9, double x10); + + + /// + /// @CSharpLua.Template = "math.modf({0})" + /// + public static extern double modf(double x1); + + + /// + /// @CSharpLua.Template = "math.pow({0},{1})" + /// + public static extern double pow(double x, double y); + + + /// + /// @CSharpLua.Template = "math.rad({0})" + /// + public static extern double rad(double x); + + + /// + /// @CSharpLua.Template = "math.random({0})" + /// + public static extern double random(double m); + + + /// + /// @CSharpLua.Template = "math.random({0}, {1})" + /// + public static extern double random(double m, double n); + + + /// + /// @CSharpLua.Template = "math.random({0})" + /// + public static extern int random(int m); + + + /// + /// @CSharpLua.Template = "math.random({0}, {1})" + /// + public static extern int random(int m, int n); + + + /// + /// @CSharpLua.Template = "math.randomseed({0})" + /// + public static extern void randomseed(double x); + + + /// + /// @CSharpLua.Template = "math.sin({0})" + /// + public static extern double sin(double x); + + + /// + /// @CSharpLua.Template = "math.sinh({0})" + /// + public static extern double sinh(double x); + + + /// + /// @CSharpLua.Template = "math.sqrt({0})" + /// + public static extern double sqrt(double x); + + + /// + /// @CSharpLua.Template = "math.tan({0})" + /// + public static extern double tan(double x); + + + /// + /// @CSharpLua.Template = "math.tan({0})" + /// + public static extern double tanh(double x); + + + + /// + /// @CSharpLua.Template = "math.huge" + /// + private extern static double GetHuge(); + public readonly static double Huge = GetHuge(); + + + /// + /// @CSharpLua.Template = "math.pi" + /// + private extern static double GetPI(); + public static double PI { get; } = GetPI(); + + + /// + /// @CSharpLua.Template = "(2*math.pi)" + /// + private extern static double GetTau(); + + + /// + /// The mathematically superior and far more intuitive constant. 2 x PI. So, a quarter circle is TAU/4, half a circle is TAU/2, etc. + /// + public static double TAU { get; } = GetTau(); + + + } +} diff --git a/DefoldSharpLib/lua/table.cs b/DefoldSharpLib/lua/table.cs new file mode 100644 index 0000000..9babdeb --- /dev/null +++ b/DefoldSharpLib/lua/table.cs @@ -0,0 +1,130 @@ +using System; + +namespace DefoldSharp +{ + /// + /// @CSharpLua.Ignore + /// + public static class table + { + /// + /// + /// @CSharpLua.Template = "#{0}" + /// + public static extern int length(LuaArrayBase arr); + + + /// + /// Given an array where all elements are strings or numbers, concatenates all of them together. + /// + /// @CSharpLua.Template = "table.concat({0})" + /// The table to concatenate values + /// + public static extern string concat(LuaArrayBase arr); + + + /// + /// Given an array where all elements are strings or numbers, concatenates all of them together, separated by sep. + /// + /// @CSharpLua.Template = "table.concat({0}, {1})" + /// The table to concatenate values + /// The separator to insert between elements. + /// + public static extern string concat(LuaArrayBase arr, string separator); + + + /// + /// Given an array where all elements are strings or numbers, concatenates all of them together, separated by sep, starting with startOffset. + /// + /// @CSharpLua.Template = "table.concat({0}, {1}, {2} + 1)" + /// The table to concatenate values + /// The separator to insert between elements. + /// The starting offset for the concatenation. Zero-based. ( + 1 in lua ) + /// + public static extern string concat(LuaArrayBase arr, string separator, int startOffset); + + + /// + /// Given an array where all elements are strings or numbers, concatenates all of them together, separated by sep, starting with startOffset and ending at endOffset. + /// + /// @CSharpLua.Template = "table.concat({0}, {1}, {2} + 1, {3} + 1)" + /// + /// The table to concatenate values + /// The separator to insert between elements. + /// The starting offset for the concatenation. Zero-based. ( + 1 in lua ) + /// The ending offset for the concatenation. Defaults to the length of the table. Zero-based. ( + 1 in lua ) + /// + public static extern string concat(LuaArrayBase arr, string separator, int startOffset, int endOffset); + + + /// + /// Inserts a value at the end of the table. + /// + /// @CSharpLua.Template = "table.insert({0}, {1})" + /// + /// The table to insert values into + /// The value to insert + public static extern void insert(LuaArrayBase arr, T value); + + + /// + /// Inserts a value at a position in the table, shifting up other elements to open space, if necessary. + /// + /// @CSharpLua.Template = "table.insert({0}, {1} + 1, {2})" + /// + /// The table to insert values into + /// The position to insert at. Zero-based + /// The value to insert + /// + public static extern void insert(LuaArrayBase arr, int pos, T value); + + + + /// + /// Returns the largest positive numerical index of the given table, or zero if the table has no positive numerical indices. (To do its job this function does a linear traversal of the whole table.) + /// + /// @CSharpLua.Template = "table.maxn({0})" + /// + /// The table to scan + public static extern void maxn(LuaArrayBase arr); + + + /// + /// Removes the last element of the table. + /// + /// @CSharpLua.Template = "table.remove({0})" + /// + /// The table to trim + public static extern dynamic remove(LuaArrayBase arr); + + + /// + /// Removes from table the element at position pos, shifting down other elements to close the space, if necessary. Returns the value of the removed element + /// + /// @CSharpLua.Template = "table.remove({0}, {1} + 1)" + /// + /// The position to remove. Zero-based + /// The table to trim + public static extern dynamic remove(LuaArrayBase arr, int pos); + + + /// + /// Sorts table elements in a given order, in-place, from table[1] to table[n], where n is the length of the table. + /// the standard Lua operator 'less than' is used instead. The sort algorithm is not stable; that is, elements considered equal by the given order may have their relative positions changed by the sort. + /// + /// @CSharpLua.Template = "table.sort({0})" + /// + /// The table to sort + public static extern void sort(LuaArrayBase arr); + + + /// + /// Sorts table elements in a given order, in-place, from table[1] to table[n], where n is the length of the table. + /// the standard Lua operator 'less than' is used instead. The sort algorithm is not stable; that is, elements considered equal by the given order may have their relative positions changed by the sort. + /// + /// @CSharpLua.Template = "table.sort({0}, {1})" + /// + /// The table to sort + public static extern void sort(LuaArrayBase arr, Func comparator); + } +} \ No newline at end of file diff --git a/DefoldSharpLib/model.cs b/DefoldSharpLib/model.cs new file mode 100644 index 0000000..ff0b3fd --- /dev/null +++ b/DefoldSharpLib/model.cs @@ -0,0 +1,117 @@ +namespace DefoldSharp +{ + /// + /// Model API documentation + /// + /// + public static class Model + { + #region Defold API + #region Messages + /// + /// + public class model_animation_done_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("model_animation_done"); + public override Hash FetchCode() => __CODE__; + + public Hash animation_id; + } + + + #endregion Messages + + + /// + /// Cancels all animation on a model component. + /// + /// @CSharpLua.Template = "model.cancel({0})" + /// + public static extern void cancel(string url_p1); + + + /// + /// Cancels all animation on a model component. + /// + /// @CSharpLua.Template = "model.cancel({0})" + /// + public static extern void cancel(Hash url_p1); + + + /// + /// Cancels all animation on a model component. + /// + /// @CSharpLua.Template = "model.cancel({0})" + /// + public static extern void cancel(Url url_p1); + + + /// + /// Gets the id of the game object that corresponds to a model skeleton bone. + /// The returned game object can be used for parenting and transform queries. + /// This function has complexity O(n), where n is the number of bones in the model skeleton. + /// Game objects corresponding to a model skeleton bone can not be individually deleted. + /// + /// @CSharpLua.Template = "model.get_go({0}, {1})" + /// + public static extern Hash get_go(string url_p1, string bone_id_p2); + + + /// + /// Gets the id of the game object that corresponds to a model skeleton bone. + /// The returned game object can be used for parenting and transform queries. + /// This function has complexity O(n), where n is the number of bones in the model skeleton. + /// Game objects corresponding to a model skeleton bone can not be individually deleted. + /// + /// @CSharpLua.Template = "model.get_go({0}, {1})" + /// + public static extern Hash get_go(string url_p1, Hash bone_id_p2); + + + /// + /// Gets the id of the game object that corresponds to a model skeleton bone. + /// The returned game object can be used for parenting and transform queries. + /// This function has complexity O(n), where n is the number of bones in the model skeleton. + /// Game objects corresponding to a model skeleton bone can not be individually deleted. + /// + /// @CSharpLua.Template = "model.get_go({0}, {1})" + /// + public static extern Hash get_go(Hash url_p1, string bone_id_p2); + + + /// + /// Gets the id of the game object that corresponds to a model skeleton bone. + /// The returned game object can be used for parenting and transform queries. + /// This function has complexity O(n), where n is the number of bones in the model skeleton. + /// Game objects corresponding to a model skeleton bone can not be individually deleted. + /// + /// @CSharpLua.Template = "model.get_go({0}, {1})" + /// + public static extern Hash get_go(Hash url_p1, Hash bone_id_p2); + + + /// + /// Gets the id of the game object that corresponds to a model skeleton bone. + /// The returned game object can be used for parenting and transform queries. + /// This function has complexity O(n), where n is the number of bones in the model skeleton. + /// Game objects corresponding to a model skeleton bone can not be individually deleted. + /// + /// @CSharpLua.Template = "model.get_go({0}, {1})" + /// + public static extern Hash get_go(Url url_p1, string bone_id_p2); + + + /// + /// Gets the id of the game object that corresponds to a model skeleton bone. + /// The returned game object can be used for parenting and transform queries. + /// This function has complexity O(n), where n is the number of bones in the model skeleton. + /// Game objects corresponding to a model skeleton bone can not be individually deleted. + /// + /// @CSharpLua.Template = "model.get_go({0}, {1})" + /// + public static extern Hash get_go(Url url_p1, Hash bone_id_p2); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/msg.cs b/DefoldSharpLib/msg.cs new file mode 100644 index 0000000..52986bb --- /dev/null +++ b/DefoldSharpLib/msg.cs @@ -0,0 +1,331 @@ +namespace DefoldSharp +{ + /// + /// Messaging API documentation + /// + /// + public static class Msg + { + #region Defold API + /// + /// This is equivalent to msg.url(nil) or msg.url("#"), which creates an url to the current + /// script component. + /// + /// @CSharpLua.Template = "msg.url()" + /// + public static extern Url url(); + + + /// + /// The format of the string must be [socket:][path][#fragment], which is similar to a HTTP URL. + /// When addressing instances: + ///
    + ///
  • socket is the name of a valid world (a collection)
  • + ///
  • path is the id of the instance, which can either be relative the instance of the calling script or global
  • + ///
  • fragment would be the id of the desired component
  • + ///
+ /// In addition, the following shorthands are available: + ///
    + ///
  • "." the current game object
  • + ///
  • "#" the current component
  • + ///
+ /// + /// @CSharpLua.Template = "msg.url({0})" + ///
+ public static extern Url url(string urlstring_p1); + + + /// + /// creates a new URL from separate arguments + /// + /// @CSharpLua.Template = "msg.url({0}, {1})" + /// + public static extern Url url(string socket_p1, string path_p2); + + + /// + /// creates a new URL from separate arguments + /// + /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" + /// + public static extern Url url(string socket_p1, string path_p2, string fragment_p3); + + + /// + /// creates a new URL from separate arguments + /// + /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" + /// + public static extern Url url(string socket_p1, string path_p2, Hash fragment_p3); + + + /// + /// creates a new URL from separate arguments + /// + /// @CSharpLua.Template = "msg.url({0}, {1})" + /// + public static extern Url url(string socket_p1, Hash path_p2); + + + /// + /// creates a new URL from separate arguments + /// + /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" + /// + public static extern Url url(string socket_p1, Hash path_p2, string fragment_p3); + + + /// + /// creates a new URL from separate arguments + /// + /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" + /// + public static extern Url url(string socket_p1, Hash path_p2, Hash fragment_p3); + + + /// + /// creates a new URL from separate arguments + /// + /// @CSharpLua.Template = "msg.url({0}, {1})" + /// + public static extern Url url(Hash socket_p1, string path_p2); + + + /// + /// creates a new URL from separate arguments + /// + /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" + /// + public static extern Url url(Hash socket_p1, string path_p2, string fragment_p3); + + + /// + /// creates a new URL from separate arguments + /// + /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" + /// + public static extern Url url(Hash socket_p1, string path_p2, Hash fragment_p3); + + + /// + /// creates a new URL from separate arguments + /// + /// @CSharpLua.Template = "msg.url({0}, {1})" + /// + public static extern Url url(Hash socket_p1, Hash path_p2); + + + /// + /// creates a new URL from separate arguments + /// + /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" + /// + public static extern Url url(Hash socket_p1, Hash path_p2, string fragment_p3); + + + /// + /// creates a new URL from separate arguments + /// + /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" + /// + public static extern Url url(Hash socket_p1, Hash path_p2, Hash fragment_p3); + + + /// + /// Post a message to a receiving URL. The most common case is to send messages + /// to a component. If the component part of the receiver is omitted, the message + /// is broadcast to all components in the game object. + /// The following receiver shorthands are available: + ///
    + ///
  • "." the current game object
  • + ///
  • "#" the current component
  • + ///
+ /// There is a 2 kilobyte limit to the message parameter table size. + /// + /// @CSharpLua.Template = "msg.post({0}, {1})" + ///
+ public static extern void post(string receiver_p1, string message_id_p2); + + + /// + /// Post a message to a receiving URL. The most common case is to send messages + /// to a component. If the component part of the receiver is omitted, the message + /// is broadcast to all components in the game object. + /// The following receiver shorthands are available: + ///
    + ///
  • "." the current game object
  • + ///
  • "#" the current component
  • + ///
+ /// There is a 2 kilobyte limit to the message parameter table size. + /// + /// @CSharpLua.Template = "msg.post({0}, {1}, {2})" + ///
+ public static extern void post(string receiver_p1, string message_id_p2, LuaTableBase message_p3); + + + /// + /// Post a message to a receiving URL. The most common case is to send messages + /// to a component. If the component part of the receiver is omitted, the message + /// is broadcast to all components in the game object. + /// The following receiver shorthands are available: + ///
    + ///
  • "." the current game object
  • + ///
  • "#" the current component
  • + ///
+ /// There is a 2 kilobyte limit to the message parameter table size. + /// + /// @CSharpLua.Template = "msg.post({0}, {1})" + ///
+ public static extern void post(string receiver_p1, Hash message_id_p2); + + + /// + /// Post a message to a receiving URL. The most common case is to send messages + /// to a component. If the component part of the receiver is omitted, the message + /// is broadcast to all components in the game object. + /// The following receiver shorthands are available: + ///
    + ///
  • "." the current game object
  • + ///
  • "#" the current component
  • + ///
+ /// There is a 2 kilobyte limit to the message parameter table size. + /// + /// @CSharpLua.Template = "msg.post({0}, {1}, {2})" + ///
+ public static extern void post(string receiver_p1, Hash message_id_p2, LuaTableBase message_p3); + + + /// + /// Post a message to a receiving URL. The most common case is to send messages + /// to a component. If the component part of the receiver is omitted, the message + /// is broadcast to all components in the game object. + /// The following receiver shorthands are available: + ///
    + ///
  • "." the current game object
  • + ///
  • "#" the current component
  • + ///
+ /// There is a 2 kilobyte limit to the message parameter table size. + /// + /// @CSharpLua.Template = "msg.post({0}, {1})" + ///
+ public static extern void post(Url receiver_p1, string message_id_p2); + + + /// + /// Post a message to a receiving URL. The most common case is to send messages + /// to a component. If the component part of the receiver is omitted, the message + /// is broadcast to all components in the game object. + /// The following receiver shorthands are available: + ///
    + ///
  • "." the current game object
  • + ///
  • "#" the current component
  • + ///
+ /// There is a 2 kilobyte limit to the message parameter table size. + /// + /// @CSharpLua.Template = "msg.post({0}, {1}, {2})" + ///
+ public static extern void post(Url receiver_p1, string message_id_p2, LuaTableBase message_p3); + + + /// + /// Post a message to a receiving URL. The most common case is to send messages + /// to a component. If the component part of the receiver is omitted, the message + /// is broadcast to all components in the game object. + /// The following receiver shorthands are available: + ///
    + ///
  • "." the current game object
  • + ///
  • "#" the current component
  • + ///
+ /// There is a 2 kilobyte limit to the message parameter table size. + /// + /// @CSharpLua.Template = "msg.post({0}, {1})" + ///
+ public static extern void post(Url receiver_p1, Hash message_id_p2); + + + /// + /// Post a message to a receiving URL. The most common case is to send messages + /// to a component. If the component part of the receiver is omitted, the message + /// is broadcast to all components in the game object. + /// The following receiver shorthands are available: + ///
    + ///
  • "." the current game object
  • + ///
  • "#" the current component
  • + ///
+ /// There is a 2 kilobyte limit to the message parameter table size. + /// + /// @CSharpLua.Template = "msg.post({0}, {1}, {2})" + ///
+ public static extern void post(Url receiver_p1, Hash message_id_p2, LuaTableBase message_p3); + + + /// + /// Post a message to a receiving URL. The most common case is to send messages + /// to a component. If the component part of the receiver is omitted, the message + /// is broadcast to all components in the game object. + /// The following receiver shorthands are available: + ///
    + ///
  • "." the current game object
  • + ///
  • "#" the current component
  • + ///
+ /// There is a 2 kilobyte limit to the message parameter table size. + /// + /// @CSharpLua.Template = "msg.post({0}, {1})" + ///
+ public static extern void post(Hash receiver_p1, string message_id_p2); + + + /// + /// Post a message to a receiving URL. The most common case is to send messages + /// to a component. If the component part of the receiver is omitted, the message + /// is broadcast to all components in the game object. + /// The following receiver shorthands are available: + ///
    + ///
  • "." the current game object
  • + ///
  • "#" the current component
  • + ///
+ /// There is a 2 kilobyte limit to the message parameter table size. + /// + /// @CSharpLua.Template = "msg.post({0}, {1}, {2})" + ///
+ public static extern void post(Hash receiver_p1, string message_id_p2, LuaTableBase message_p3); + + + /// + /// Post a message to a receiving URL. The most common case is to send messages + /// to a component. If the component part of the receiver is omitted, the message + /// is broadcast to all components in the game object. + /// The following receiver shorthands are available: + ///
    + ///
  • "." the current game object
  • + ///
  • "#" the current component
  • + ///
+ /// There is a 2 kilobyte limit to the message parameter table size. + /// + /// @CSharpLua.Template = "msg.post({0}, {1})" + ///
+ public static extern void post(Hash receiver_p1, Hash message_id_p2); + + + /// + /// Post a message to a receiving URL. The most common case is to send messages + /// to a component. If the component part of the receiver is omitted, the message + /// is broadcast to all components in the game object. + /// The following receiver shorthands are available: + ///
    + ///
  • "." the current game object
  • + ///
  • "#" the current component
  • + ///
+ /// There is a 2 kilobyte limit to the message parameter table size. + /// + /// @CSharpLua.Template = "msg.post({0}, {1}, {2})" + ///
+ public static extern void post(Hash receiver_p1, Hash message_id_p2, LuaTableBase message_p3); + + + #endregion Defold API + + + public const string DefaultSocket = null; + } +} diff --git a/DefoldSharpLib/os.cs b/DefoldSharpLib/os.cs new file mode 100644 index 0000000..6be05dd --- /dev/null +++ b/DefoldSharpLib/os.cs @@ -0,0 +1,125 @@ +namespace DefoldSharp +{ + public static class OS + { + /// + /// @CSharpLua.Template = "os.clock()" + /// + public static extern double clock(); + + + //TODO: Figure out how we need to format this one. Might need a stand-in. + + /// + /// @CSharpLua.Template = "os.date({0},{1})" + /// + public static extern string date(); + + + /// + /// @CSharpLua.Template = "os.date({0})" + /// + public static extern string date(string format); + + + /// + /// @CSharpLua.Template = "os.difftime({0},{1})" + /// + public static extern double difftime(double t2, double t1); + + + /// + /// @CSharpLua.Template = "os.execute({0})" + /// + public static extern int execute(string command); + + + /// + /// @CSharpLua.Template = "(os.execute() ~= 0)" + /// + public static extern bool IsShellAvailable(); + + + /// + /// Safely shuts the game down. Use exit() if an immediate force exit is needed + /// + public static void Shutdown() + { + /*[[ + msg.post("@system:", "exit", {code = 0}) + ]]*/ + } + + + /// + /// @CSharpLua.Template = "os.exit()" + /// + public static extern void exit(); + + + /// + /// @CSharpLua.Template = "os.exit({0})" + /// + public static extern void exit(int code); + + + /// + /// @CSharpLua.Template = "os.getenv({0})" + /// + public static extern string getenv(string varname); + + + /// + /// @CSharpLua.Template = "os.remove({0})" + /// + public static extern bool remove(string filename, out string error); + + + /// + /// @CSharpLua.Template = "os.rename({0},{1})" + /// + public static extern bool rename(string oldname, string newname, out string error); + + + /// + /// @CSharpLua.Template = "os.setlocale(nil)" + /// + public static extern string setlocale(); + + + /// + /// @CSharpLua.Template = "os.setlocale(nil)" + /// + public static extern string getlocale(); + + + /// + /// @CSharpLua.Template = "os.setlocale({0})" + /// + public static extern string setlocale(string locale); + + + /// + /// @CSharpLua.Template = "os.setlocale({0},{1})" + /// + public static extern string setlocale(string locale, string category); + + + /// + /// @CSharpLua.Template = "os.time()" + /// + public static extern double time(); + + + /// + /// @CSharpLua.Template = "os.time({0})" + /// + public static extern double time(LuaTable table); + + + /// + /// @CSharpLua.Template = "os.time()" + /// + public static extern string tmpname(); + } +} \ No newline at end of file diff --git a/DefoldSharpLib/particlefx.cs b/DefoldSharpLib/particlefx.cs new file mode 100644 index 0000000..c55e85b --- /dev/null +++ b/DefoldSharpLib/particlefx.cs @@ -0,0 +1,386 @@ +using System; + +namespace DefoldSharp +{ + /// + /// Particle effects API documentation + /// + /// + public static class Particlefx + { + #region Defold API + /// + /// Starts playing a particle FX component. + /// Particle FX started this way need to be manually stopped through particlefx.stop(). + /// Which particle FX to play is identified by the URL. + /// A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. + /// + /// @CSharpLua.Template = "particlefx.play({0})" + /// + public static extern void play(string url_p1); + + + /// + /// Starts playing a particle FX component. + /// Particle FX started this way need to be manually stopped through particlefx.stop(). + /// Which particle FX to play is identified by the URL. + /// A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. + /// + /// @CSharpLua.Template = "particlefx.play({0}, {1})" + /// + public static extern void play(string url_p1, Action emitter_state_function_p2); + + + /// + /// Starts playing a particle FX component. + /// Particle FX started this way need to be manually stopped through particlefx.stop(). + /// Which particle FX to play is identified by the URL. + /// A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. + /// + /// @CSharpLua.Template = "particlefx.play({0})" + /// + public static extern void play(Hash url_p1); + + + /// + /// Starts playing a particle FX component. + /// Particle FX started this way need to be manually stopped through particlefx.stop(). + /// Which particle FX to play is identified by the URL. + /// A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. + /// + /// @CSharpLua.Template = "particlefx.play({0}, {1})" + /// + public static extern void play(Hash url_p1, Action emitter_state_function_p2); + + + /// + /// Starts playing a particle FX component. + /// Particle FX started this way need to be manually stopped through particlefx.stop(). + /// Which particle FX to play is identified by the URL. + /// A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. + /// + /// @CSharpLua.Template = "particlefx.play({0})" + /// + public static extern void play(Url url_p1); + + + /// + /// Starts playing a particle FX component. + /// Particle FX started this way need to be manually stopped through particlefx.stop(). + /// Which particle FX to play is identified by the URL. + /// A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. + /// + /// @CSharpLua.Template = "particlefx.play({0}, {1})" + /// + public static extern void play(Url url_p1, Action emitter_state_function_p2); + + + /// + /// Stops a particle FX component from playing. + /// Stopping a particle FX does not remove already spawned particles. + /// Which particle FX to stop is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.stop({0}, {1})" + /// + public static extern void stop(string url_p1, LuaTableBase options_p2); + + + /// + /// Stops a particle FX component from playing. + /// Stopping a particle FX does not remove already spawned particles. + /// Which particle FX to stop is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.stop({0}, {1})" + /// + public static extern void stop(Hash url_p1, LuaTableBase options_p2); + + + /// + /// Stops a particle FX component from playing. + /// Stopping a particle FX does not remove already spawned particles. + /// Which particle FX to stop is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.stop({0}, {1})" + /// + public static extern void stop(Url url_p1, LuaTableBase options_p2); + + + /// + /// Sets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Setting a constant through this function will override the value set for that constant in the material. + /// The value will be overridden until particlefx.reset_constant is called. + /// Which particle FX to set a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + /// + public static extern void set_constant(string url_p1, string emitter_p2, string constant_p3, vector4 value_p4); + + + /// + /// Sets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Setting a constant through this function will override the value set for that constant in the material. + /// The value will be overridden until particlefx.reset_constant is called. + /// Which particle FX to set a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + /// + public static extern void set_constant(string url_p1, string emitter_p2, Hash constant_p3, vector4 value_p4); + + + /// + /// Sets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Setting a constant through this function will override the value set for that constant in the material. + /// The value will be overridden until particlefx.reset_constant is called. + /// Which particle FX to set a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + /// + public static extern void set_constant(string url_p1, Hash emitter_p2, string constant_p3, vector4 value_p4); + + + /// + /// Sets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Setting a constant through this function will override the value set for that constant in the material. + /// The value will be overridden until particlefx.reset_constant is called. + /// Which particle FX to set a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + /// + public static extern void set_constant(string url_p1, Hash emitter_p2, Hash constant_p3, vector4 value_p4); + + + /// + /// Sets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Setting a constant through this function will override the value set for that constant in the material. + /// The value will be overridden until particlefx.reset_constant is called. + /// Which particle FX to set a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + /// + public static extern void set_constant(Hash url_p1, string emitter_p2, string constant_p3, vector4 value_p4); + + + /// + /// Sets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Setting a constant through this function will override the value set for that constant in the material. + /// The value will be overridden until particlefx.reset_constant is called. + /// Which particle FX to set a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + /// + public static extern void set_constant(Hash url_p1, string emitter_p2, Hash constant_p3, vector4 value_p4); + + + /// + /// Sets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Setting a constant through this function will override the value set for that constant in the material. + /// The value will be overridden until particlefx.reset_constant is called. + /// Which particle FX to set a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + /// + public static extern void set_constant(Hash url_p1, Hash emitter_p2, string constant_p3, vector4 value_p4); + + + /// + /// Sets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Setting a constant through this function will override the value set for that constant in the material. + /// The value will be overridden until particlefx.reset_constant is called. + /// Which particle FX to set a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + /// + public static extern void set_constant(Hash url_p1, Hash emitter_p2, Hash constant_p3, vector4 value_p4); + + + /// + /// Sets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Setting a constant through this function will override the value set for that constant in the material. + /// The value will be overridden until particlefx.reset_constant is called. + /// Which particle FX to set a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + /// + public static extern void set_constant(Url url_p1, string emitter_p2, string constant_p3, vector4 value_p4); + + + /// + /// Sets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Setting a constant through this function will override the value set for that constant in the material. + /// The value will be overridden until particlefx.reset_constant is called. + /// Which particle FX to set a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + /// + public static extern void set_constant(Url url_p1, string emitter_p2, Hash constant_p3, vector4 value_p4); + + + /// + /// Sets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Setting a constant through this function will override the value set for that constant in the material. + /// The value will be overridden until particlefx.reset_constant is called. + /// Which particle FX to set a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + /// + public static extern void set_constant(Url url_p1, Hash emitter_p2, string constant_p3, vector4 value_p4); + + + /// + /// Sets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Setting a constant through this function will override the value set for that constant in the material. + /// The value will be overridden until particlefx.reset_constant is called. + /// Which particle FX to set a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" + /// + public static extern void set_constant(Url url_p1, Hash emitter_p2, Hash constant_p3, vector4 value_p4); + + + /// + /// Resets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Resetting a constant through this function implies that the value defined in the material will be used. + /// Which particle FX to reset a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + /// + public static extern void reset_constant(string url_p1, string emitter_p2, string constant_p3); + + + /// + /// Resets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Resetting a constant through this function implies that the value defined in the material will be used. + /// Which particle FX to reset a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + /// + public static extern void reset_constant(string url_p1, string emitter_p2, Hash constant_p3); + + + /// + /// Resets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Resetting a constant through this function implies that the value defined in the material will be used. + /// Which particle FX to reset a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + /// + public static extern void reset_constant(string url_p1, Hash emitter_p2, string constant_p3); + + + /// + /// Resets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Resetting a constant through this function implies that the value defined in the material will be used. + /// Which particle FX to reset a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + /// + public static extern void reset_constant(string url_p1, Hash emitter_p2, Hash constant_p3); + + + /// + /// Resets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Resetting a constant through this function implies that the value defined in the material will be used. + /// Which particle FX to reset a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + /// + public static extern void reset_constant(Hash url_p1, string emitter_p2, string constant_p3); + + + /// + /// Resets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Resetting a constant through this function implies that the value defined in the material will be used. + /// Which particle FX to reset a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + /// + public static extern void reset_constant(Hash url_p1, string emitter_p2, Hash constant_p3); + + + /// + /// Resets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Resetting a constant through this function implies that the value defined in the material will be used. + /// Which particle FX to reset a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + /// + public static extern void reset_constant(Hash url_p1, Hash emitter_p2, string constant_p3); + + + /// + /// Resets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Resetting a constant through this function implies that the value defined in the material will be used. + /// Which particle FX to reset a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + /// + public static extern void reset_constant(Hash url_p1, Hash emitter_p2, Hash constant_p3); + + + /// + /// Resets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Resetting a constant through this function implies that the value defined in the material will be used. + /// Which particle FX to reset a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + /// + public static extern void reset_constant(Url url_p1, string emitter_p2, string constant_p3); + + + /// + /// Resets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Resetting a constant through this function implies that the value defined in the material will be used. + /// Which particle FX to reset a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + /// + public static extern void reset_constant(Url url_p1, string emitter_p2, Hash constant_p3); + + + /// + /// Resets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Resetting a constant through this function implies that the value defined in the material will be used. + /// Which particle FX to reset a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + /// + public static extern void reset_constant(Url url_p1, Hash emitter_p2, string constant_p3); + + + /// + /// Resets a shader constant for a particle FX component emitter. + /// The constant must be defined in the material assigned to the emitter. + /// Resetting a constant through this function implies that the value defined in the material will be used. + /// Which particle FX to reset a constant for is identified by the URL. + /// + /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" + /// + public static extern void reset_constant(Url url_p1, Hash emitter_p2, Hash constant_p3); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/physics.cs b/DefoldSharpLib/physics.cs new file mode 100644 index 0000000..0aae4d8 --- /dev/null +++ b/DefoldSharpLib/physics.cs @@ -0,0 +1,975 @@ +namespace DefoldSharp +{ + /// + /// Collision object physics API documentation + /// + /// + public static class Physics + { + #region Defold API + #region Messages + /// + /// + public class apply_force_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("apply_force"); + public override Hash FetchCode() => __CODE__; + + public vector3 force; + public vector3 position; + } + + + /// + /// + public class collision_response_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("collision_response"); + public override Hash FetchCode() => __CODE__; + + public Hash other_id; + public vector3 other_position; + public Hash other_group; + public Hash own_group; + } + + + /// + /// + public class contact_point_response_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("contact_point_response"); + public override Hash FetchCode() => __CODE__; + + public vector3 position; + public vector3 normal; + public vector3 relative_velocity; + public double distance; + public double applied_impulse; + public double life_time; + public double mass; + public double other_mass; + public Hash other_id; + public vector3 other_position; + public Hash other_group; + public Hash own_group; + } + + + /// + /// + public class trigger_response_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("trigger_response"); + public override Hash FetchCode() => __CODE__; + + public Hash other_id; + public bool enter; + public Hash other_group; + public Hash own_group; + } + + + /// + /// + public class ray_cast_response_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("ray_cast_response"); + public override Hash FetchCode() => __CODE__; + + public double fraction; + public vector3 position; + public vector3 normal; + public Hash id; + public Hash group; + public double request_id; + } + + + /// + /// + public class ray_cast_missed_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("ray_cast_missed"); + public override Hash FetchCode() => __CODE__; + + public double request_id; + } + + + #endregion Messages + + + /// + /// Ray casts are used to test for intersections against collision objects in the physics world. + /// Collision objects of types kinematic, dynamic and static are tested against. Trigger objects + /// do not intersect with ray casts. + /// Which collision objects to hit is filtered by their collision groups and can be configured + /// through groups. + /// The actual ray cast will be performed during the physics-update. + ///
    + ///
  • If an object is hit, the result will be reported via a ray_cast_response message.
  • + ///
  • If there is no object hit, the result will be reported via a ray_cast_missed message.
  • + ///
+ /// + /// @CSharpLua.Template = "physics.raycast_async({0}, {1}, {2})" + ///
+ public static extern void raycast_async(vector3 from_p1, vector3 to_p2, LuaTableBase groups_p3); + + + /// + /// Ray casts are used to test for intersections against collision objects in the physics world. + /// Collision objects of types kinematic, dynamic and static are tested against. Trigger objects + /// do not intersect with ray casts. + /// Which collision objects to hit is filtered by their collision groups and can be configured + /// through groups. + /// The actual ray cast will be performed during the physics-update. + ///
    + ///
  • If an object is hit, the result will be reported via a ray_cast_response message.
  • + ///
  • If there is no object hit, the result will be reported via a ray_cast_missed message.
  • + ///
+ /// + /// @CSharpLua.Template = "physics.raycast_async({0}, {1}, {2}, {3})" + ///
+ public static extern void raycast_async(vector3 from_p1, vector3 to_p2, LuaTableBase groups_p3, double request_id_p4); + + + /// + /// Ray casts are used to test for intersections against collision objects in the physics world. + /// Collision objects of types kinematic, dynamic and static are tested against. Trigger objects + /// do not intersect with ray casts. + /// Which collision objects to hit is filtered by their collision groups and can be configured + /// through groups. + /// + /// @CSharpLua.Template = "physics.raycast({0}, {1}, {2}, {3})" + /// + public static extern LuaTable raycast(vector3 from_p1, vector3 to_p2, LuaTableBase groups_p3, LuaTableBase options_p4); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, string collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, string collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, Hash collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, Hash collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, Url collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, Url collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, string collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, string collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, Hash collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, Hash collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, Url collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, Url collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, string collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, string collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, Hash collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, Hash collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, Url collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, Url collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, string collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, string collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, Hash collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, Hash collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, Url collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, Url collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, string collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, string collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, Hash collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, Hash collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, Url collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, string joint_id_p3, vector3 position_a_p4, Url collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, string collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, string collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, Hash collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, Hash collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, Url collisionobject_b_p5, vector3 position_b_p6); + + + /// + /// Create a physics joint between two collision object components. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" + /// + public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, Hash joint_id_p3, vector3 position_a_p4, Url collisionobject_b_p5, vector3 position_b_p6, LuaTableBase properties_p7); + + + /// + /// Destroy an already physics joint. The joint has to be created before a + /// destroy can be issued. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.destroy_joint({0}, {1})" + /// + public static extern void destroy_joint(string collisionobject_p1, string joint_id_p2); + + + /// + /// Destroy an already physics joint. The joint has to be created before a + /// destroy can be issued. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.destroy_joint({0}, {1})" + /// + public static extern void destroy_joint(string collisionobject_p1, Hash joint_id_p2); + + + /// + /// Destroy an already physics joint. The joint has to be created before a + /// destroy can be issued. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.destroy_joint({0}, {1})" + /// + public static extern void destroy_joint(Hash collisionobject_p1, string joint_id_p2); + + + /// + /// Destroy an already physics joint. The joint has to be created before a + /// destroy can be issued. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.destroy_joint({0}, {1})" + /// + public static extern void destroy_joint(Hash collisionobject_p1, Hash joint_id_p2); + + + /// + /// Destroy an already physics joint. The joint has to be created before a + /// destroy can be issued. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.destroy_joint({0}, {1})" + /// + public static extern void destroy_joint(Url collisionobject_p1, string joint_id_p2); + + + /// + /// Destroy an already physics joint. The joint has to be created before a + /// destroy can be issued. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.destroy_joint({0}, {1})" + /// + public static extern void destroy_joint(Url collisionobject_p1, Hash joint_id_p2); + + + /// + /// Get a table for properties for a connected joint. The joint has to be created before + /// properties can be retrieved. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" + /// + public static extern LuaTable get_joint_properties(string collisionobject_p1, string joint_id_p2); + + + /// + /// Get a table for properties for a connected joint. The joint has to be created before + /// properties can be retrieved. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" + /// + public static extern LuaTable get_joint_properties(string collisionobject_p1, Hash joint_id_p2); + + + /// + /// Get a table for properties for a connected joint. The joint has to be created before + /// properties can be retrieved. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" + /// + public static extern LuaTable get_joint_properties(Hash collisionobject_p1, string joint_id_p2); + + + /// + /// Get a table for properties for a connected joint. The joint has to be created before + /// properties can be retrieved. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" + /// + public static extern LuaTable get_joint_properties(Hash collisionobject_p1, Hash joint_id_p2); + + + /// + /// Get a table for properties for a connected joint. The joint has to be created before + /// properties can be retrieved. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" + /// + public static extern LuaTable get_joint_properties(Url collisionobject_p1, string joint_id_p2); + + + /// + /// Get a table for properties for a connected joint. The joint has to be created before + /// properties can be retrieved. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" + /// + public static extern LuaTable get_joint_properties(Url collisionobject_p1, Hash joint_id_p2); + + + /// + /// Updates the properties for an already connected joint. The joint has to be created before + /// properties can be changed. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" + /// + public static extern void set_joint_properties(string collisionobject_p1, string joint_id_p2, LuaTableBase properties_p3); + + + /// + /// Updates the properties for an already connected joint. The joint has to be created before + /// properties can be changed. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" + /// + public static extern void set_joint_properties(string collisionobject_p1, Hash joint_id_p2, LuaTableBase properties_p3); + + + /// + /// Updates the properties for an already connected joint. The joint has to be created before + /// properties can be changed. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" + /// + public static extern void set_joint_properties(Hash collisionobject_p1, string joint_id_p2, LuaTableBase properties_p3); + + + /// + /// Updates the properties for an already connected joint. The joint has to be created before + /// properties can be changed. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" + /// + public static extern void set_joint_properties(Hash collisionobject_p1, Hash joint_id_p2, LuaTableBase properties_p3); + + + /// + /// Updates the properties for an already connected joint. The joint has to be created before + /// properties can be changed. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" + /// + public static extern void set_joint_properties(Url collisionobject_p1, string joint_id_p2, LuaTableBase properties_p3); + + + /// + /// Updates the properties for an already connected joint. The joint has to be created before + /// properties can be changed. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" + /// + public static extern void set_joint_properties(Url collisionobject_p1, Hash joint_id_p2, LuaTableBase properties_p3); + + + /// + /// Get the reaction force for a joint. The joint has to be created before + /// the reaction force can be calculated. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" + /// + public static extern vector3 get_joint_reaction_force(string collisionobject_p1, string joint_id_p2); + + + /// + /// Get the reaction force for a joint. The joint has to be created before + /// the reaction force can be calculated. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" + /// + public static extern vector3 get_joint_reaction_force(string collisionobject_p1, Hash joint_id_p2); + + + /// + /// Get the reaction force for a joint. The joint has to be created before + /// the reaction force can be calculated. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" + /// + public static extern vector3 get_joint_reaction_force(Hash collisionobject_p1, string joint_id_p2); + + + /// + /// Get the reaction force for a joint. The joint has to be created before + /// the reaction force can be calculated. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" + /// + public static extern vector3 get_joint_reaction_force(Hash collisionobject_p1, Hash joint_id_p2); + + + /// + /// Get the reaction force for a joint. The joint has to be created before + /// the reaction force can be calculated. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" + /// + public static extern vector3 get_joint_reaction_force(Url collisionobject_p1, string joint_id_p2); + + + /// + /// Get the reaction force for a joint. The joint has to be created before + /// the reaction force can be calculated. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" + /// + public static extern vector3 get_joint_reaction_force(Url collisionobject_p1, Hash joint_id_p2); + + + /// + /// Get the reaction torque for a joint. The joint has to be created before + /// the reaction torque can be calculated. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" + /// + public static extern double get_joint_reaction_torque(string collisionobject_p1, string joint_id_p2); + + + /// + /// Get the reaction torque for a joint. The joint has to be created before + /// the reaction torque can be calculated. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" + /// + public static extern double get_joint_reaction_torque(string collisionobject_p1, Hash joint_id_p2); + + + /// + /// Get the reaction torque for a joint. The joint has to be created before + /// the reaction torque can be calculated. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" + /// + public static extern double get_joint_reaction_torque(Hash collisionobject_p1, string joint_id_p2); + + + /// + /// Get the reaction torque for a joint. The joint has to be created before + /// the reaction torque can be calculated. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" + /// + public static extern double get_joint_reaction_torque(Hash collisionobject_p1, Hash joint_id_p2); + + + /// + /// Get the reaction torque for a joint. The joint has to be created before + /// the reaction torque can be calculated. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" + /// + public static extern double get_joint_reaction_torque(Url collisionobject_p1, string joint_id_p2); + + + /// + /// Get the reaction torque for a joint. The joint has to be created before + /// the reaction torque can be calculated. + /// Note: Currently only supported in 2D physics. + /// + /// @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" + /// + public static extern double get_joint_reaction_torque(Url collisionobject_p1, Hash joint_id_p2); + + + /// + /// Set the gravity in runtime. The gravity change is not global, it will only affect + /// the collection that the function is called from. + /// Note: For 2D physics the z component of the gravity vector will be ignored. + /// + /// @CSharpLua.Template = "physics.set_gravity({0})" + /// + public static extern void set_gravity(vector3 gravity_p1); + + + /// + /// Get the gravity in runtime. The gravity returned is not global, it will return + /// the gravity for the collection that the function is called from. + /// Note: For 2D physics the z component will always be zero. + /// + /// @CSharpLua.Template = "physics.get_gravity()" + /// + public static extern vector3 get_gravity(); + + + /// + /// Flips the collision shapes horizontally for a collision object + /// + /// @CSharpLua.Template = "physics.set_hflip({0}, {1})" + /// + public static extern void set_hflip(string url_p1, bool flip_p2); + + + /// + /// Flips the collision shapes horizontally for a collision object + /// + /// @CSharpLua.Template = "physics.set_hflip({0}, {1})" + /// + public static extern void set_hflip(Hash url_p1, bool flip_p2); + + + /// + /// Flips the collision shapes horizontally for a collision object + /// + /// @CSharpLua.Template = "physics.set_hflip({0}, {1})" + /// + public static extern void set_hflip(Url url_p1, bool flip_p2); + + + /// + /// Flips the collision shapes vertically for a collision object + /// + /// @CSharpLua.Template = "physics.set_vflip({0}, {1})" + /// + public static extern void set_vflip(string url_p1, bool flip_p2); + + + /// + /// Flips the collision shapes vertically for a collision object + /// + /// @CSharpLua.Template = "physics.set_vflip({0}, {1})" + /// + public static extern void set_vflip(Hash url_p1, bool flip_p2); + + + /// + /// Flips the collision shapes vertically for a collision object + /// + /// @CSharpLua.Template = "physics.set_vflip({0}, {1})" + /// + public static extern void set_vflip(Url url_p1, bool flip_p2); + + + /// + /// Collision objects tend to fall asleep when inactive for a small period of time for + /// efficiency reasons. This function wakes them up. + /// + /// @CSharpLua.Template = "physics.wakeup({0})" + /// + public static extern void wakeup(string url_p1); + + + /// + /// Collision objects tend to fall asleep when inactive for a small period of time for + /// efficiency reasons. This function wakes them up. + /// + /// @CSharpLua.Template = "physics.wakeup({0})" + /// + public static extern void wakeup(Hash url_p1); + + + /// + /// Collision objects tend to fall asleep when inactive for a small period of time for + /// efficiency reasons. This function wakes them up. + /// + /// @CSharpLua.Template = "physics.wakeup({0})" + /// + public static extern void wakeup(Url url_p1); + + + /// + /// Updates the group property of a collision object to the specified + /// string value. The group name should exist i.e. have been used in + /// a collision object in the editor. + /// + /// @CSharpLua.Template = "physics.set_group({0}, {1})" + /// + public static extern void set_group(string url_p1, string group_p2); + + + /// + /// Updates the group property of a collision object to the specified + /// string value. The group name should exist i.e. have been used in + /// a collision object in the editor. + /// + /// @CSharpLua.Template = "physics.set_group({0}, {1})" + /// + public static extern void set_group(Hash url_p1, string group_p2); + + + /// + /// Updates the group property of a collision object to the specified + /// string value. The group name should exist i.e. have been used in + /// a collision object in the editor. + /// + /// @CSharpLua.Template = "physics.set_group({0}, {1})" + /// + public static extern void set_group(Url url_p1, string group_p2); + + + /// + /// Returns the group name of a collision object as a hash. + /// + /// @CSharpLua.Template = "physics.get_group({0})" + /// + public static extern Hash get_group(string url_p1); + + + /// + /// Returns the group name of a collision object as a hash. + /// + /// @CSharpLua.Template = "physics.get_group({0})" + /// + public static extern Hash get_group(Hash url_p1); + + + /// + /// Returns the group name of a collision object as a hash. + /// + /// @CSharpLua.Template = "physics.get_group({0})" + /// + public static extern Hash get_group(Url url_p1); + + + /// + /// Sets or clears the masking of a group (maskbit) in a collision object. + /// + /// @CSharpLua.Template = "physics.set_maskbit({0}, {1}, {2})" + /// + public static extern void set_maskbit(string url_p1, string group_p2, bool maskbit_p3); + + + /// + /// Sets or clears the masking of a group (maskbit) in a collision object. + /// + /// @CSharpLua.Template = "physics.set_maskbit({0}, {1}, {2})" + /// + public static extern void set_maskbit(Hash url_p1, string group_p2, bool maskbit_p3); + + + /// + /// Sets or clears the masking of a group (maskbit) in a collision object. + /// + /// @CSharpLua.Template = "physics.set_maskbit({0}, {1}, {2})" + /// + public static extern void set_maskbit(Url url_p1, string group_p2, bool maskbit_p3); + + + /// + /// Returns true if the specified group is set in the mask of a collision + /// object, false otherwise. + /// + /// @CSharpLua.Template = "physics.get_maskbit({0}, {1})" + /// + public static extern bool get_maskbit(string url_p1, string group_p2); + + + /// + /// Returns true if the specified group is set in the mask of a collision + /// object, false otherwise. + /// + /// @CSharpLua.Template = "physics.get_maskbit({0}, {1})" + /// + public static extern bool get_maskbit(Hash url_p1, string group_p2); + + + /// + /// Returns true if the specified group is set in the mask of a collision + /// object, false otherwise. + /// + /// @CSharpLua.Template = "physics.get_maskbit({0}, {1})" + /// + public static extern bool get_maskbit(Url url_p1, string group_p2); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/profiler.cs b/DefoldSharpLib/profiler.cs new file mode 100644 index 0000000..9074f15 --- /dev/null +++ b/DefoldSharpLib/profiler.cs @@ -0,0 +1,142 @@ +namespace DefoldSharp +{ + /// + /// Profiler API documentation + /// + /// + public static class Profiler + { + #region Defold API + /// + /// Get the amount of memory used (resident/working set) by the application in bytes, as reported by the OS. + /// This function is not available on HTML5. + /// The values are gathered from internal OS functions which correspond to the following; + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + ///
OSValue
iOS
MacOS

Androd
Linux
Resident memory
WindowsWorking set
HTML5 Not available
+ /// + /// @CSharpLua.Template = "profiler.get_memory_usage()" + ///
+ public static extern double get_memory_usage(); + + + /// + /// Get the percent of CPU usage by the application, as reported by the OS. + /// This function is not available on HTML5. + /// For some platforms ( Android, Linux and Windows), this information is only available + /// by default in the debug version of the engine. It can be enabled in release version as well + /// by checking track_cpu under profiler in the game.project file. + /// (This means that the engine will sample the CPU usage in intervalls during execution even in release mode.) + /// + /// @CSharpLua.Template = "profiler.get_cpu_usage()" + /// + public static extern double get_cpu_usage(); + + + /// + /// Creates and shows or hides and destroys the on-sceen profiler ui + /// The profiler is a real-time tool that shows the numbers of milliseconds spent + /// in each scope per frame as well as counters. The profiler is very useful for + /// tracking down performance and resource problems. + /// + /// @CSharpLua.Template = "profiler.enable_ui({0})" + /// + public static extern void enable_ui(bool enabled_p1); + + + /// + /// Set the on-screen profile mode - run, pause, record or show peak frame + /// + /// @CSharpLua.Template = "profiler.set_ui_mode({0})" + /// + public static extern void set_ui_mode(ProfilerMode mode_p1); + + + /// + /// Set the on-screen profile view mode - minimized or expanded + /// + /// @CSharpLua.Template = "profiler.set_ui_view_mode({0})" + /// + public static extern void set_ui_view_mode(ProfilerViewMode mode_p1); + + + /// + /// Shows or hides the time the engine waits for vsync in the on-screen profiler + /// Each frame the engine waits for vsync and depending on your vsync settings and how much time + /// your game logic takes this time can dwarf the time in the game logic making it hard to + /// see details in the on-screen profiler graph and lists. + /// Also, by hiding this the FPS times in the header show the time spent each time excuding the + /// time spent waiting for vsync. This shows you how long time your game is spending actively + /// working each frame. + /// This setting also effects the display of recorded frames but does not affect the actual + /// recorded frames so it is possible to toggle this on and off when viewing recorded frames. + /// By default the vsync wait times is displayed in the profiler. + /// + /// @CSharpLua.Template = "profiler.set_ui_vsync_wait_visible({0})" + /// + public static extern void set_ui_vsync_wait_visible(bool visible_p1); + + + /// + /// Get the number of recorded frames in the on-screen profiler ui recording buffer + /// + /// @CSharpLua.Template = "profiler.recorded_frame_count()" + /// + public static extern double recorded_frame_count(); + + + /// + /// Pauses and displays a frame from the recording buffer in the on-screen profiler ui + /// The frame to show can either be an absolute frame or a relative frame to the current frame. + /// + /// @CSharpLua.Template = "profiler.view_recorded_frame({0})" + /// + public static extern void view_recorded_frame(LuaTableBase frame_index_p1); + + + /// + /// Send a text to the profiler + /// + /// @CSharpLua.Template = "profiler.log_text({0})" + /// + public static extern void log_text(string text_p1); + + + /// + /// Starts a profile scope. + /// + /// @CSharpLua.Template = "profiler.scope_begin({0})" + /// + public static extern void scope_begin(string name_p1); + + + /// + /// End the current profile scope. + /// + /// @CSharpLua.Template = "profiler.scope_end()" + /// + public static extern void scope_end(); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/push.cs b/DefoldSharpLib/push.cs new file mode 100644 index 0000000..9d49d88 --- /dev/null +++ b/DefoldSharpLib/push.cs @@ -0,0 +1,12 @@ +namespace DefoldSharp +{ + /// + /// Push notifications API documentation + /// + /// + public static class Push + { + #region Defold API + #endregion Defold API + } +} diff --git a/DefoldSharpLib/render.cs b/DefoldSharpLib/render.cs new file mode 100644 index 0000000..b17592a --- /dev/null +++ b/DefoldSharpLib/render.cs @@ -0,0 +1,529 @@ +namespace DefoldSharp +{ + /// + /// Rendering API documentation + /// + /// + public static class Render + { + #region Defold API + #region Messages + /// + /// + public class draw_debug_text_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("draw_debug_text"); + public override Hash FetchCode() => __CODE__; + + public vector3 position; + public string text; + public vector4 color; + } + + + /// + /// + public class draw_line_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("draw_line"); + public override Hash FetchCode() => __CODE__; + + public vector3 start_point; + public vector3 end_point; + public vector4 color; + } + + + /// + /// + public class window_resized_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("window_resized"); + public override Hash FetchCode() => __CODE__; + + public double height; + public double width; + } + + + /// + /// + public class resize_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("resize"); + public override Hash FetchCode() => __CODE__; + + public double height; + public double width; + } + + + /// + /// + public class clear_color_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("clear_color"); + public override Hash FetchCode() => __CODE__; + + public vector4 color; + } + + + #endregion Messages + + + /// + /// Constant buffers are used to set shader program variables and are optionally passed to the render.draw() function. + /// The buffer's constant elements can be indexed like an ordinary Lua table, but you can't iterate over them with pairs() or ipairs(). + /// + /// @CSharpLua.Template = "render.constant_buffer()" + /// + public static extern ConstantBuffer constant_buffer(); + + + /// + /// Enables a particular render state. The state will be enabled until disabled. + /// + /// @CSharpLua.Template = "render.enable_state({0})" + /// + public static extern void enable_state(RenderState state_p1); + + + /// + /// Disables a render state. + /// + /// @CSharpLua.Template = "render.disable_state({0})" + /// + public static extern void disable_state(RenderState state_p1); + + + /// + /// Set the render viewport to the specified rectangle. + /// + /// @CSharpLua.Template = "render.set_viewport({0}, {1}, {2}, {3})" + /// + public static extern void set_viewport(double x_p1, double y_p2, double width_p3, double height_p4); + + + /// + /// Disables a texture unit for a render target that has previourly been enabled. + /// + /// @CSharpLua.Template = "render.disable_texture({0})" + /// + public static extern void disable_texture(double unit_p1); + + + /// + /// Clear buffers in the currently enabled render target with specified value. If the render target has been created with multiple + /// color attachments, all buffers will be cleared with the same value. + /// + /// @CSharpLua.Template = "render.clear({0})" + /// + public static extern void clear(LuaTableBase buffers_p1); + + + /// + /// Draws all objects that match a specified predicate. An optional constant buffer can be + /// provided to override the default constants. If no constants buffer is provided, a default + /// system constants buffer is used containing constants as defined in materials and set through + /// go.set (or particlefx.set_constant) on visual components. + /// + /// @CSharpLua.Template = "render.draw({0})" + /// + public static extern void draw(LuaTableBase predicate_p1); + + + /// + /// Draws all objects that match a specified predicate. An optional constant buffer can be + /// provided to override the default constants. If no constants buffer is provided, a default + /// system constants buffer is used containing constants as defined in materials and set through + /// go.set (or particlefx.set_constant) on visual components. + /// + /// @CSharpLua.Template = "render.draw({0}, {1})" + /// + public static extern void draw(LuaTableBase predicate_p1, LuaTableBase options_p2); + + + /// + /// Draws all 3d debug graphics such as lines drawn with "draw_line" messages and physics visualization. + /// + /// @CSharpLua.Template = "render.draw_debug3d()" + /// + public static extern void draw_debug3d(); + + + /// + /// Draws all 3d debug graphics such as lines drawn with "draw_line" messages and physics visualization. + /// + /// @CSharpLua.Template = "render.draw_debug3d({0})" + /// + public static extern void draw_debug3d(LuaTableBase options_p1); + + + /// + /// Sets the view matrix to use when rendering. + /// + /// @CSharpLua.Template = "render.set_view({0})" + /// + public static extern void set_view(Matrix4 matrix_p1); + + + /// + /// Sets the projection matrix to use when rendering. + /// + /// @CSharpLua.Template = "render.set_projection({0})" + /// + public static extern void set_projection(Matrix4 matrix_p1); + + + /// + /// Specifies the arithmetic used when computing pixel values that are written to the frame + /// buffer. In RGBA mode, pixels can be drawn using a function that blends the source RGBA + /// pixel values with the destination pixel values already in the frame buffer. + /// Blending is initially disabled. + /// source_factor specifies which method is used to scale the source color components. + /// destination_factor specifies which method is used to scale the destination color + /// components. + /// Source color components are referred to as (Rs,Gs,Bs,As). + /// Destination color components are referred to as (Rd,Gd,Bd,Ad). + /// The color specified by setting the blendcolor is referred to as (Rc,Gc,Bc,Ac). + /// The source scale factor is referred to as (sR,sG,sB,sA). + /// The destination scale factor is referred to as (dR,dG,dB,dA). + /// The color values have integer values between 0 and (kR,kG,kB,kA), where kc = 2mc - 1 and mc is the number of bitplanes for that color. I.e for 8 bit color depth, color values are between 0 and 255. + /// Available factor constants and corresponding scale factors: + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + ///
Factor constantScale factor (fR,fG,fB,fA)
render.BLEND_ZERO(0,0,0,0)
render.BLEND_ONE(1,1,1,1)
render.BLEND_SRC_COLOR(Rs/kR,Gs/kG,Bs/kB,As/kA)
render.BLEND_ONE_MINUS_SRC_COLOR(1,1,1,1) - (Rs/kR,Gs/kG,Bs/kB,As/kA)
render.BLEND_DST_COLOR(Rd/kR,Gd/kG,Bd/kB,Ad/kA)
render.BLEND_ONE_MINUS_DST_COLOR(1,1,1,1) - (Rd/kR,Gd/kG,Bd/kB,Ad/kA)
render.BLEND_SRC_ALPHA(As/kA,As/kA,As/kA,As/kA)
render.BLEND_ONE_MINUS_SRC_ALPHA(1,1,1,1) - (As/kA,As/kA,As/kA,As/kA)
render.BLEND_DST_ALPHA(Ad/kA,Ad/kA,Ad/kA,Ad/kA)
render.BLEND_ONE_MINUS_DST_ALPHA(1,1,1,1) - (Ad/kA,Ad/kA,Ad/kA,Ad/kA)
render.BLEND_CONSTANT_COLOR(Rc,Gc,Bc,Ac)
render.BLEND_ONE_MINUS_CONSTANT_COLOR(1,1,1,1) - (Rc,Gc,Bc,Ac)
render.BLEND_CONSTANT_ALPHA(Ac,Ac,Ac,Ac)
render.BLEND_ONE_MINUS_CONSTANT_ALPHA(1,1,1,1) - (Ac,Ac,Ac,Ac)
render.BLEND_SRC_ALPHA_SATURATE(i,i,i,1) where i = min(As, kA - Ad) /kA
+ /// The blended RGBA values of a pixel comes from the following equations: + ///
    + ///
  • Rd = min(kR, Rs * sR + Rd * dR)
  • + ///
  • Gd = min(kG, Gs * sG + Gd * dG)
  • + ///
  • Bd = min(kB, Bs * sB + Bd * dB)
  • + ///
  • Ad = min(kA, As * sA + Ad * dA)
  • + ///
+ /// Blend function (render.BLEND_SRC_ALPHA, render.BLEND_ONE_MINUS_SRC_ALPHA) is useful for + /// drawing with transparency when the drawn objects are sorted from farthest to nearest. + /// It is also useful for drawing antialiased points and lines in arbitrary order. + /// + /// @CSharpLua.Template = "render.set_blend_func({0}, {1})" + ///
+ public static extern void set_blend_func(BlendFunction source_factor_p1, BlendFunction destination_factor_p2); + + + /// + /// Specifies whether the individual color components in the frame buffer is enabled for writing (true) or disabled (false). For example, if blue is false, nothing is written to the blue component of any pixel in any of the color buffers, regardless of the drawing operation attempted. Note that writing are either enabled or disabled for entire color components, not the individual bits of a component. + /// The component masks are all initially true. + /// + /// @CSharpLua.Template = "render.set_color_mask({0}, {1}, {2}, {3})" + /// + public static extern void set_color_mask(bool red_p1, bool green_p2, bool blue_p3, bool alpha_p4); + + + /// + /// Specifies whether the depth buffer is enabled for writing. The supplied mask governs + /// if depth buffer writing is enabled (true) or disabled (false). + /// The mask is initially true. + /// + /// @CSharpLua.Template = "render.set_depth_mask({0})" + /// + public static extern void set_depth_mask(bool depth_p1); + + + /// + /// The stencil mask controls the writing of individual bits in the stencil buffer. + /// The least significant n bits of the parameter mask, where n is the number of + /// bits in the stencil buffer, specify the mask. + /// Where a 1 bit appears in the mask, the corresponding + /// bit in the stencil buffer can be written. Where a 0 bit appears in the mask, + /// the corresponding bit in the stencil buffer is never written. + /// The mask is initially all 1's. + /// + /// @CSharpLua.Template = "render.set_stencil_mask({0})" + /// + public static extern void set_stencil_mask(double mask_p1); + + + /// + /// Specifies the function that should be used to compare each incoming pixel + /// depth value with the value present in the depth buffer. + /// The comparison is performed only if depth testing is enabled and specifies + /// the conditions under which a pixel will be drawn. + /// Function constants: + ///
    + ///
  • render.COMPARE_FUNC_NEVER (never passes)
  • + ///
  • render.COMPARE_FUNC_LESS (passes if the incoming depth value is less than the stored value)
  • + ///
  • render.COMPARE_FUNC_LEQUAL (passes if the incoming depth value is less than or equal to the stored value)
  • + ///
  • render.COMPARE_FUNC_GREATER (passes if the incoming depth value is greater than the stored value)
  • + ///
  • render.COMPARE_FUNC_GEQUAL (passes if the incoming depth value is greater than or equal to the stored value)
  • + ///
  • render.COMPARE_FUNC_EQUAL (passes if the incoming depth value is equal to the stored value)
  • + ///
  • render.COMPARE_FUNC_NOTEQUAL (passes if the incoming depth value is not equal to the stored value)
  • + ///
  • render.COMPARE_FUNC_ALWAYS (always passes)
  • + ///
+ /// The depth function is initially set to render.COMPARE_FUNC_LESS. + /// + /// @CSharpLua.Template = "render.set_depth_func({0})" + ///
+ public static extern void set_depth_func(DepthFunction func_p1); + + + /// + /// Stenciling is similar to depth-buffering as it enables and disables drawing on a + /// per-pixel basis. First, GL drawing primitives are drawn into the stencil planes. + /// Second, geometry and images are rendered but using the stencil planes to mask out + /// where to draw. + /// The stencil test discards a pixel based on the outcome of a comparison between the + /// reference value ref and the corresponding value in the stencil buffer. + /// func specifies the comparison function. See the table below for values. + /// The initial value is render.COMPARE_FUNC_ALWAYS. + /// ref specifies the reference value for the stencil test. The value is clamped to + /// the range [0, 2n-1], where n is the number of bitplanes in the stencil buffer. + /// The initial value is 0. + /// mask is ANDed with both the reference value and the stored stencil value when the test + /// is done. The initial value is all 1's. + /// Function constant: + ///
    + ///
  • render.COMPARE_FUNC_NEVER (never passes)
  • + ///
  • render.COMPARE_FUNC_LESS (passes if (ref & mask) < (stencil & mask))
  • + ///
  • render.COMPARE_FUNC_LEQUAL (passes if (ref & mask) <= (stencil & mask))
  • + ///
  • render.COMPARE_FUNC_GREATER (passes if (ref & mask) > (stencil & mask))
  • + ///
  • render.COMPARE_FUNC_GEQUAL (passes if (ref & mask) >= (stencil & mask))
  • + ///
  • render.COMPARE_FUNC_EQUAL (passes if (ref & mask) = (stencil & mask))
  • + ///
  • render.COMPARE_FUNC_NOTEQUAL (passes if (ref & mask) != (stencil & mask))
  • + ///
  • render.COMPARE_FUNC_ALWAYS (always passes)
  • + ///
+ /// + /// @CSharpLua.Template = "render.set_stencil_func({0}, {1}, {2})" + ///
+ public static extern void set_stencil_func(DepthFunction func_p1, double ref_p2, double mask_p3); + + + /// + /// The stencil test discards a pixel based on the outcome of a comparison between the + /// reference value ref and the corresponding value in the stencil buffer. + /// To control the test, call render.set_stencil_func. + /// This function takes three arguments that control what happens to the stored stencil + /// value while stenciling is enabled. If the stencil test fails, no change is made to the + /// pixel's color or depth buffers, and sfail specifies what happens to the stencil buffer + /// contents. + /// Operator constants: + ///
    + ///
  • render.STENCIL_OP_KEEP (keeps the current value)
  • + ///
  • render.STENCIL_OP_ZERO (sets the stencil buffer value to 0)
  • + ///
  • render.STENCIL_OP_REPLACE (sets the stencil buffer value to ref, as specified by render.set_stencil_func)
  • + ///
  • render.STENCIL_OP_INCR (increments the stencil buffer value and clamp to the maximum representable unsigned value)
  • + ///
  • render.STENCIL_OP_INCR_WRAP (increments the stencil buffer value and wrap to zero when incrementing the maximum representable unsigned value)
  • + ///
  • render.STENCIL_OP_DECR (decrements the current stencil buffer value and clamp to 0)
  • + ///
  • render.STENCIL_OP_DECR_WRAP (decrements the current stencil buffer value and wrap to the maximum representable unsigned value when decrementing zero)
  • + ///
  • render.STENCIL_OP_INVERT (bitwise inverts the current stencil buffer value)
  • + ///
+ /// dppass and dpfail specify the stencil buffer actions depending on whether subsequent + /// depth buffer tests succeed (dppass) or fail (dpfail). + /// The initial value for all operators is render.STENCIL_OP_KEEP. + /// + /// @CSharpLua.Template = "render.set_stencil_op({0}, {1}, {2})" + ///
+ public static extern void set_stencil_op(StencilOperator sfail_p1, StencilOperator dpfail_p2, StencilOperator dppass_p3); + + + /// + /// Specifies whether front- or back-facing polygons can be culled + /// when polygon culling is enabled. Polygon culling is initially disabled. + /// If mode is render.FACE_FRONT_AND_BACK, no polygons are drawn, but other + /// primitives such as points and lines are drawn. The initial value for + /// face_type is render.FACE_BACK. + /// + /// @CSharpLua.Template = "render.set_cull_face({0})" + /// + public static extern void set_cull_face(FaceType face_type_p1); + + + /// + /// Sets the scale and units used to calculate depth values. + /// If render.STATE_POLYGON_OFFSET_FILL is enabled, each fragment's depth value + /// is offset from its interpolated value (depending on the depth value of the + /// appropriate vertices). Polygon offset can be used when drawing decals, rendering + /// hidden-line images etc. + /// factor specifies a scale factor that is used to create a variable depth + /// offset for each polygon. The initial value is 0. + /// units is multiplied by an implementation-specific value to create a + /// constant depth offset. The initial value is 0. + /// The value of the offset is computed as factor × DZ + r × units + /// DZ is a measurement of the depth slope of the polygon which is the change in z (depth) + /// values divided by the change in either x or y coordinates, as you traverse a polygon. + /// The depth values are in window coordinates, clamped to the range [0, 1]. + /// r is the smallest value that is guaranteed to produce a resolvable difference. + /// It's value is an implementation-specific constant. + /// The offset is added before the depth test is performed and before the + /// value is written into the depth buffer. + /// + /// @CSharpLua.Template = "render.set_polygon_offset({0}, {1})" + /// + public static extern void set_polygon_offset(double factor_p1, double units_p2); + + + /// + /// Returns the logical window width that is set in the "game.project" settings. + /// Note that the actual window pixel size can change, either by device constraints + /// or user input. + /// + /// @CSharpLua.Template = "render.get_width()" + /// + public static extern double get_width(); + + + /// + /// Returns the logical window height that is set in the "game.project" settings. + /// Note that the actual window pixel size can change, either by device constraints + /// or user input. + /// + /// @CSharpLua.Template = "render.get_height()" + /// + public static extern double get_height(); + + + /// + /// Returns the actual physical window width. + /// Note that this value might differ from the logical width that is set in the + /// "game.project" settings. + /// + /// @CSharpLua.Template = "render.get_window_width()" + /// + public static extern double get_window_width(); + + + /// + /// Returns the actual physical window height. + /// Note that this value might differ from the logical height that is set in the + /// "game.project" settings. + /// + /// @CSharpLua.Template = "render.get_window_height()" + /// + public static extern double get_window_height(); + + + /// + /// This function returns a new render predicate for objects with materials matching + /// the provided material tags. The provided tags are combined into a bit mask + /// for the predicate. If multiple tags are provided, the predicate matches materials + /// with all tags ANDed together. + /// The current limit to the number of tags that can be defined is 64. + /// + /// @CSharpLua.Template = "render.predicate({0})" + /// + public static extern LuaTable predicate(LuaTableBase tags_p1); + + + /// + /// This function returns a new render predicate for objects with materials matching + /// the provided material tags. The provided tags are combined into a bit mask + /// for the predicate. If multiple tags are provided, the predicate matches materials + /// with all tags ANDed together. + /// The current limit to the number of tags that can be defined is 64. + /// + /// @CSharpLua.Template = "render.predicate({0})" + /// + public static extern LuaTable predicate(LuaArrayOf tags_p1); + + + /// + /// If another material was already enabled, it will be automatically disabled + /// and the specified material is used instead. + /// The name of the material must be specified in the ".render" resource set + /// in the "game.project" setting. + /// + /// @CSharpLua.Template = "render.enable_material({0})" + /// + public static extern void enable_material(string material_id_p1); + + + /// + /// If another material was already enabled, it will be automatically disabled + /// and the specified material is used instead. + /// The name of the material must be specified in the ".render" resource set + /// in the "game.project" setting. + /// + /// @CSharpLua.Template = "render.enable_material({0})" + /// + public static extern void enable_material(Hash material_id_p1); + + + /// + /// If a material is currently enabled, disable it. + /// The name of the material must be specified in the ".render" resource set + /// in the "game.project" setting. + /// + /// @CSharpLua.Template = "render.disable_material()" + /// + public static extern void disable_material(); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/resource.cs b/DefoldSharpLib/resource.cs new file mode 100644 index 0000000..c6f9e0e --- /dev/null +++ b/DefoldSharpLib/resource.cs @@ -0,0 +1,339 @@ +using System; + +namespace DefoldSharp +{ + /// + /// Resource API documentation + /// + /// + public static class Resource + { + #region Defold API + /// + /// Constructor-like function with two purposes: + ///
    + ///
  • Load the specified resource as part of loading the script
  • + ///
  • Return a hash to the run-time version of the resource
  • + ///
+ /// This function can only be called within go.property function calls. + /// + /// @CSharpLua.Template = "resource.material()" + ///
+ public static extern Hash material(); + + + /// + /// Constructor-like function with two purposes: + ///
    + ///
  • Load the specified resource as part of loading the script
  • + ///
  • Return a hash to the run-time version of the resource
  • + ///
+ /// This function can only be called within go.property function calls. + /// + /// @CSharpLua.Template = "resource.material({0})" + ///
+ public static extern Hash material(string path_p1); + + + /// + /// Constructor-like function with two purposes: + ///
    + ///
  • Load the specified resource as part of loading the script
  • + ///
  • Return a hash to the run-time version of the resource
  • + ///
+ /// This function can only be called within go.property function calls. + /// + /// @CSharpLua.Template = "resource.font()" + ///
+ public static extern Hash font(); + + + /// + /// Constructor-like function with two purposes: + ///
    + ///
  • Load the specified resource as part of loading the script
  • + ///
  • Return a hash to the run-time version of the resource
  • + ///
+ /// This function can only be called within go.property function calls. + /// + /// @CSharpLua.Template = "resource.font({0})" + ///
+ public static extern Hash font(string path_p1); + + + /// + /// Constructor-like function with two purposes: + ///
    + ///
  • Load the specified resource as part of loading the script
  • + ///
  • Return a hash to the run-time version of the resource
  • + ///
+ /// This function can only be called within go.property function calls. + /// + /// @CSharpLua.Template = "resource.texture()" + ///
+ public static extern Hash texture(); + + + /// + /// Constructor-like function with two purposes: + ///
    + ///
  • Load the specified resource as part of loading the script
  • + ///
  • Return a hash to the run-time version of the resource
  • + ///
+ /// This function can only be called within go.property function calls. + /// + /// @CSharpLua.Template = "resource.texture({0})" + ///
+ public static extern Hash texture(string path_p1); + + + /// + /// Constructor-like function with two purposes: + ///
    + ///
  • Load the specified resource as part of loading the script
  • + ///
  • Return a hash to the run-time version of the resource
  • + ///
+ /// This function can only be called within go.property function calls. + /// + /// @CSharpLua.Template = "resource.atlas()" + ///
+ public static extern Hash atlas(); + + + /// + /// Constructor-like function with two purposes: + ///
    + ///
  • Load the specified resource as part of loading the script
  • + ///
  • Return a hash to the run-time version of the resource
  • + ///
+ /// This function can only be called within go.property function calls. + /// + /// @CSharpLua.Template = "resource.atlas({0})" + ///
+ public static extern Hash atlas(string path_p1); + + + /// + /// Constructor-like function with two purposes: + ///
    + ///
  • Load the specified resource as part of loading the script
  • + ///
  • Return a hash to the run-time version of the resource
  • + ///
+ /// This function can only be called within go.property function calls. + /// + /// @CSharpLua.Template = "resource.buffer()" + ///
+ public static extern Hash buffer(); + + + /// + /// Constructor-like function with two purposes: + ///
    + ///
  • Load the specified resource as part of loading the script
  • + ///
  • Return a hash to the run-time version of the resource
  • + ///
+ /// This function can only be called within go.property function calls. + /// + /// @CSharpLua.Template = "resource.buffer({0})" + ///
+ public static extern Hash buffer(string path_p1); + + + /// + /// Constructor-like function with two purposes: + ///
    + ///
  • Load the specified resource as part of loading the script
  • + ///
  • Return a hash to the run-time version of the resource
  • + ///
+ /// This function can only be called within go.property function calls. + /// + /// @CSharpLua.Template = "resource.tile_source()" + ///
+ public static extern Hash tile_source(); + + + /// + /// Constructor-like function with two purposes: + ///
    + ///
  • Load the specified resource as part of loading the script
  • + ///
  • Return a hash to the run-time version of the resource
  • + ///
+ /// This function can only be called within go.property function calls. + /// + /// @CSharpLua.Template = "resource.tile_source({0})" + ///
+ public static extern Hash tile_source(string path_p1); + + + /// + /// Sets the resource data for a specific resource + /// + /// @CSharpLua.Template = "resource.set({0}, {1})" + /// + public static extern void set(string path_p1, DataBuffer buffer_p2); + + + /// + /// Sets the resource data for a specific resource + /// + /// @CSharpLua.Template = "resource.set({0}, {1})" + /// + public static extern void set(Hash path_p1, DataBuffer buffer_p2); + + + /// + /// Loads the resource data for a specific resource. + /// + /// @CSharpLua.Template = "resource.load({0})" + /// + public static extern DataBuffer load(string path_p1); + + + /// + /// Sets the pixel data for a specific texture. + /// + /// @CSharpLua.Template = "resource.set_texture({0}, {1}, {2})" + /// + public static extern void set_texture(Hash path_p1, LuaTableBase table_p2, DataBuffer buffer_p3); + + + /// + /// Sets the pixel data for a specific texture. + /// + /// @CSharpLua.Template = "resource.set_texture({0}, {1}, {2})" + /// + public static extern void set_texture(string path_p1, LuaTableBase table_p2, DataBuffer buffer_p3); + + + /// + /// Update internal sound resource (wavc/oggc) with new data + /// + /// @CSharpLua.Template = "resource.set_sound({0}, {1})" + /// + public static extern void set_sound(Hash path_p1, string buffer_p2); + + + /// + /// Update internal sound resource (wavc/oggc) with new data + /// + /// @CSharpLua.Template = "resource.set_sound({0}, {1})" + /// + public static extern void set_sound(string path_p1, string buffer_p2); + + + /// + /// gets the buffer from a resource + /// + /// @CSharpLua.Template = "resource.get_buffer({0})" + /// + public static extern DataBuffer get_buffer(Hash path_p1); + + + /// + /// gets the buffer from a resource + /// + /// @CSharpLua.Template = "resource.get_buffer({0})" + /// + public static extern DataBuffer get_buffer(string path_p1); + + + /// + /// sets the buffer of a resource + /// + /// @CSharpLua.Template = "resource.set_buffer({0}, {1})" + /// + public static extern void set_buffer(Hash path_p1, DataBuffer buffer_p2); + + + /// + /// sets the buffer of a resource + /// + /// @CSharpLua.Template = "resource.set_buffer({0}, {1})" + /// + public static extern void set_buffer(string path_p1, DataBuffer buffer_p2); + + + /// + /// Gets the text metrics from a font + /// + /// @CSharpLua.Template = "resource.get_text_metrics({0}, {1})" + /// + public static extern LuaTable get_text_metrics(Hash url_p1, string text_p2); + + + /// + /// Gets the text metrics from a font + /// + /// @CSharpLua.Template = "resource.get_text_metrics({0}, {1}, {2})" + /// + public static extern LuaTable get_text_metrics(Hash url_p1, string text_p2, LuaTableBase options_p3); + + + /// + /// Return a reference to the Manifest that is currently loaded. + /// + /// @CSharpLua.Template = "resource.get_current_manifest()" + /// + public static extern double get_current_manifest(); + + + /// + /// add a resource to the data archive and runtime index. The resource will be verified + /// internally before being added to the data archive. + /// + /// @CSharpLua.Template = "resource.store_resource({0}, {1}, {2}, {3})" + /// + public static extern void store_resource(double manifest_reference_p1, string data_p2, string hexdigest_p3, Action callback_p4); + + + /// + /// Create a new manifest from a buffer. The created manifest is verified + /// by ensuring that the manifest was signed using the bundled public/private + /// key-pair during the bundle process and that the manifest supports the current + /// running engine version. Once the manifest is verified it is stored on device. + /// The next time the engine starts (or is rebooted) it will look for the stored + /// manifest before loading resources. Storing a new manifest allows the + /// developer to update the game, modify existing resources, or add new + /// resources to the game through LiveUpdate. + /// + /// @CSharpLua.Template = "resource.store_manifest({0}, {1})" + /// + public static extern void store_manifest(string manifest_buffer_p1, Action callback_p2); + + + /// + /// Stores a zip file and uses it for live update content. The contents of the + /// zip file will be verified against the manifest to ensure file integrity. + /// It is possible to opt out of the resource verification using an option passed + /// to this function. + /// The path is stored in the (internal) live update location. + /// + /// @CSharpLua.Template = "resource.store_archive({0}, {1})" + /// + public static extern void store_archive(string path_p1, Action callback_p2); + + + /// + /// Stores a zip file and uses it for live update content. The contents of the + /// zip file will be verified against the manifest to ensure file integrity. + /// It is possible to opt out of the resource verification using an option passed + /// to this function. + /// The path is stored in the (internal) live update location. + /// + /// @CSharpLua.Template = "resource.store_archive({0}, {1}, {2})" + /// + public static extern void store_archive(string path_p1, Action callback_p2, LuaTableBase options_p3); + + + /// + /// Is any liveupdate data mounted and currently in use? + /// This can be used to determine if a new manifest or zip file should be downloaded. + /// + /// @CSharpLua.Template = "resource.is_using_liveupdate_data()" + /// + public static extern bool is_using_liveupdate_data(); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/sound.cs b/DefoldSharpLib/sound.cs new file mode 100644 index 0000000..8a5879f --- /dev/null +++ b/DefoldSharpLib/sound.cs @@ -0,0 +1,647 @@ +using System; + +namespace DefoldSharp +{ + /// + /// Sound API documentation + /// + /// + public class Sound : BuiltInComponentBase + { + #region Defold API + #region Messages + /// + /// + public class play_sound_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("play_sound"); + public override Hash FetchCode() => __CODE__; + + public double delay; + public double gain; + public double play_id; + } + + + /// + /// + public class stop_sound_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("stop_sound"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class set_gain_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("set_gain"); + public override Hash FetchCode() => __CODE__; + + public double gain; + } + + + /// + /// + public class sound_done_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("sound_done"); + public override Hash FetchCode() => __CODE__; + + public double play_id; + } + + + #endregion Messages + + + /// + /// Checks if background music is playing, e.g. from iTunes. + /// On non mobile platforms, + /// this function always return false. + /// On Android you can only get a correct reading + /// of this state if your game is not playing any sounds itself. This is a limitation + /// in the Android SDK. If your game is playing any sounds, even with a gain of zero, this + /// function will return false. + /// The best time to call this function is: + ///
    + ///
  • In the init function of your main collection script before any sounds are triggered
  • + ///
  • In a window listener callback when the window.WINDOW_EVENT_FOCUS_GAINED event is received
  • + ///
+ /// Both those times will give you a correct reading of the state even when your application is + /// swapped out and in while playing sounds and it works equally well on Android and iOS. + /// + /// @CSharpLua.Template = "sound.is_music_playing()" + ///
+ public static extern bool is_music_playing(); + + + /// + /// Get RMS (Root Mean Square) value from mixer group. This value is the + /// square root of the mean (average) value of the squared function of + /// the instantaneous values. + /// For instance: for a sinewave signal with a peak gain of -1.94 dB (0.8 linear), + /// the RMS is 0.8 × 1/sqrt(2) which is about 0.566. + /// Note the returned value might be an approximation and in particular + /// the effective window might be larger than specified. + /// + /// @CSharpLua.Template = "sound.get_rms({0}, {1})" + /// + public static extern double get_rms(string group_p1, double window_p2, out double rms_r_o1); + + + /// + /// Get RMS (Root Mean Square) value from mixer group. This value is the + /// square root of the mean (average) value of the squared function of + /// the instantaneous values. + /// For instance: for a sinewave signal with a peak gain of -1.94 dB (0.8 linear), + /// the RMS is 0.8 × 1/sqrt(2) which is about 0.566. + /// Note the returned value might be an approximation and in particular + /// the effective window might be larger than specified. + /// + /// @CSharpLua.Template = "sound.get_rms({0}, {1})" + /// + public static extern double get_rms(Hash group_p1, double window_p2, out double rms_r_o1); + + + /// + /// Get peak value from mixer group. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// Also note that the returned value might be an approximation and in particular + /// the effective window might be larger than specified. + /// + /// @CSharpLua.Template = "sound.get_peak({0}, {1})" + /// + public static extern double get_peak(string group_p1, double window_p2, out double peak_r_o1); + + + /// + /// Get peak value from mixer group. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// Also note that the returned value might be an approximation and in particular + /// the effective window might be larger than specified. + /// + /// @CSharpLua.Template = "sound.get_peak({0}, {1})" + /// + public static extern double get_peak(Hash group_p1, double window_p2, out double peak_r_o1); + + + /// + /// Set mixer group gain + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// + /// @CSharpLua.Template = "sound.set_group_gain({0}, {1})" + /// + public static extern void set_group_gain(string group_p1, double gain_p2); + + + /// + /// Set mixer group gain + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// + /// @CSharpLua.Template = "sound.set_group_gain({0}, {1})" + /// + public static extern void set_group_gain(Hash group_p1, double gain_p2); + + + /// + /// Get mixer group gain + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// + /// @CSharpLua.Template = "sound.get_group_gain({0})" + /// + public static extern double get_group_gain(string group_p1); + + + /// + /// Get mixer group gain + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// + /// @CSharpLua.Template = "sound.get_group_gain({0})" + /// + public static extern double get_group_gain(Hash group_p1); + + + /// + /// Get a table of all mixer group names (hashes). + /// + /// @CSharpLua.Template = "sound.get_groups()" + /// + public static extern LuaTable get_groups(); + + + /// + /// Get a mixer group name as a string. + /// This function is to be used for debugging and + /// development tooling only. The function does a reverse hash lookup, which does not + /// return a proper string value when the game is built in release mode. + /// + /// @CSharpLua.Template = "sound.get_group_name({0})" + /// + public static extern string get_group_name(string group_p1); + + + /// + /// Get a mixer group name as a string. + /// This function is to be used for debugging and + /// development tooling only. The function does a reverse hash lookup, which does not + /// return a proper string value when the game is built in release mode. + /// + /// @CSharpLua.Template = "sound.get_group_name({0})" + /// + public static extern string get_group_name(Hash group_p1); + + + /// + /// Checks if a phone call is active. If there is an active phone call all + /// other sounds will be muted until the phone call is finished. + /// On non mobile platforms, + /// this function always return false. + /// + /// @CSharpLua.Template = "sound.is_phone_call_active()" + /// + public static extern bool is_phone_call_active(); + + + /// + /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + /// + /// @CSharpLua.Template = "sound.play({0})" + /// + public static extern double play(string url_p1); + + + /// + /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + /// + /// @CSharpLua.Template = "sound.play({0}, {1})" + /// + public static extern double play(string url_p1, LuaTableBase play_properties_p2); + + + /// + /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + /// + /// @CSharpLua.Template = "sound.play({0}, {1}, {2})" + /// + public static extern double play(string url_p1, LuaTableBase play_properties_p2, Action complete_function_p3); + + + /// + /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + /// + /// @CSharpLua.Template = "sound.play({0})" + /// + public static extern double play(Hash url_p1); + + + /// + /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + /// + /// @CSharpLua.Template = "sound.play({0}, {1})" + /// + public static extern double play(Hash url_p1, LuaTableBase play_properties_p2); + + + /// + /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + /// + /// @CSharpLua.Template = "sound.play({0}, {1}, {2})" + /// + public static extern double play(Hash url_p1, LuaTableBase play_properties_p2, Action complete_function_p3); + + + /// + /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + /// + /// @CSharpLua.Template = "sound.play({0})" + /// + public static extern double play(Url url_p1); + + + /// + /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + /// + /// @CSharpLua.Template = "sound.play({0}, {1})" + /// + public static extern double play(Url url_p1, LuaTableBase play_properties_p2); + + + /// + /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. + /// + /// @CSharpLua.Template = "sound.play({0}, {1}, {2})" + /// + public static extern double play(Url url_p1, LuaTableBase play_properties_p2, Action complete_function_p3); + + + /// + /// Stop playing all active voices + /// + /// @CSharpLua.Template = "sound.stop({0})" + /// + public static extern void stop(string url_p1); + + + /// + /// Stop playing all active voices + /// + /// @CSharpLua.Template = "sound.stop({0})" + /// + public static extern void stop(Hash url_p1); + + + /// + /// Stop playing all active voices + /// + /// @CSharpLua.Template = "sound.stop({0})" + /// + public static extern void stop(Url url_p1); + + + /// + /// Pause all active voices + /// + /// @CSharpLua.Template = "sound.pause({0}, {1})" + /// + public static extern void pause(string url_p1, bool pause_p2); + + + /// + /// Pause all active voices + /// + /// @CSharpLua.Template = "sound.pause({0}, {1})" + /// + public static extern void pause(Hash url_p1, bool pause_p2); + + + /// + /// Pause all active voices + /// + /// @CSharpLua.Template = "sound.pause({0}, {1})" + /// + public static extern void pause(Url url_p1, bool pause_p2); + + + /// + /// Set gain on all active playing voices of a sound. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// + /// @CSharpLua.Template = "sound.set_gain({0})" + /// + public static extern void set_gain(string url_p1); + + + /// + /// Set gain on all active playing voices of a sound. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// + /// @CSharpLua.Template = "sound.set_gain({0}, {1})" + /// + public static extern void set_gain(string url_p1, double gain_p2); + + + /// + /// Set gain on all active playing voices of a sound. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// + /// @CSharpLua.Template = "sound.set_gain({0})" + /// + public static extern void set_gain(Hash url_p1); + + + /// + /// Set gain on all active playing voices of a sound. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// + /// @CSharpLua.Template = "sound.set_gain({0}, {1})" + /// + public static extern void set_gain(Hash url_p1, double gain_p2); + + + /// + /// Set gain on all active playing voices of a sound. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// + /// @CSharpLua.Template = "sound.set_gain({0})" + /// + public static extern void set_gain(Url url_p1); + + + /// + /// Set gain on all active playing voices of a sound. + /// Note that gain is in linear scale, between 0 and 1. + /// To get the dB value from the gain, use the formula 20 * log(gain). + /// Inversely, to find the linear value from a dB value, use the formula + /// 10db/20. + /// + /// @CSharpLua.Template = "sound.set_gain({0}, {1})" + /// + public static extern void set_gain(Url url_p1, double gain_p2); + + + /// + /// Set panning on all active playing voices of a sound. + /// The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. + /// + /// @CSharpLua.Template = "sound.set_pan({0})" + /// + public static extern void set_pan(string url_p1); + + + /// + /// Set panning on all active playing voices of a sound. + /// The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. + /// + /// @CSharpLua.Template = "sound.set_pan({0}, {1})" + /// + public static extern void set_pan(string url_p1, double pan_p2); + + + /// + /// Set panning on all active playing voices of a sound. + /// The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. + /// + /// @CSharpLua.Template = "sound.set_pan({0})" + /// + public static extern void set_pan(Hash url_p1); + + + /// + /// Set panning on all active playing voices of a sound. + /// The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. + /// + /// @CSharpLua.Template = "sound.set_pan({0}, {1})" + /// + public static extern void set_pan(Hash url_p1, double pan_p2); + + + /// + /// Set panning on all active playing voices of a sound. + /// The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. + /// + /// @CSharpLua.Template = "sound.set_pan({0})" + /// + public static extern void set_pan(Url url_p1); + + + /// + /// Set panning on all active playing voices of a sound. + /// The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. + /// + /// @CSharpLua.Template = "sound.set_pan({0}, {1})" + /// + public static extern void set_pan(Url url_p1, double pan_p2); + + + #endregion Defold API + + + public int Play(string sound) + { + return (int)play(sound); + } + + + public int Play(Hash sound) + { + return (int)play(sound); + } + + + public int Play(Url sound) + { + return (int)play(sound); + } + + + public int Play(string sound, + double delay = 0, + double gain = 1, + double pan = 0, + double speed = 1, + Action onCompleteCallback = null) + { + var table = LuaTable.Create(); + table.Add("delay", delay); + table.Add("gain", gain); + table.Add("pan", pan); + table.Add("speed", speed); + + if (onCompleteCallback != null) + { + void callback(object o, Hash hash, dynamic arg3, Url arg4) + { + onCompleteCallback(this, hash, arg3["play_id"], arg4); + } + + return (int)play(sound, table, callback); + } + else + return (int)play(sound, table); + } + + public int Play(Hash sound, + double delay = 0, + double gain = 1, + double pan = 0, + double speed = 1, + Action onCompleteCallback = null) + { + var table = LuaTable.Create(); + table.Add("delay", delay); + table.Add("gain", gain); + table.Add("pan", pan); + table.Add("speed", speed); + + if (onCompleteCallback != null) + { + void callback(object o, Hash hash, dynamic arg3, Url arg4) + { + onCompleteCallback(this, hash, arg3["play_id"], arg4); + } + + return (int)play(sound, table, callback); + } + else + return (int)play(sound, table); + } + + public int Play(Url sound, + double delay = 0, + double gain = 1, + double pan = 0, + double speed = 1, + Action onCompleteCallback = null) + { + var table = LuaTable.Create(); + table.Add("delay", delay); + table.Add("gain", gain); + table.Add("pan", pan); + table.Add("speed", speed); + + if (onCompleteCallback != null) + { + void callback(object o, Hash hash, dynamic arg3, Url arg4) + { + onCompleteCallback(this, hash, arg3["play_id"], arg4); + } + + return (int)play(sound, table, callback); + } + else + return (int)play(sound, table); + } + + + public void Stop() + { + stop(this); + } + + + public void Pause(bool shouldPause = true) + { + pause(this, shouldPause); + } + + + public void Unpause() + { + pause(this, false); + } + + + public void SetGain(double gain) + { + set_gain(this, gain); + } + + + public void SetPan(double pan) + { + set_pan(this, pan); + } + } +} diff --git a/DefoldSharpLib/sprite.cs b/DefoldSharpLib/sprite.cs new file mode 100644 index 0000000..8ffdaf3 --- /dev/null +++ b/DefoldSharpLib/sprite.cs @@ -0,0 +1,312 @@ +using System; + +namespace DefoldSharp +{ + /// + /// Sprite API documentation + /// + /// + public class Sprite : BuiltInComponentBase + { + #region Defold API + #region Messages + /// + /// + public class play_animation_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("play_animation"); + public override Hash FetchCode() => __CODE__; + + public Hash id; + } + + + /// + /// + public class animation_done_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("animation_done"); + public override Hash FetchCode() => __CODE__; + + public double current_tile; + public Hash id; + } + + + #endregion Messages + + + /// + /// Sets horizontal flipping of the provided sprite's animations. + /// The sprite is identified by its URL. + /// If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. + /// + /// @CSharpLua.Template = "sprite.set_hflip({0}, {1})" + /// + public static extern void set_hflip(string url_p1, bool flip_p2); + + + /// + /// Sets horizontal flipping of the provided sprite's animations. + /// The sprite is identified by its URL. + /// If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. + /// + /// @CSharpLua.Template = "sprite.set_hflip({0}, {1})" + /// + public static extern void set_hflip(Hash url_p1, bool flip_p2); + + + /// + /// Sets horizontal flipping of the provided sprite's animations. + /// The sprite is identified by its URL. + /// If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. + /// + /// @CSharpLua.Template = "sprite.set_hflip({0}, {1})" + /// + public static extern void set_hflip(Url url_p1, bool flip_p2); + + + /// + /// Sets vertical flipping of the provided sprite's animations. + /// The sprite is identified by its URL. + /// If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. + /// + /// @CSharpLua.Template = "sprite.set_vflip({0}, {1})" + /// + public static extern void set_vflip(string url_p1, bool flip_p2); + + + /// + /// Sets vertical flipping of the provided sprite's animations. + /// The sprite is identified by its URL. + /// If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. + /// + /// @CSharpLua.Template = "sprite.set_vflip({0}, {1})" + /// + public static extern void set_vflip(Hash url_p1, bool flip_p2); + + + /// + /// Sets vertical flipping of the provided sprite's animations. + /// The sprite is identified by its URL. + /// If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. + /// + /// @CSharpLua.Template = "sprite.set_vflip({0}, {1})" + /// + public static extern void set_vflip(Url url_p1, bool flip_p2); + + + /// + /// Play an animation on a sprite component from its tile set + /// An optional completion callback function can be provided that will be called when + /// the animation has completed playing. If no function is provided, + /// a animation_done message is sent to the script that started the animation. + /// + /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1})" + /// + public static extern void play_flipbook(string url_p1, Hash id_p2); + + + /// + /// Play an animation on a sprite component from its tile set + /// An optional completion callback function can be provided that will be called when + /// the animation has completed playing. If no function is provided, + /// a animation_done message is sent to the script that started the animation. + /// + /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2})" + /// + public static extern void play_flipbook(string url_p1, Hash id_p2, Action complete_function_p3); + + + /// + /// Play an animation on a sprite component from its tile set + /// An optional completion callback function can be provided that will be called when + /// the animation has completed playing. If no function is provided, + /// a animation_done message is sent to the script that started the animation. + /// + /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2}, {3})" + /// + public static extern void play_flipbook(string url_p1, Hash id_p2, Action complete_function_p3, LuaTableBase play_properties_p4); + + + /// + /// Play an animation on a sprite component from its tile set + /// An optional completion callback function can be provided that will be called when + /// the animation has completed playing. If no function is provided, + /// a animation_done message is sent to the script that started the animation. + /// + /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1})" + /// + public static extern void play_flipbook(Hash url_p1, Hash id_p2); + + + /// + /// Play an animation on a sprite component from its tile set + /// An optional completion callback function can be provided that will be called when + /// the animation has completed playing. If no function is provided, + /// a animation_done message is sent to the script that started the animation. + /// + /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2})" + /// + public static extern void play_flipbook(Hash url_p1, Hash id_p2, Action complete_function_p3); + + + /// + /// Play an animation on a sprite component from its tile set + /// An optional completion callback function can be provided that will be called when + /// the animation has completed playing. If no function is provided, + /// a animation_done message is sent to the script that started the animation. + /// + /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2}, {3})" + /// + public static extern void play_flipbook(Hash url_p1, Hash id_p2, Action complete_function_p3, LuaTableBase play_properties_p4); + + + /// + /// Play an animation on a sprite component from its tile set + /// An optional completion callback function can be provided that will be called when + /// the animation has completed playing. If no function is provided, + /// a animation_done message is sent to the script that started the animation. + /// + /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1})" + /// + public static extern void play_flipbook(Url url_p1, Hash id_p2); + + + /// + /// Play an animation on a sprite component from its tile set + /// An optional completion callback function can be provided that will be called when + /// the animation has completed playing. If no function is provided, + /// a animation_done message is sent to the script that started the animation. + /// + /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2})" + /// + public static extern void play_flipbook(Url url_p1, Hash id_p2, Action complete_function_p3); + + + /// + /// Play an animation on a sprite component from its tile set + /// An optional completion callback function can be provided that will be called when + /// the animation has completed playing. If no function is provided, + /// a animation_done message is sent to the script that started the animation. + /// + /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2}, {3})" + /// + public static extern void play_flipbook(Url url_p1, Hash id_p2, Action complete_function_p3, LuaTableBase play_properties_p4); + + + #endregion Defold API + + + private bool _cachedFlipHorizontal; + private bool _cachedFlipVertical; + + + + public bool FlipHorizontal + { + get + { + return _cachedFlipHorizontal; + } + set + { + _cachedFlipHorizontal = value; + set_hflip(this, value); + } + } + + + + public bool FlipVertical + { + get + { + return _cachedFlipVertical; + } + set + { + _cachedFlipVertical = value; + + + set_vflip(this, value); + } + } + + + + public vector2 Size => (dynamic)Go.get(this, "size"); + + + public vector2 Scale + { + get => (dynamic)Go.get(this, "scale"); + set => Go.set(this, "scale", value); + } + + + public Hash Image + { + get => (dynamic)Go.get(this, "image"); + set => Go.set(this, "image", value); + } + + + public Hash Material + { + get => (dynamic)Go.get(this, "material"); + set => Go.set(this, "material", value); + } + + + public double Cursor + { + get => (dynamic)Go.get(this, "cursor"); + set => Go.set(this, "cursor", value); + } + + + public double PlaybackRate + { + get => (dynamic)Go.get(this, "playback_rate"); + set => Go.set(this, "playback_rate", value); + } + + + public Hash Animation => (dynamic)Go.get(this, "animation"); + + + + public void PlayFlipbook(Hash animation) + { + play_flipbook(this, animation); + } + + + + public void PlayFlipbook(Hash animation, Action onComplete) + { + void callback(object target, Hash hash, LuaTable table, Url url) + { + onComplete(this, hash, table, url); + } + + + play_flipbook(this, animation, callback); + } + + + + public void PlayFlipbook(Hash animation, Action onComplete, + LuaTable playProperties) + { + void callback(object target, Hash hash, LuaTable table, Url url) + { + onComplete(this, hash, table, url); + } + + + play_flipbook(this, animation, callback, playProperties); + } + } +} diff --git a/src/defold/support/ComponentReferences/BuiltInComponentBase.cs b/DefoldSharpLib/support/ComponentReferences/BuiltInComponentBase.cs similarity index 90% rename from src/defold/support/ComponentReferences/BuiltInComponentBase.cs rename to DefoldSharpLib/support/ComponentReferences/BuiltInComponentBase.cs index 54f9004..35241a0 100644 --- a/src/defold/support/ComponentReferences/BuiltInComponentBase.cs +++ b/DefoldSharpLib/support/ComponentReferences/BuiltInComponentBase.cs @@ -1,6 +1,4 @@ -using types; - -namespace support +namespace DefoldSharp { public class BuiltInComponentBase : IBuiltInComponent { diff --git a/src/defold/support/ComponentReferences/Component.cs b/DefoldSharpLib/support/ComponentReferences/Component.cs similarity index 99% rename from src/defold/support/ComponentReferences/Component.cs rename to DefoldSharpLib/support/ComponentReferences/Component.cs index 0d1649c..d92f80b 100644 --- a/src/defold/support/ComponentReferences/Component.cs +++ b/DefoldSharpLib/support/ComponentReferences/Component.cs @@ -1,8 +1,7 @@ using System; using System.Collections.Generic; -using types; -namespace support +namespace DefoldSharp { /// /// Generic access for both builtin components and user components. diff --git a/src/defold/support/ComponentReferences/ComponentLocator.cs b/DefoldSharpLib/support/ComponentReferences/ComponentLocator.cs similarity index 96% rename from src/defold/support/ComponentReferences/ComponentLocator.cs rename to DefoldSharpLib/support/ComponentReferences/ComponentLocator.cs index a3379d1..ffe71d1 100644 --- a/src/defold/support/ComponentReferences/ComponentLocator.cs +++ b/DefoldSharpLib/support/ComponentReferences/ComponentLocator.cs @@ -1,6 +1,4 @@ -using types; - -namespace support +namespace DefoldSharp { public class ComponentLocator { diff --git a/src/defold/support/ComponentReferences/ComponentReference.cs b/DefoldSharpLib/support/ComponentReferences/ComponentReference.cs similarity index 89% rename from src/defold/support/ComponentReferences/ComponentReference.cs rename to DefoldSharpLib/support/ComponentReferences/ComponentReference.cs index 4f4673c..59461cd 100644 --- a/src/defold/support/ComponentReferences/ComponentReference.cs +++ b/DefoldSharpLib/support/ComponentReferences/ComponentReference.cs @@ -1,6 +1,4 @@ -using types; - -namespace support +namespace DefoldSharp { public abstract class ComponentReference { diff --git a/src/defold/support/ComponentReferences/IBuiltInComponent.cs b/DefoldSharpLib/support/ComponentReferences/IBuiltInComponent.cs similarity index 75% rename from src/defold/support/ComponentReferences/IBuiltInComponent.cs rename to DefoldSharpLib/support/ComponentReferences/IBuiltInComponent.cs index a88795e..a9eb795 100644 --- a/src/defold/support/ComponentReferences/IBuiltInComponent.cs +++ b/DefoldSharpLib/support/ComponentReferences/IBuiltInComponent.cs @@ -1,6 +1,4 @@ -using types; - -namespace support +namespace DefoldSharp { public interface IBuiltInComponent : IComponent { diff --git a/src/defold/support/ComponentReferences/ICachedData.cs b/DefoldSharpLib/support/ComponentReferences/ICachedData.cs similarity index 63% rename from src/defold/support/ComponentReferences/ICachedData.cs rename to DefoldSharpLib/support/ComponentReferences/ICachedData.cs index 69632ac..dbb0a4f 100644 --- a/src/defold/support/ComponentReferences/ICachedData.cs +++ b/DefoldSharpLib/support/ComponentReferences/ICachedData.cs @@ -1,4 +1,4 @@ -namespace support +namespace DefoldSharp { public interface ICachedData { diff --git a/src/defold/support/ComponentReferences/IComponent.cs b/DefoldSharpLib/support/ComponentReferences/IComponent.cs similarity index 66% rename from src/defold/support/ComponentReferences/IComponent.cs rename to DefoldSharpLib/support/ComponentReferences/IComponent.cs index b433403..0c00b26 100644 --- a/src/defold/support/ComponentReferences/IComponent.cs +++ b/DefoldSharpLib/support/ComponentReferences/IComponent.cs @@ -1,6 +1,4 @@ -using types; - -namespace support +namespace DefoldSharp { public interface IComponent { diff --git a/src/defold/support/ComponentReferences/IUserComponent.cs b/DefoldSharpLib/support/ComponentReferences/IUserComponent.cs similarity index 72% rename from src/defold/support/ComponentReferences/IUserComponent.cs rename to DefoldSharpLib/support/ComponentReferences/IUserComponent.cs index 02bce0e..af2f530 100644 --- a/src/defold/support/ComponentReferences/IUserComponent.cs +++ b/DefoldSharpLib/support/ComponentReferences/IUserComponent.cs @@ -1,4 +1,4 @@ -namespace support +namespace DefoldSharp { public interface IUserComponent : IComponent { diff --git a/src/defold/support/ComponentReferences/Locator.cs b/DefoldSharpLib/support/ComponentReferences/Locator.cs similarity index 95% rename from src/defold/support/ComponentReferences/Locator.cs rename to DefoldSharpLib/support/ComponentReferences/Locator.cs index 53b80af..022227e 100644 --- a/src/defold/support/ComponentReferences/Locator.cs +++ b/DefoldSharpLib/support/ComponentReferences/Locator.cs @@ -1,6 +1,4 @@ -using types; - -namespace support +namespace DefoldSharp { public class Locator { diff --git a/src/defold/support/GUIScript.cs b/DefoldSharpLib/support/GUIScript.cs similarity index 93% rename from src/defold/support/GUIScript.cs rename to DefoldSharpLib/support/GUIScript.cs index 2359ee1..f81eba1 100644 --- a/src/defold/support/GUIScript.cs +++ b/DefoldSharpLib/support/GUIScript.cs @@ -1,15 +1,14 @@ -using types; - -namespace support +namespace DefoldSharp { [DoNotGenerate] - public abstract class GUIScript : GUIScript + public abstract class GUIScript : GUIScript { } /// - /// Base class for all game object scripts (.script). + /// Base class for all game object scripts (.gui_script). Run by GUI components and usually containing the logic required to display GUI elements like heads up displays, menus etc. GUI scripts have access to the GUI library functions. /// + [GenScript("gui_script")] [DoNotGenerate] public abstract class GUIScript : ScriptPropertyHost, IUserComponent where TProps : AnimatableProperties { diff --git a/src/defold/support/GameObjectReference.cs b/DefoldSharpLib/support/GameObjectReference.cs similarity index 94% rename from src/defold/support/GameObjectReference.cs rename to DefoldSharpLib/support/GameObjectReference.cs index 3ad6308..a2f647d 100644 --- a/src/defold/support/GameObjectReference.cs +++ b/DefoldSharpLib/support/GameObjectReference.cs @@ -1,10 +1,8 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Xml.Schema; -using types; -namespace support +namespace DefoldSharp { public class GameObjectReference { @@ -23,7 +21,7 @@ public GameObjectReference(Url locatorUrl) - public Vector3 Position + public vector3 Position { get { @@ -61,7 +59,7 @@ public Quaternion Rotation } - public Vector3 Scale + public vector3 Scale { get { @@ -89,7 +87,7 @@ public double UniformScale } - public Vector3 WorldPosition + public vector3 WorldPosition { get { @@ -109,7 +107,7 @@ public Quaternion WorldRotation } } - public Vector3 WorldScale + public vector3 WorldScale { get { @@ -188,7 +186,7 @@ public void Delete() targetUrl.path = LocatorUrl.path; targetUrl.fragment = hash; - return support.Component.At(Locator.AtUrl(targetUrl)); + return DefoldSharp.Component.At(Locator.AtUrl(targetUrl)); } diff --git a/src/defold/support/GameObjectScript.cs b/DefoldSharpLib/support/GameObjectScript.cs similarity index 97% rename from src/defold/support/GameObjectScript.cs rename to DefoldSharpLib/support/GameObjectScript.cs index c759c7d..5b6ddb5 100644 --- a/src/defold/support/GameObjectScript.cs +++ b/DefoldSharpLib/support/GameObjectScript.cs @@ -1,15 +1,14 @@ -using types; - -namespace support +namespace DefoldSharp { [DoNotGenerate] - public abstract class GameObjectScript : GameObjectScript + public abstract class GameObjectScript : GameObjectScript { } /// /// Base class for all game object scripts (.script). /// + [GenScript("script")] [DoNotGenerate] public abstract class GameObjectScript : ScriptPropertyHost, IUserComponent where TProps : AnimatableProperties { diff --git a/src/defold/support/GeneratedScript.cs b/DefoldSharpLib/support/GeneratedScript.cs similarity index 50% rename from src/defold/support/GeneratedScript.cs rename to DefoldSharpLib/support/GeneratedScript.cs index 0480fb3..e8c4275 100644 --- a/src/defold/support/GeneratedScript.cs +++ b/DefoldSharpLib/support/GeneratedScript.cs @@ -1,8 +1,5 @@ -using attributes; - -namespace support +namespace DefoldSharp { - [GenGOScript] [DoNotGenerate] public class GeneratedScript { diff --git a/src/defold/support/IAnimatableProperties.cs b/DefoldSharpLib/support/IAnimatableProperties.cs similarity index 83% rename from src/defold/support/IAnimatableProperties.cs rename to DefoldSharpLib/support/IAnimatableProperties.cs index 49fea6a..773e2b6 100644 --- a/src/defold/support/IAnimatableProperties.cs +++ b/DefoldSharpLib/support/IAnimatableProperties.cs @@ -1,8 +1,12 @@ using System; -using attributes; -namespace support +namespace DefoldSharp { + public class EmptyProperties : AnimatableProperties + { + + } + /// /// Because Defold will establish properties on the self userobject, we have to create a proxy to source the properties /// from. diff --git a/src/defold/support/InputHelpers.cs b/DefoldSharpLib/support/InputHelpers.cs similarity index 94% rename from src/defold/support/InputHelpers.cs rename to DefoldSharpLib/support/InputHelpers.cs index aa79798..ebd54c9 100644 --- a/src/defold/support/InputHelpers.cs +++ b/DefoldSharpLib/support/InputHelpers.cs @@ -1,4 +1,4 @@ -namespace support +namespace DefoldSharp { /// /// @CSharpLua.Ignore diff --git a/src/defold/support/LuaTableSerializableExt.cs b/DefoldSharpLib/support/LuaTableSerializableExt.cs similarity index 85% rename from src/defold/support/LuaTableSerializableExt.cs rename to DefoldSharpLib/support/LuaTableSerializableExt.cs index 2020cff..908c541 100644 --- a/src/defold/support/LuaTableSerializableExt.cs +++ b/DefoldSharpLib/support/LuaTableSerializableExt.cs @@ -1,10 +1,8 @@ -using types; - -namespace support +namespace DefoldSharp { public static class LuaTableSerializableExt { - public static ILuaTable DefaultTableSerialization(this ILuaTableSerializable self) + public static LuaTable DefaultTableSerialization(this ILuaTableSerializable self) { /* [[ @@ -39,10 +37,10 @@ public static ILuaTable DefaultTableSerialization(this ILuaTableSerializable sel /// /// @CSharpLua.Template = table /// - private static extern ILuaTable ReturnTable(); + private static extern LuaTable ReturnTable(); - public static T DefaultTableDeserialization(this ILuaTable self) where T : ILuaTableSerializable, new() + public static T DefaultTableDeserialization(this LuaTable self) where T : ILuaTableSerializable, new() { var table = new T(); /* diff --git a/DefoldSharpLib/support/RenderScript.cs b/DefoldSharpLib/support/RenderScript.cs new file mode 100644 index 0000000..da9a0ef --- /dev/null +++ b/DefoldSharpLib/support/RenderScript.cs @@ -0,0 +1,118 @@ +namespace DefoldSharp +{ + [DoNotGenerate] + public abstract class RenderScript : RenderScript + { + } + + /// + /// Base class for all render scripts (render_script). Run by the rendering pipeline and containing the logic required to render all app/game graphics each frame. Render scripts have access to the Render library functions. + /// + [GenScript("render_script")] + [DoNotGenerate] + public abstract class RenderScript : ScriptPropertyHost, IUserComponent + where TProps : AnimatableProperties + { + public Url LocatorUrl { get; } + + + protected RenderScript() + { + LocatorUrl = Msg.url(); + } + + + /// + /// Called when a script component is initialized. + /// This is a callback-function, which is called by the engine when a script component is initialized. It can be used + /// to set the initial state of the script. + /// + protected virtual void init() + { + } + + + /// + /// Called when a script component is finalized. + /// This is a callback-function, which is called by the engine when a script component is finalized (destroyed). It can + /// be used to e.g. take some last action, report the finalization to other game object instances, delete spawned + /// objects + /// or release user input focus (see `release_input_focus`). + /// + protected virtual void final() + { + } + + + /// + /// Called every frame to update the script component. + /// This is a callback-function, which is called by the engine every frame to update the state of a script component. + /// It can be used to perform any kind of game related tasks, e.g. moving the game object instance. + /// + /// frame update timestep + protected virtual void update(float dt) + { + } + + + /// + /// Called every frame to update the script component. + /// Frame-rate independent update. dt contains the delta time since the last update. + /// Useful when you wish to manipulate physics objects at regular intervals to achieve a stable physics simulation. + /// Requires that `physics.use_fixed_timestep` is enabled in game.project. + /// + /// frame update timestep + protected virtual void fixed_update(float dt) + { + } + + + /// + /// Called when a message has been sent to the script component. + /// This is a callback-function, which is called by the engine whenever a message has been sent to the script + /// component. + /// It can be used to take action on the message, e.g. send a response back to the sender of the message. + /// The `message` parameter is a table containing the message data. If the message is sent from the engine, the + /// documentation of the message specifies which data is supplied. + /// + /// id of the received message + /// a table containing the message data + /// address of the sender + protected virtual void on_message(Hash message_id, object message, Hash sender) + { + } + + + /// + /// Called when user input is received. + /// This is a callback-function, which is called by the engine when user input is sent to the game object instance of + /// the script. + /// It can be used to take action on the input, e.g. move the instance according to the input. + /// For an instance to obtain user input, it must first acquire input focuse through the message `acquire_input_focus`. + /// See the documentation of that message for more information. + /// The `action` parameter is a table containing data about the input mapped to the `action_id`. + /// For mapped actions it specifies the value of the input and if it was just pressed or released. + /// Actions are mapped to input in an input_binding-file. + /// Mouse movement is specifically handled and uses `nil` as its `action_id`. + /// The `action` only contains positional parameters in this case, such as x and y of the pointer. + /// + /// id of the received input action, as mapped in the input_binding-file + /// a table containing the input data, see above for a description + /// boolean to signal if the input should be consumed (not passed on to others) or not, default is false + protected virtual bool on_input(Hash action_id, object action) + { + return false; + } + + + /// + /// Called when the script component is reloaded. + /// This is a callback-function, which is called by the engine when the script component is reloaded, e.g. from the + /// editor. + /// It can be used for live development, e.g. to tweak constants or set up the state properly for the instance. + /// + protected virtual void on_reload() + { + } + } +} \ No newline at end of file diff --git a/src/defold/support/ScriptPropertyHost.cs b/DefoldSharpLib/support/ScriptPropertyHost.cs similarity index 95% rename from src/defold/support/ScriptPropertyHost.cs rename to DefoldSharpLib/support/ScriptPropertyHost.cs index f9cf4b8..3bc1469 100644 --- a/src/defold/support/ScriptPropertyHost.cs +++ b/DefoldSharpLib/support/ScriptPropertyHost.cs @@ -1,4 +1,4 @@ -namespace support +namespace DefoldSharp { [DoNotGenerate] public class ScriptPropertyHost : GeneratedScript where TProps : AnimatableProperties diff --git a/DefoldSharpLib/sys.cs b/DefoldSharpLib/sys.cs new file mode 100644 index 0000000..ab46386 --- /dev/null +++ b/DefoldSharpLib/sys.cs @@ -0,0 +1,333 @@ +using System; + +namespace DefoldSharp +{ + /// + /// System API documentation + /// + /// + public static class Sys + { + #region Defold API + #region Messages + /// + /// + public class exit_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("exit"); + public override Hash FetchCode() => __CODE__; + + public double code; + } + + + /// + /// + public class toggle_profile_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("toggle_profile"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class toggle_physics_debug_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("toggle_physics_debug"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class start_record_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("start_record"); + public override Hash FetchCode() => __CODE__; + + public string file_name; + public double frame_period; + public double fps; + } + + + /// + /// + public class stop_record_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("stop_record"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class reboot_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("reboot"); + public override Hash FetchCode() => __CODE__; + + public string arg1; + public string arg2; + public string arg3; + public string arg4; + public string arg5; + public string arg6; + } + + + /// + /// + public class set_vsync_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("set_vsync"); + public override Hash FetchCode() => __CODE__; + + } + + + /// + /// + public class set_update_frequency_message : MessageImplementation + { + public static Hash __CODE__ = Defold.hash("set_update_frequency"); + public override Hash FetchCode() => __CODE__; + + } + + + #endregion Messages + + + /// + /// The table can later be loaded by sys.load. + /// Use sys.get_save_file to obtain a valid location for the file. + /// Internally, this function uses a workspace buffer sized output file sized 512kb. + /// This size reflects the output file size which must not exceed this limit. + /// Additionally, the total number of rows that any one table may contain is limited to 65536 + /// (i.e. a 16 bit range). When tables are used to represent arrays, the values of + /// keys are permitted to fall within a 32 bit range, supporting sparse arrays, however + /// the limit on the total number of rows remains in effect. + /// + /// @CSharpLua.Template = "sys.save({0}, {1})" + /// + public static extern bool save(string filename_p1, LuaTableBase table_p2); + + + /// + /// If the file exists, it must have been created by sys.save to be loaded. + /// + /// @CSharpLua.Template = "sys.load({0})" + /// + public static extern LuaTable load(string filename_p1); + + + /// + /// The save-file path is operating system specific and is typically located under the user's home directory. + /// + /// @CSharpLua.Template = "sys.get_save_file({0}, {1})" + /// + public static extern string get_save_file(string application_id_p1, string file_name_p2); + + + /// + /// The path from which the application is run. + /// + /// @CSharpLua.Template = "sys.get_application_path()" + /// + public static extern string get_application_path(); + + + /// + /// Get config value from the game.project configuration file. + /// In addition to the project file, configuration values can also be passed + /// to the runtime as command line arguments with the --config argument. + /// + /// @CSharpLua.Template = "sys.get_config({0})" + /// + public static extern string get_config(string key_p1); + + + /// + /// Get config value from the game.project configuration file with default value + /// + /// @CSharpLua.Template = "sys.get_config({0}, {1})" + /// + public static extern string get_config(string key_p1, string default_value_p2); + + + /// + /// Open URL in default application, typically a browser + /// + /// @CSharpLua.Template = "sys.open_url({0})" + /// + public static extern bool open_url(string url_p1); + + + /// + /// Open URL in default application, typically a browser + /// + /// @CSharpLua.Template = "sys.open_url({0}, {1})" + /// + public static extern bool open_url(string url_p1, LuaTableBase attributes_p2); + + + /// + /// Loads a custom resource. Specify the full filename of the resource that you want + /// to load. When loaded, the file data is returned as a string. + /// If loading fails, the function returns nil plus the error message. + /// In order for the engine to include custom resources in the build process, you need + /// to specify them in the "custom_resources" key in your "game.project" settings file. + /// You can specify single resource files or directories. If a directory is included + /// in the resource list, all files and directories in that directory is recursively + /// included: + /// For example "main/data/,assets/level_data.json". + /// + /// @CSharpLua.Template = "sys.load_resource({0})" + /// + public static extern string load_resource(string filename_p1, out string error_o1); + + + /// + /// Returns a table with system information. + /// + /// @CSharpLua.Template = "sys.get_sys_info()" + /// + public static extern LuaTable get_sys_info(); + + + /// + /// Returns a table with system information. + /// + /// @CSharpLua.Template = "sys.get_sys_info({0})" + /// + public static extern LuaTable get_sys_info(LuaTableBase options_p1); + + + /// + /// Returns a table with engine information. + /// + /// @CSharpLua.Template = "sys.get_engine_info()" + /// + public static extern LuaTable get_engine_info(); + + + /// + /// Returns a table with application information for the requested app. + /// On iOS, the app_string is an url scheme for the app that is queried. Your + /// game needs to list the schemes that are queried in an LSApplicationQueriesSchemes array + /// in a custom "Info.plist". + /// On Android, the app_string is the package identifier for the app. + /// + /// @CSharpLua.Template = "sys.get_application_info({0})" + /// + public static extern LuaTable get_application_info(string app_string_p1); + + + /// + /// Returns an array of tables with information on network interfaces. + /// + /// @CSharpLua.Template = "sys.get_ifaddrs()" + /// + public static extern LuaTable get_ifaddrs(); + + + /// + /// Set the Lua error handler function. + /// The error handler is a function which is called whenever a lua runtime error occurs. + /// + /// @CSharpLua.Template = "sys.set_error_handler({0})" + /// + public static extern void set_error_handler(Action error_handler_p1); + + + /// + /// Sets the host that is used to check for network connectivity against. + /// + /// @CSharpLua.Template = "sys.set_connectivity_host({0})" + /// + public static extern void set_connectivity_host(string host_p1); + + + /// + /// Returns the current network connectivity status + /// on mobile platforms. + /// On desktop, this function always return sys.NETWORK_CONNECTED. + /// + /// @CSharpLua.Template = "sys.get_connectivity()" + /// + public static extern SysConnectivity get_connectivity(); + + + /// + /// Terminates the game application and reports the specified code to the OS. + /// + /// @CSharpLua.Template = "sys.exit({0})" + /// + public static extern void exit(double code_p1); + + + /// + /// Reboots the game engine with a specified set of arguments. + /// Arguments will be translated into command line arguments. Calling reboot + /// function is equivalent to starting the engine with the same arguments. + /// On startup the engine reads configuration from "game.project" in the + /// project root. + /// + /// @CSharpLua.Template = "sys.reboot({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern void reboot(string arg1_p1, string arg2_p2, string arg3_p3, string arg4_p4, string arg5_p5, string arg6_p6); + + + /// + /// Set the vsync swap interval. The interval with which to swap the front and back buffers + /// in sync with vertical blanks (v-blank), the hardware event where the screen image is updated + /// with data from the front buffer. A value of 1 swaps the buffers at every v-blank, a value of + /// 2 swaps the buffers every other v-blank and so on. A value of 0 disables waiting for v-blank + /// before swapping the buffers. Default value is 1. + /// When setting the swap interval to 0 and having vsync disabled in + /// "game.project", the engine will try to respect the set frame cap value from + /// "game.project" in software instead. + /// This setting may be overridden by driver settings. + /// + /// @CSharpLua.Template = "sys.set_vsync_swap_interval({0})" + /// + public static extern void set_vsync_swap_interval(double swap_interval_p1); + + + /// + /// Set game update-frequency (frame cap). This option is equivalent to display.update_frequency in + /// the "game.project" settings but set in run-time. If Vsync checked in "game.project", the rate will + /// be clamped to a swap interval that matches any detected main monitor refresh rate. If Vsync is + /// unchecked the engine will try to respect the rate in software using timers. There is no + /// guarantee that the frame cap will be achieved depending on platform specifics and hardware settings. + /// + /// @CSharpLua.Template = "sys.set_update_frequency({0})" + /// + public static extern void set_update_frequency(double frequency_p1); + + + /// + /// The buffer can later deserialized by sys.deserialize. + /// This method has all the same limitations as sys.save. + /// + /// @CSharpLua.Template = "sys.serialize({0})" + /// + public static extern string serialize(LuaTableBase table_p1); + + + /// + /// deserializes buffer into a lua table + /// + /// @CSharpLua.Template = "sys.deserialize({0})" + /// + public static extern LuaTable deserialize(string buffer_p1); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/tilemap.cs b/DefoldSharpLib/tilemap.cs new file mode 100644 index 0000000..6829bab --- /dev/null +++ b/DefoldSharpLib/tilemap.cs @@ -0,0 +1,580 @@ +namespace DefoldSharp +{ + /// + /// Tilemap API documentation + /// + /// + public class Tilemap : BuiltInComponentBase + { + #region Defold API + /// + /// Replace a tile in a tile map with a new tile. + /// The coordinates of the tiles are indexed so that the "first" tile just + /// above and to the right of origin has coordinates 1,1. + /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. + ///
+		/// +-------+-------+------+------+
+		/// |  0,3  |  1,3  | 2,3  | 3,3  |
+		/// +-------+-------+------+------+
+		/// |  0,2  |  1,2  | 2,2  | 3,2  |
+		/// +-------+-------+------+------+
+		/// |  0,1  |  1,1  | 2,1  | 3,1  |
+		/// +-------O-------+------+------+
+		/// |  0,0  |  1,0  | 2,0  | 3,0  |
+		/// +-------+-------+------+------+
+		/// 
+ /// The coordinates must be within the bounds of the tile map as it were created. + /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + /// Flip always applies before rotation (clockwise). + /// + /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" + ///
+ public static extern void set_tile(string url_p1, string layer_p2, double x_p3, double y_p4, double tile_p5); + + + /// + /// Replace a tile in a tile map with a new tile. + /// The coordinates of the tiles are indexed so that the "first" tile just + /// above and to the right of origin has coordinates 1,1. + /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. + ///
+		/// +-------+-------+------+------+
+		/// |  0,3  |  1,3  | 2,3  | 3,3  |
+		/// +-------+-------+------+------+
+		/// |  0,2  |  1,2  | 2,2  | 3,2  |
+		/// +-------+-------+------+------+
+		/// |  0,1  |  1,1  | 2,1  | 3,1  |
+		/// +-------O-------+------+------+
+		/// |  0,0  |  1,0  | 2,0  | 3,0  |
+		/// +-------+-------+------+------+
+		/// 
+ /// The coordinates must be within the bounds of the tile map as it were created. + /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + /// Flip always applies before rotation (clockwise). + /// + /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" + ///
+ public static extern void set_tile(string url_p1, string layer_p2, double x_p3, double y_p4, double tile_p5, double transform_bitmask_p6); + + + /// + /// Replace a tile in a tile map with a new tile. + /// The coordinates of the tiles are indexed so that the "first" tile just + /// above and to the right of origin has coordinates 1,1. + /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. + ///
+		/// +-------+-------+------+------+
+		/// |  0,3  |  1,3  | 2,3  | 3,3  |
+		/// +-------+-------+------+------+
+		/// |  0,2  |  1,2  | 2,2  | 3,2  |
+		/// +-------+-------+------+------+
+		/// |  0,1  |  1,1  | 2,1  | 3,1  |
+		/// +-------O-------+------+------+
+		/// |  0,0  |  1,0  | 2,0  | 3,0  |
+		/// +-------+-------+------+------+
+		/// 
+ /// The coordinates must be within the bounds of the tile map as it were created. + /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + /// Flip always applies before rotation (clockwise). + /// + /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" + ///
+ public static extern void set_tile(string url_p1, Hash layer_p2, double x_p3, double y_p4, double tile_p5); + + + /// + /// Replace a tile in a tile map with a new tile. + /// The coordinates of the tiles are indexed so that the "first" tile just + /// above and to the right of origin has coordinates 1,1. + /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. + ///
+		/// +-------+-------+------+------+
+		/// |  0,3  |  1,3  | 2,3  | 3,3  |
+		/// +-------+-------+------+------+
+		/// |  0,2  |  1,2  | 2,2  | 3,2  |
+		/// +-------+-------+------+------+
+		/// |  0,1  |  1,1  | 2,1  | 3,1  |
+		/// +-------O-------+------+------+
+		/// |  0,0  |  1,0  | 2,0  | 3,0  |
+		/// +-------+-------+------+------+
+		/// 
+ /// The coordinates must be within the bounds of the tile map as it were created. + /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + /// Flip always applies before rotation (clockwise). + /// + /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" + ///
+ public static extern void set_tile(string url_p1, Hash layer_p2, double x_p3, double y_p4, double tile_p5, double transform_bitmask_p6); + + + /// + /// Replace a tile in a tile map with a new tile. + /// The coordinates of the tiles are indexed so that the "first" tile just + /// above and to the right of origin has coordinates 1,1. + /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. + ///
+		/// +-------+-------+------+------+
+		/// |  0,3  |  1,3  | 2,3  | 3,3  |
+		/// +-------+-------+------+------+
+		/// |  0,2  |  1,2  | 2,2  | 3,2  |
+		/// +-------+-------+------+------+
+		/// |  0,1  |  1,1  | 2,1  | 3,1  |
+		/// +-------O-------+------+------+
+		/// |  0,0  |  1,0  | 2,0  | 3,0  |
+		/// +-------+-------+------+------+
+		/// 
+ /// The coordinates must be within the bounds of the tile map as it were created. + /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + /// Flip always applies before rotation (clockwise). + /// + /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" + ///
+ public static extern void set_tile(Hash url_p1, string layer_p2, double x_p3, double y_p4, double tile_p5); + + + /// + /// Replace a tile in a tile map with a new tile. + /// The coordinates of the tiles are indexed so that the "first" tile just + /// above and to the right of origin has coordinates 1,1. + /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. + ///
+		/// +-------+-------+------+------+
+		/// |  0,3  |  1,3  | 2,3  | 3,3  |
+		/// +-------+-------+------+------+
+		/// |  0,2  |  1,2  | 2,2  | 3,2  |
+		/// +-------+-------+------+------+
+		/// |  0,1  |  1,1  | 2,1  | 3,1  |
+		/// +-------O-------+------+------+
+		/// |  0,0  |  1,0  | 2,0  | 3,0  |
+		/// +-------+-------+------+------+
+		/// 
+ /// The coordinates must be within the bounds of the tile map as it were created. + /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + /// Flip always applies before rotation (clockwise). + /// + /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" + ///
+ public static extern void set_tile(Hash url_p1, string layer_p2, double x_p3, double y_p4, double tile_p5, double transform_bitmask_p6); + + + /// + /// Replace a tile in a tile map with a new tile. + /// The coordinates of the tiles are indexed so that the "first" tile just + /// above and to the right of origin has coordinates 1,1. + /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. + ///
+		/// +-------+-------+------+------+
+		/// |  0,3  |  1,3  | 2,3  | 3,3  |
+		/// +-------+-------+------+------+
+		/// |  0,2  |  1,2  | 2,2  | 3,2  |
+		/// +-------+-------+------+------+
+		/// |  0,1  |  1,1  | 2,1  | 3,1  |
+		/// +-------O-------+------+------+
+		/// |  0,0  |  1,0  | 2,0  | 3,0  |
+		/// +-------+-------+------+------+
+		/// 
+ /// The coordinates must be within the bounds of the tile map as it were created. + /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + /// Flip always applies before rotation (clockwise). + /// + /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" + ///
+ public static extern void set_tile(Hash url_p1, Hash layer_p2, double x_p3, double y_p4, double tile_p5); + + + /// + /// Replace a tile in a tile map with a new tile. + /// The coordinates of the tiles are indexed so that the "first" tile just + /// above and to the right of origin has coordinates 1,1. + /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. + ///
+		/// +-------+-------+------+------+
+		/// |  0,3  |  1,3  | 2,3  | 3,3  |
+		/// +-------+-------+------+------+
+		/// |  0,2  |  1,2  | 2,2  | 3,2  |
+		/// +-------+-------+------+------+
+		/// |  0,1  |  1,1  | 2,1  | 3,1  |
+		/// +-------O-------+------+------+
+		/// |  0,0  |  1,0  | 2,0  | 3,0  |
+		/// +-------+-------+------+------+
+		/// 
+ /// The coordinates must be within the bounds of the tile map as it were created. + /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + /// Flip always applies before rotation (clockwise). + /// + /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" + ///
+ public static extern void set_tile(Hash url_p1, Hash layer_p2, double x_p3, double y_p4, double tile_p5, double transform_bitmask_p6); + + + /// + /// Replace a tile in a tile map with a new tile. + /// The coordinates of the tiles are indexed so that the "first" tile just + /// above and to the right of origin has coordinates 1,1. + /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. + ///
+		/// +-------+-------+------+------+
+		/// |  0,3  |  1,3  | 2,3  | 3,3  |
+		/// +-------+-------+------+------+
+		/// |  0,2  |  1,2  | 2,2  | 3,2  |
+		/// +-------+-------+------+------+
+		/// |  0,1  |  1,1  | 2,1  | 3,1  |
+		/// +-------O-------+------+------+
+		/// |  0,0  |  1,0  | 2,0  | 3,0  |
+		/// +-------+-------+------+------+
+		/// 
+ /// The coordinates must be within the bounds of the tile map as it were created. + /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + /// Flip always applies before rotation (clockwise). + /// + /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" + ///
+ public static extern void set_tile(Url url_p1, string layer_p2, double x_p3, double y_p4, double tile_p5); + + + /// + /// Replace a tile in a tile map with a new tile. + /// The coordinates of the tiles are indexed so that the "first" tile just + /// above and to the right of origin has coordinates 1,1. + /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. + ///
+		/// +-------+-------+------+------+
+		/// |  0,3  |  1,3  | 2,3  | 3,3  |
+		/// +-------+-------+------+------+
+		/// |  0,2  |  1,2  | 2,2  | 3,2  |
+		/// +-------+-------+------+------+
+		/// |  0,1  |  1,1  | 2,1  | 3,1  |
+		/// +-------O-------+------+------+
+		/// |  0,0  |  1,0  | 2,0  | 3,0  |
+		/// +-------+-------+------+------+
+		/// 
+ /// The coordinates must be within the bounds of the tile map as it were created. + /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + /// Flip always applies before rotation (clockwise). + /// + /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" + ///
+ public static extern void set_tile(Url url_p1, string layer_p2, double x_p3, double y_p4, double tile_p5, double transform_bitmask_p6); + + + /// + /// Replace a tile in a tile map with a new tile. + /// The coordinates of the tiles are indexed so that the "first" tile just + /// above and to the right of origin has coordinates 1,1. + /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. + ///
+		/// +-------+-------+------+------+
+		/// |  0,3  |  1,3  | 2,3  | 3,3  |
+		/// +-------+-------+------+------+
+		/// |  0,2  |  1,2  | 2,2  | 3,2  |
+		/// +-------+-------+------+------+
+		/// |  0,1  |  1,1  | 2,1  | 3,1  |
+		/// +-------O-------+------+------+
+		/// |  0,0  |  1,0  | 2,0  | 3,0  |
+		/// +-------+-------+------+------+
+		/// 
+ /// The coordinates must be within the bounds of the tile map as it were created. + /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + /// Flip always applies before rotation (clockwise). + /// + /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" + ///
+ public static extern void set_tile(Url url_p1, Hash layer_p2, double x_p3, double y_p4, double tile_p5); + + + /// + /// Replace a tile in a tile map with a new tile. + /// The coordinates of the tiles are indexed so that the "first" tile just + /// above and to the right of origin has coordinates 1,1. + /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. + ///
+		/// +-------+-------+------+------+
+		/// |  0,3  |  1,3  | 2,3  | 3,3  |
+		/// +-------+-------+------+------+
+		/// |  0,2  |  1,2  | 2,2  | 3,2  |
+		/// +-------+-------+------+------+
+		/// |  0,1  |  1,1  | 2,1  | 3,1  |
+		/// +-------O-------+------+------+
+		/// |  0,0  |  1,0  | 2,0  | 3,0  |
+		/// +-------+-------+------+------+
+		/// 
+ /// The coordinates must be within the bounds of the tile map as it were created. + /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. + /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. + /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants + /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). + /// Flip always applies before rotation (clockwise). + /// + /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" + ///
+ public static extern void set_tile(Url url_p1, Hash layer_p2, double x_p3, double y_p4, double tile_p5, double transform_bitmask_p6); + + + /// + /// Get the tile set at the specified position in the tilemap. + /// The position is identified by the tile index starting at origin + /// with index 1, 1. (see tilemap.set_tile()) + /// Which tile map and layer to query is identified by the URL and the + /// layer name parameters. + /// + /// @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" + /// + public static extern double get_tile(string url_p1, string layer_p2, double x_p3, double y_p4); + + + /// + /// Get the tile set at the specified position in the tilemap. + /// The position is identified by the tile index starting at origin + /// with index 1, 1. (see tilemap.set_tile()) + /// Which tile map and layer to query is identified by the URL and the + /// layer name parameters. + /// + /// @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" + /// + public static extern double get_tile(string url_p1, Hash layer_p2, double x_p3, double y_p4); + + + /// + /// Get the tile set at the specified position in the tilemap. + /// The position is identified by the tile index starting at origin + /// with index 1, 1. (see tilemap.set_tile()) + /// Which tile map and layer to query is identified by the URL and the + /// layer name parameters. + /// + /// @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" + /// + public static extern double get_tile(Hash url_p1, string layer_p2, double x_p3, double y_p4); + + + /// + /// Get the tile set at the specified position in the tilemap. + /// The position is identified by the tile index starting at origin + /// with index 1, 1. (see tilemap.set_tile()) + /// Which tile map and layer to query is identified by the URL and the + /// layer name parameters. + /// + /// @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" + /// + public static extern double get_tile(Hash url_p1, Hash layer_p2, double x_p3, double y_p4); + + + /// + /// Get the tile set at the specified position in the tilemap. + /// The position is identified by the tile index starting at origin + /// with index 1, 1. (see tilemap.set_tile()) + /// Which tile map and layer to query is identified by the URL and the + /// layer name parameters. + /// + /// @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" + /// + public static extern double get_tile(Url url_p1, string layer_p2, double x_p3, double y_p4); + + + /// + /// Get the tile set at the specified position in the tilemap. + /// The position is identified by the tile index starting at origin + /// with index 1, 1. (see tilemap.set_tile()) + /// Which tile map and layer to query is identified by the URL and the + /// layer name parameters. + /// + /// @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" + /// + public static extern double get_tile(Url url_p1, Hash layer_p2, double x_p3, double y_p4); + + + /// + /// Get the bounds for a tile map. This function returns multiple values: + /// The lower left corner index x and y coordinates (1-indexed), + /// the tile map width and the tile map height. + /// The resulting values take all tile map layers into account, meaning that + /// the bounds are calculated as if all layers were collapsed into one. + /// + /// @CSharpLua.Template = "tilemap.get_bounds({0})" + /// + public static extern double get_bounds(string url_p1, out double y_o1, out double w_o2, out double h_o3); + + + /// + /// Get the bounds for a tile map. This function returns multiple values: + /// The lower left corner index x and y coordinates (1-indexed), + /// the tile map width and the tile map height. + /// The resulting values take all tile map layers into account, meaning that + /// the bounds are calculated as if all layers were collapsed into one. + /// + /// @CSharpLua.Template = "tilemap.get_bounds({0})" + /// + public static extern double get_bounds(Hash url_p1, out double y_o1, out double w_o2, out double h_o3); + + + /// + /// Get the bounds for a tile map. This function returns multiple values: + /// The lower left corner index x and y coordinates (1-indexed), + /// the tile map width and the tile map height. + /// The resulting values take all tile map layers into account, meaning that + /// the bounds are calculated as if all layers were collapsed into one. + /// + /// @CSharpLua.Template = "tilemap.get_bounds({0})" + /// + public static extern double get_bounds(Url url_p1, out double y_o1, out double w_o2, out double h_o3); + + + /// + /// Sets the visibility of the tilemap layer + /// + /// @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" + /// + public static extern void set_visible(string url_p1, string layer_p2, bool visible_p3); + + + /// + /// Sets the visibility of the tilemap layer + /// + /// @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" + /// + public static extern void set_visible(string url_p1, Hash layer_p2, bool visible_p3); + + + /// + /// Sets the visibility of the tilemap layer + /// + /// @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" + /// + public static extern void set_visible(Hash url_p1, string layer_p2, bool visible_p3); + + + /// + /// Sets the visibility of the tilemap layer + /// + /// @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" + /// + public static extern void set_visible(Hash url_p1, Hash layer_p2, bool visible_p3); + + + /// + /// Sets the visibility of the tilemap layer + /// + /// @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" + /// + public static extern void set_visible(Url url_p1, string layer_p2, bool visible_p3); + + + /// + /// Sets the visibility of the tilemap layer + /// + /// @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" + /// + public static extern void set_visible(Url url_p1, Hash layer_p2, bool visible_p3); + + + #endregion Defold API + + + /// + /// Gets the bounds for the tilemap. Allocates memory, so use sparingly. + /// + /// + public Rect Bounds + { + get + { + var x = get_bounds(this, out var y, out var w, out var h); + var returnVal = new Rect(x, y, w, h); + return returnVal; + } + } + + + /// + /// Fetches the bounds without allocating memory + /// + /// + /// + /// + /// + public void GetBounds(out double x, out double y, out double width, out double height) + { + x = get_bounds(this, out y, out width, out height); + } + + + public int GetTile(int x, int y, string layer) + { + return (int)get_tile(this, layer, x, y); + } + + + public int GetTile(int x, int y, Hash layer) + { + return (int)get_tile(this, layer, x, y); + } + + + public void SetTile(int x, int y, int tile, string layer) + { + set_tile(this, layer, x, y, tile); + } + + + public void SetTile(int x, int y, int tile, string layer, TilemapTransforms transformBitmask) + { + set_tile(this, layer, x, y, tile, (int)transformBitmask); + } + + + public void SetTile(int x, int y, int tile, Hash layer) + { + set_tile(this, layer, x, y, tile); + } + + + public void SetTile(int x, int y, int tile, Hash layer, TilemapTransforms transformBitmask) + { + set_tile(this, layer, x, y, tile, (int)transformBitmask); + } + + + public void SetLayerVisible(string layer, bool visible = true) + { + set_visible(this, layer, visible); + } + + + public void SetLayerVisible(Hash layer, bool visible = true) + { + set_visible(this, layer, visible); + } + } +} diff --git a/DefoldSharpLib/timer.cs b/DefoldSharpLib/timer.cs new file mode 100644 index 0000000..41b400b --- /dev/null +++ b/DefoldSharpLib/timer.cs @@ -0,0 +1,44 @@ +using System; + +namespace DefoldSharp +{ + /// + /// Timer API documentation + /// + /// + public static class Timer + { + #region Defold API + /// + /// Adds a timer and returns a unique handle + /// You may create more timers from inside a timer callback. + /// Using a delay of 0 will result in a timer that triggers at the next frame just before + /// script update functions. + /// If you want a timer that triggers on each frame, set delay to 0.0f and repeat to true. + /// Timers created within a script will automatically die when the script is deleted. + /// + /// @CSharpLua.Template = "timer.delay({0}, {1}, {2})" + /// + public static extern Hash delay(double delay_p1, bool repeat_p2, Action callback_p3); + + + /// + /// You may cancel a timer from inside a timer callback. + /// Cancelling a timer that is already executed or cancelled is safe. + /// + /// @CSharpLua.Template = "timer.cancel({0})" + /// + public static extern bool cancel(Hash handle_p1); + + + /// + /// Manual triggering a callback for a timer. + /// + /// @CSharpLua.Template = "timer.trigger({0})" + /// + public static extern bool trigger(Hash handle_p1); + + + #endregion Defold API + } +} diff --git a/src/defold/types/AdjustMode.cs b/DefoldSharpLib/types/AdjustMode.cs similarity index 80% rename from src/defold/types/AdjustMode.cs rename to DefoldSharpLib/types/AdjustMode.cs index 95dc4a3..393597d 100644 --- a/src/defold/types/AdjustMode.cs +++ b/DefoldSharpLib/types/AdjustMode.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/BlendFunction.cs b/DefoldSharpLib/types/BlendFunction.cs similarity index 94% rename from src/defold/types/BlendFunction.cs rename to DefoldSharpLib/types/BlendFunction.cs index 7136213..afbf9e1 100644 --- a/src/defold/types/BlendFunction.cs +++ b/DefoldSharpLib/types/BlendFunction.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/BlendMode.cs b/DefoldSharpLib/types/BlendMode.cs similarity index 81% rename from src/defold/types/BlendMode.cs rename to DefoldSharpLib/types/BlendMode.cs index 8a7ebdf..b616eda 100644 --- a/src/defold/types/BlendMode.cs +++ b/DefoldSharpLib/types/BlendMode.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/BufferStream.cs b/DefoldSharpLib/types/BufferStream.cs similarity index 68% rename from src/defold/types/BufferStream.cs rename to DefoldSharpLib/types/BufferStream.cs index 6c1f42e..2f567fd 100644 --- a/src/defold/types/BufferStream.cs +++ b/DefoldSharpLib/types/BufferStream.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/ClippingMode.cs b/DefoldSharpLib/types/ClippingMode.cs similarity index 79% rename from src/defold/types/ClippingMode.cs rename to DefoldSharpLib/types/ClippingMode.cs index 4272b85..68bd14e 100644 --- a/src/defold/types/ClippingMode.cs +++ b/DefoldSharpLib/types/ClippingMode.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/DefoldSharpLib/types/ConstantBuffer.cs b/DefoldSharpLib/types/ConstantBuffer.cs new file mode 100644 index 0000000..1fcad69 --- /dev/null +++ b/DefoldSharpLib/types/ConstantBuffer.cs @@ -0,0 +1,8 @@ +namespace DefoldSharp +{ + /// + /// + public class ConstantBuffer + { + } +} diff --git a/src/defold/types/DataBuffer.cs b/DefoldSharpLib/types/DataBuffer.cs similarity index 68% rename from src/defold/types/DataBuffer.cs rename to DefoldSharpLib/types/DataBuffer.cs index 47ca530..cf7afbb 100644 --- a/src/defold/types/DataBuffer.cs +++ b/DefoldSharpLib/types/DataBuffer.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/DepthFunction.cs b/DefoldSharpLib/types/DepthFunction.cs similarity index 90% rename from src/defold/types/DepthFunction.cs rename to DefoldSharpLib/types/DepthFunction.cs index 85866aa..012eec7 100644 --- a/src/defold/types/DepthFunction.cs +++ b/DefoldSharpLib/types/DepthFunction.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/Easing.cs b/DefoldSharpLib/types/Easing.cs similarity index 97% rename from src/defold/types/Easing.cs rename to DefoldSharpLib/types/Easing.cs index 91e37c6..75f3441 100644 --- a/src/defold/types/Easing.cs +++ b/DefoldSharpLib/types/Easing.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/FaceType.cs b/DefoldSharpLib/types/FaceType.cs similarity index 80% rename from src/defold/types/FaceType.cs rename to DefoldSharpLib/types/FaceType.cs index 1b7f79a..2a53626 100644 --- a/src/defold/types/FaceType.cs +++ b/DefoldSharpLib/types/FaceType.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/FactoryStatus.cs b/DefoldSharpLib/types/FactoryStatus.cs similarity index 81% rename from src/defold/types/FactoryStatus.cs rename to DefoldSharpLib/types/FactoryStatus.cs index 777cc5c..18d2ffe 100644 --- a/src/defold/types/FactoryStatus.cs +++ b/DefoldSharpLib/types/FactoryStatus.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/GoPlaybackMode.cs b/DefoldSharpLib/types/GoPlaybackMode.cs similarity index 89% rename from src/defold/types/GoPlaybackMode.cs rename to DefoldSharpLib/types/GoPlaybackMode.cs index df8f90e..0eefe44 100644 --- a/src/defold/types/GoPlaybackMode.cs +++ b/DefoldSharpLib/types/GoPlaybackMode.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/GuiAnchor.cs b/DefoldSharpLib/types/GuiAnchor.cs similarity index 79% rename from src/defold/types/GuiAnchor.cs rename to DefoldSharpLib/types/GuiAnchor.cs index 77b1fcb..2a2ecfe 100644 --- a/src/defold/types/GuiAnchor.cs +++ b/DefoldSharpLib/types/GuiAnchor.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/GuiPivot.cs b/DefoldSharpLib/types/GuiPivot.cs similarity index 86% rename from src/defold/types/GuiPivot.cs rename to DefoldSharpLib/types/GuiPivot.cs index ec54393..8a889c3 100644 --- a/src/defold/types/GuiPivot.cs +++ b/DefoldSharpLib/types/GuiPivot.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/GuiPlaybackMode.cs b/DefoldSharpLib/types/GuiPlaybackMode.cs similarity index 88% rename from src/defold/types/GuiPlaybackMode.cs rename to DefoldSharpLib/types/GuiPlaybackMode.cs index e7df853..503ed42 100644 --- a/src/defold/types/GuiPlaybackMode.cs +++ b/DefoldSharpLib/types/GuiPlaybackMode.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/GuiProperty.cs b/DefoldSharpLib/types/GuiProperty.cs similarity index 87% rename from src/defold/types/GuiProperty.cs rename to DefoldSharpLib/types/GuiProperty.cs index 78635e9..d9419fc 100644 --- a/src/defold/types/GuiProperty.cs +++ b/DefoldSharpLib/types/GuiProperty.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/GuiTextureType.cs b/DefoldSharpLib/types/GuiTextureType.cs similarity index 69% rename from src/defold/types/GuiTextureType.cs rename to DefoldSharpLib/types/GuiTextureType.cs index 455a2ae..cc30f9a 100644 --- a/src/defold/types/GuiTextureType.cs +++ b/DefoldSharpLib/types/GuiTextureType.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/Hash.cs b/DefoldSharpLib/types/Hash.cs similarity index 98% rename from src/defold/types/Hash.cs rename to DefoldSharpLib/types/Hash.cs index 75bc227..a270b0d 100644 --- a/src/defold/types/Hash.cs +++ b/DefoldSharpLib/types/Hash.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/ILuaTableSerializable.cs b/DefoldSharpLib/types/ILuaTableSerializable.cs similarity index 60% rename from src/defold/types/ILuaTableSerializable.cs rename to DefoldSharpLib/types/ILuaTableSerializable.cs index b0dcd26..70993a5 100644 --- a/src/defold/types/ILuaTableSerializable.cs +++ b/DefoldSharpLib/types/ILuaTableSerializable.cs @@ -1,11 +1,9 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// public interface ILuaTableSerializable { - ILuaTable ToTable(); + LuaTable ToTable(); } } diff --git a/src/defold/types/KeyboardType.cs b/DefoldSharpLib/types/KeyboardType.cs similarity index 85% rename from src/defold/types/KeyboardType.cs rename to DefoldSharpLib/types/KeyboardType.cs index a5a312c..e98cc3b 100644 --- a/src/defold/types/KeyboardType.cs +++ b/DefoldSharpLib/types/KeyboardType.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/Matrix4.cs b/DefoldSharpLib/types/Matrix4.cs similarity index 86% rename from src/defold/types/Matrix4.cs rename to DefoldSharpLib/types/Matrix4.cs index 810db5d..89bbd7c 100644 --- a/src/defold/types/Matrix4.cs +++ b/DefoldSharpLib/types/Matrix4.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// @@ -21,7 +19,7 @@ public class Matrix4 : ILuaType /// /// @CSharpLua.Template = "vmath.matrix4_axis_angle({0},{1})" /// - public static extern Matrix4 From_axis_angle(Vector3 v, float angle); + public static extern Matrix4 From_axis_angle(vector3 v, float angle); /// /// @CSharpLua.Template = "vmath.matrix4_from_quat({0})" @@ -36,7 +34,7 @@ public class Matrix4 : ILuaType /// /// @CSharpLua.Template = "vmath.matrix4_look_at({0},{1},{2})" /// - public static extern Matrix4 From_look_at(Vector3 eye, Vector3 lookat, Vector3 up); + public static extern Matrix4 From_look_at(vector3 eye, vector3 lookat, vector3 up); /// /// @CSharpLua.Template = "vmath.matrix4_orthographic({0},{1},{2},{3},{4},{5})" @@ -66,12 +64,12 @@ public class Matrix4 : ILuaType /// /// @CSharpLua.Template = "vmath.matrix4_translation({0})" /// - public static extern Matrix4 From_translation(Vector3 position); + public static extern Matrix4 From_translation(vector3 position); /// /// @CSharpLua.Template = "vmath.matrix4_translation({0})" /// - public static extern Matrix4 From_translation(Vector4 position); + public static extern Matrix4 From_translation(vector4 position); @@ -99,12 +97,12 @@ public class Matrix4 : ILuaType /// /// @CSharpLua.Template = "{0} * {1}" /// - public static extern Matrix4 operator *(Matrix4 a, Vector4 b); + public static extern Matrix4 operator *(Matrix4 a, vector4 b); /// /// @CSharpLua.Template = "{0} * {1}" /// - public static extern Matrix4 operator *(Vector4 a, Matrix4 b); + public static extern Matrix4 operator *(vector4 a, Matrix4 b); diff --git a/src/defold/types/Node.cs b/DefoldSharpLib/types/Node.cs similarity index 78% rename from src/defold/types/Node.cs rename to DefoldSharpLib/types/Node.cs index 60c7c60..7804de0 100644 --- a/src/defold/types/Node.cs +++ b/DefoldSharpLib/types/Node.cs @@ -1,15 +1,13 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// public class Node { /// - /// @CSharpLua.Template = "gui.set_enabled({this}, {0})" - /// - public extern void SetEnabled(bool enabled); + /// @CSharpLua.Template = "gui.set_enabled({this}, {0})" + /// + public extern void SetEnabled(bool enabled); } public class NodeProxy diff --git a/src/defold/types/ParticleEmitterState.cs b/DefoldSharpLib/types/ParticleEmitterState.cs similarity index 86% rename from src/defold/types/ParticleEmitterState.cs rename to DefoldSharpLib/types/ParticleEmitterState.cs index f2e4949..2c17f4f 100644 --- a/src/defold/types/ParticleEmitterState.cs +++ b/DefoldSharpLib/types/ParticleEmitterState.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/PieBounds.cs b/DefoldSharpLib/types/PieBounds.cs similarity index 78% rename from src/defold/types/PieBounds.cs rename to DefoldSharpLib/types/PieBounds.cs index 09c1797..000a828 100644 --- a/src/defold/types/PieBounds.cs +++ b/DefoldSharpLib/types/PieBounds.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/PlaybackMode.cs b/DefoldSharpLib/types/PlaybackMode.cs similarity index 89% rename from src/defold/types/PlaybackMode.cs rename to DefoldSharpLib/types/PlaybackMode.cs index 3b0cd86..9c904c7 100644 --- a/src/defold/types/PlaybackMode.cs +++ b/DefoldSharpLib/types/PlaybackMode.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/ProfilerMode.cs b/DefoldSharpLib/types/ProfilerMode.cs similarity index 82% rename from src/defold/types/ProfilerMode.cs rename to DefoldSharpLib/types/ProfilerMode.cs index 5b640e4..deb7c3a 100644 --- a/src/defold/types/ProfilerMode.cs +++ b/DefoldSharpLib/types/ProfilerMode.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/ProfilerViewMode.cs b/DefoldSharpLib/types/ProfilerViewMode.cs similarity index 79% rename from src/defold/types/ProfilerViewMode.cs rename to DefoldSharpLib/types/ProfilerViewMode.cs index 6332bae..6114081 100644 --- a/src/defold/types/ProfilerViewMode.cs +++ b/DefoldSharpLib/types/ProfilerViewMode.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/Quaternion.cs b/DefoldSharpLib/types/Quaternion.cs similarity index 83% rename from src/defold/types/Quaternion.cs rename to DefoldSharpLib/types/Quaternion.cs index fd4631d..366bb1d 100644 --- a/src/defold/types/Quaternion.cs +++ b/DefoldSharpLib/types/Quaternion.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// @@ -25,17 +23,17 @@ public class Quaternion : ILuaType /// /// @CSharpLua.Template = "vmath.quat_axis_angle({0},{1})" /// - public static extern Quaternion From_axis_angle(Vector3 v, float angle); + public static extern Quaternion From_axis_angle(vector3 v, float angle); /// /// @CSharpLua.Template = "vmath.quat_basis({0},{1},{2})" /// - public static extern Quaternion From_basis(Vector3 x, Vector3 y, Vector3 z); + public static extern Quaternion From_basis(vector3 x, vector3 y, vector3 z); /// /// @CSharpLua.Template = "vmath.quat_from_to({0},{1})" /// - public static extern Quaternion From_to(Vector3 v1, Vector3 v2); + public static extern Quaternion From_to(vector3 v1, vector3 v2); /// /// @CSharpLua.Template = "vmath.quat_rotation_x({0})" @@ -56,7 +54,7 @@ public class Quaternion : ILuaType /// /// @CSharpLua.Template = "vmath.rotate({this},{0})" /// - public extern Vector3 RotateVector(Vector3 v); + public extern vector3 RotateVector(vector3 v); diff --git a/src/defold/types/Rect.cs b/DefoldSharpLib/types/Rect.cs similarity index 85% rename from src/defold/types/Rect.cs rename to DefoldSharpLib/types/Rect.cs index 637b6fe..63589ba 100644 --- a/src/defold/types/Rect.cs +++ b/DefoldSharpLib/types/Rect.cs @@ -1,7 +1,7 @@ -using Microsoft.VisualBasic.CompilerServices; - -namespace types +namespace DefoldSharp { + /// + /// public class Rect { public double X, Y; @@ -23,4 +23,4 @@ public bool InRect(int targetX, int targetY) Y <= targetY && targetY <= (Y + Height); } } -} \ No newline at end of file +} diff --git a/src/defold/types/RenderState.cs b/DefoldSharpLib/types/RenderState.cs similarity index 87% rename from src/defold/types/RenderState.cs rename to DefoldSharpLib/types/RenderState.cs index 01fe079..570adc9 100644 --- a/src/defold/types/RenderState.cs +++ b/DefoldSharpLib/types/RenderState.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/ResourceLiveUpdate.cs b/DefoldSharpLib/types/ResourceLiveUpdate.cs similarity index 90% rename from src/defold/types/ResourceLiveUpdate.cs rename to DefoldSharpLib/types/ResourceLiveUpdate.cs index 9ad80b7..09bd58e 100644 --- a/src/defold/types/ResourceLiveUpdate.cs +++ b/DefoldSharpLib/types/ResourceLiveUpdate.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/SizeMode.cs b/DefoldSharpLib/types/SizeMode.cs similarity index 77% rename from src/defold/types/SizeMode.cs rename to DefoldSharpLib/types/SizeMode.cs index 8f5d5bb..cf250ef 100644 --- a/src/defold/types/SizeMode.cs +++ b/DefoldSharpLib/types/SizeMode.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/StencilOperator.cs b/DefoldSharpLib/types/StencilOperator.cs similarity index 89% rename from src/defold/types/StencilOperator.cs rename to DefoldSharpLib/types/StencilOperator.cs index 29fa35c..5157d3a 100644 --- a/src/defold/types/StencilOperator.cs +++ b/DefoldSharpLib/types/StencilOperator.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/SysConnectivity.cs b/DefoldSharpLib/types/SysConnectivity.cs similarity index 83% rename from src/defold/types/SysConnectivity.cs rename to DefoldSharpLib/types/SysConnectivity.cs index 63a4e3f..a200eaa 100644 --- a/src/defold/types/SysConnectivity.cs +++ b/DefoldSharpLib/types/SysConnectivity.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/TilemapTransforms.cs b/DefoldSharpLib/types/TilemapTransforms.cs similarity index 58% rename from src/defold/types/TilemapTransforms.cs rename to DefoldSharpLib/types/TilemapTransforms.cs index 3923353..cfd6cfa 100644 --- a/src/defold/types/TilemapTransforms.cs +++ b/DefoldSharpLib/types/TilemapTransforms.cs @@ -1,11 +1,13 @@ -namespace types +namespace DefoldSharp { + /// + /// public enum TilemapTransforms { H_FLIP = 1, V_FLIP = 2, ROTATE_90 = 4, ROTATE_180 = -3, - ROTATE_270 = -7 + ROTATE_270 = -7, } -} \ No newline at end of file +} diff --git a/DefoldSharpLib/types/TimeStepMode.cs b/DefoldSharpLib/types/TimeStepMode.cs new file mode 100644 index 0000000..5cb1130 --- /dev/null +++ b/DefoldSharpLib/types/TimeStepMode.cs @@ -0,0 +1,10 @@ +namespace DefoldSharp +{ + /// + /// + public enum TimeStepMode + { + Continuous = 0, + Discrete = 1, + } +} diff --git a/src/defold/types/Url.cs b/DefoldSharpLib/types/Url.cs similarity index 94% rename from src/defold/types/Url.cs rename to DefoldSharpLib/types/Url.cs index c55349a..87d4cdf 100644 --- a/src/defold/types/Url.cs +++ b/DefoldSharpLib/types/Url.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/Vector2.cs b/DefoldSharpLib/types/Vector2.cs similarity index 65% rename from src/defold/types/Vector2.cs rename to DefoldSharpLib/types/Vector2.cs index 19d15f8..b0c41ae 100644 --- a/src/defold/types/Vector2.cs +++ b/DefoldSharpLib/types/Vector2.cs @@ -1,10 +1,8 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// - public class Vector2 : ILuaType + public class vector2 : ILuaType { public double x, y; @@ -12,55 +10,55 @@ public class Vector2 : ILuaType /// /// @CSharpLua.Template = "vmath.vector3()" /// - public extern Vector2(); + public extern vector2(); /// /// @CSharpLua.Template = "vmath.vector3({0},{1},0)" /// - public extern Vector2(double x, double y); + public extern vector2(double x, double y); /// /// @CSharpLua.Template = "{0} + {1}" /// - public static extern Vector2 operator +(Vector2 a, Vector2 b); + public static extern vector2 operator +(vector2 a, vector2 b); /// /// @CSharpLua.Template = "{0} - {1}" /// - public static extern Vector2 operator -(Vector2 a, Vector2 b); + public static extern vector2 operator -(vector2 a, vector2 b); /// /// @CSharpLua.Template = "-{0}" /// - public static extern Vector2 neg(Vector2 a); + public static extern vector2 neg(vector2 a); /// /// @CSharpLua.Template = "{0} * {1}" /// - public static extern Vector2 operator *(Vector2 a, double b); + public static extern vector2 operator *(vector2 a, double b); /// /// @CSharpLua.Template = "{0} * {1}" /// - public static extern Vector2 operator *(double a, Vector2 b); + public static extern vector2 operator *(double a, vector2 b); /// /// @CSharpLua.Template = "{0} * {1}" /// - public static extern Vector2 operator *(Vector2 a, Vector2 b); + public static extern vector2 operator *(vector2 a, vector2 b); /// /// @CSharpLua.Template = "{0} / {1}" /// - public static extern Vector2 operator /(Vector2 a, double b); + public static extern vector2 operator /(vector2 a, double b); /// @@ -78,31 +76,31 @@ public class Vector2 : ILuaType /// /// @CSharpLua.Template = "vmath.mul_per_elem({this},{0})" /// - public extern Vector3 MultiplyByElement(Vector3 other); + public extern vector3 MultiplyByElement(vector3 other); /// /// @CSharpLua.Template = "vmath.normalize({this})" /// - public extern Vector3 Normalize(); + public extern vector3 Normalize(); /// /// @CSharpLua.Template = "vmath.project({this},{0})" /// - public extern double Project(Vector2 v); + public extern double Project(vector2 v); /// /// @CSharpLua.Template = "vmath.project({this},{0})" /// - public extern double Project(Vector3 v); + public extern double Project(vector3 v); /// /// @CSharpLua.Template = "{0}" /// - public static implicit operator Vector3(Vector2 v) + public static implicit operator vector3(vector2 v) { return default; } diff --git a/src/defold/types/Vector3.cs b/DefoldSharpLib/types/Vector3.cs similarity index 65% rename from src/defold/types/Vector3.cs rename to DefoldSharpLib/types/Vector3.cs index 746dc0d..cbd18ff 100644 --- a/src/defold/types/Vector3.cs +++ b/DefoldSharpLib/types/Vector3.cs @@ -1,10 +1,8 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// - public class Vector3 : ILuaType + public class vector3 : ILuaType { public double x, y, z; @@ -12,55 +10,55 @@ public class Vector3 : ILuaType /// /// @CSharpLua.Template = "vmath.vector3()" /// - public extern Vector3(); + public extern vector3(); /// /// @CSharpLua.Template = "vmath.vector3({0},{1},{2})" /// - public extern Vector3(double x, double y, double z); + public extern vector3(double x, double y, double z); /// /// @CSharpLua.Template = "{0} + {1}" /// - public static extern Vector3 operator +(Vector3 a, Vector3 b); + public static extern vector3 operator +(vector3 a, vector3 b); /// /// @CSharpLua.Template = "{0} - {1}" /// - public static extern Vector3 operator -(Vector3 a, Vector3 b); + public static extern vector3 operator -(vector3 a, vector3 b); /// /// @CSharpLua.Template = "-{0}" /// - public static extern Vector3 neg(Vector3 a); + public static extern vector3 neg(vector3 a); /// /// @CSharpLua.Template = "{0} * {1}" /// - public static extern Vector3 operator *(Vector3 a, double b); + public static extern vector3 operator *(vector3 a, double b); /// /// @CSharpLua.Template = "{0} * {1}" /// - public static extern Vector3 operator *(double a, Vector3 b); + public static extern vector3 operator *(double a, vector3 b); /// /// @CSharpLua.Template = "{0} * {1}" /// - public static extern Vector3 operator *(Vector3 a, Vector3 b); + public static extern vector3 operator *(vector3 a, vector3 b); /// /// @CSharpLua.Template = "{0} / {1}" /// - public static extern Vector3 operator /(Vector3 a, double b); + public static extern vector3 operator /(vector3 a, double b); /// @@ -78,24 +76,24 @@ public class Vector3 : ILuaType /// /// @CSharpLua.Template = "vmath.mul_per_elem({this},{0})" /// - public extern Vector3 MultiplyByElement(Vector3 other); + public extern vector3 MultiplyByElement(vector3 other); /// /// @CSharpLua.Template = "vmath.normalize({this})" /// - public extern Vector3 Normalize(); + public extern vector3 Normalize(); /// /// @CSharpLua.Template = "vmath.project({this},{0})" /// - public extern double Project(Vector3 v); + public extern double Project(vector3 v); /// /// @CSharpLua.Template = "{this}" /// - public extern Vector2 ToVector2(); + public extern vector2 Tovector2(); } } diff --git a/src/defold/types/Vector4.cs b/DefoldSharpLib/types/Vector4.cs similarity index 65% rename from src/defold/types/Vector4.cs rename to DefoldSharpLib/types/Vector4.cs index 608334f..e23fbd3 100644 --- a/src/defold/types/Vector4.cs +++ b/DefoldSharpLib/types/Vector4.cs @@ -1,10 +1,8 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// - public class Vector4 : ILuaType + public class vector4 : ILuaType { public double x, y, u, v; @@ -12,55 +10,55 @@ public class Vector4 : ILuaType /// /// @CSharpLua.Template = "vmath.vector4()" /// - public extern Vector4(); + public extern vector4(); /// /// @CSharpLua.Template = "vmath.vector4({0},{1},{2},{3})" /// - public extern Vector4(double x, double y, double u, double v); + public extern vector4(double x, double y, double u, double v); /// /// @CSharpLua.Template = "{0} + {1}" /// - public static extern Vector4 operator +(Vector4 a, Vector4 b); + public static extern vector4 operator +(vector4 a, vector4 b); /// /// @CSharpLua.Template = "{0} - {1}" /// - public static extern Vector4 operator -(Vector4 a, Vector4 b); + public static extern vector4 operator -(vector4 a, vector4 b); /// /// @CSharpLua.Template = "-{0}" /// - public static extern Vector4 neg(Vector4 a); + public static extern vector4 neg(vector4 a); /// /// @CSharpLua.Template = "{0} * {1}" /// - public static extern Vector4 operator *(Vector4 a, double b); + public static extern vector4 operator *(vector4 a, double b); /// /// @CSharpLua.Template = "{0} * {1}" /// - public static extern Vector4 operator *(double a, Vector4 b); + public static extern vector4 operator *(double a, vector4 b); /// /// @CSharpLua.Template = "{0} * {1}" /// - public static extern Vector4 operator *(Vector4 a, Vector4 b); + public static extern vector4 operator *(vector4 a, vector4 b); /// /// @CSharpLua.Template = "{0} / {1}" /// - public static extern Vector4 operator /(Vector4 a, double b); + public static extern vector4 operator /(vector4 a, double b); /// @@ -78,12 +76,12 @@ public class Vector4 : ILuaType /// /// @CSharpLua.Template = "vmath.mul_per_elem({this},{0})" /// - public extern Vector4 MultiplyByElement(Vector4 other); + public extern vector4 MultiplyByElement(vector4 other); /// /// @CSharpLua.Template = "vmath.normalize({this})" /// - public extern Vector4 Normalize(); + public extern vector4 Normalize(); } } diff --git a/src/defold/types/WindowDimming.cs b/DefoldSharpLib/types/WindowDimming.cs similarity index 80% rename from src/defold/types/WindowDimming.cs rename to DefoldSharpLib/types/WindowDimming.cs index f63006a..cad5c5b 100644 --- a/src/defold/types/WindowDimming.cs +++ b/DefoldSharpLib/types/WindowDimming.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/src/defold/types/WindowEvent.cs b/DefoldSharpLib/types/WindowEvent.cs similarity index 87% rename from src/defold/types/WindowEvent.cs rename to DefoldSharpLib/types/WindowEvent.cs index 8c5f42c..231964e 100644 --- a/src/defold/types/WindowEvent.cs +++ b/DefoldSharpLib/types/WindowEvent.cs @@ -1,6 +1,4 @@ -using System; - -namespace types +namespace DefoldSharp { /// /// diff --git a/DefoldSharpLib/vmath.cs b/DefoldSharpLib/vmath.cs new file mode 100644 index 0000000..5e18660 --- /dev/null +++ b/DefoldSharpLib/vmath.cs @@ -0,0 +1,622 @@ +namespace DefoldSharp +{ + /// + /// Vector math API documentation + /// + /// + public static class Vmath + { + #region Defold API + /// + /// Creates a new zero vector with all components set to 0. + /// + /// @CSharpLua.Template = "vmath.vector3()" + /// + public static extern vector3 vector3(); + + + /// + /// Creates a new vector with all components set to the + /// supplied scalar value. + /// + /// @CSharpLua.Template = "vmath.vector3({0})" + /// + public static extern vector3 vector3(double n_p1); + + + /// + /// Creates a new vector with all components set to the + /// corresponding values from the supplied vector. I.e. + /// This function creates a copy of the given vector. + /// + /// @CSharpLua.Template = "vmath.vector3({0})" + /// + public static extern vector3 vector3(vector3 v1_p1); + + + /// + /// Creates a new vector with the components set to the + /// supplied values. + /// + /// @CSharpLua.Template = "vmath.vector3({0}, {1}, {2})" + /// + public static extern vector3 vector3(double x_p1, double y_p2, double z_p3); + + + /// + /// Creates a new zero vector with all components set to 0. + /// + /// @CSharpLua.Template = "vmath.vector4()" + /// + public static extern vector4 vector4(); + + + /// + /// Creates a new vector with all components set to the + /// supplied scalar value. + /// + /// @CSharpLua.Template = "vmath.vector4({0})" + /// + public static extern vector4 vector4(double n_p1); + + + /// + /// Creates a new vector with all components set to the + /// corresponding values from the supplied vector. I.e. + /// This function creates a copy of the given vector. + /// + /// @CSharpLua.Template = "vmath.vector4({0})" + /// + public static extern vector4 vector4(vector4 v1_p1); + + + /// + /// Creates a new vector with the components set to the + /// supplied values. + /// + /// @CSharpLua.Template = "vmath.vector4({0}, {1}, {2}, {3})" + /// + public static extern vector4 vector4(double x_p1, double y_p2, double z_p3, double w_p4); + + + /// + /// Creates a new identity quaternion. The identity + /// quaternion is equal to: + /// vmath.quat(0, 0, 0, 1) + /// + /// @CSharpLua.Template = "vmath.quat()" + /// + public static extern Quaternion quat(); + + + /// + /// Creates a new quaternion with all components set to the + /// corresponding values from the supplied quaternion. I.e. + /// This function creates a copy of the given quaternion. + /// + /// @CSharpLua.Template = "vmath.quat({0})" + /// + public static extern Quaternion quat(Quaternion q1_p1); + + + /// + /// Creates a new quaternion with the components set + /// according to the supplied parameter values. + /// + /// @CSharpLua.Template = "vmath.quat({0}, {1}, {2}, {3})" + /// + public static extern Quaternion quat(double x_p1, double y_p2, double z_p3, double w_p4); + + + /// + /// The resulting quaternion describes the rotation that, + /// if applied to the first vector, would rotate the first + /// vector to the second. The two vectors must be unit + /// vectors (of length 1). + /// The result is undefined if the two vectors point in opposite directions + /// + /// @CSharpLua.Template = "vmath.quat_from_to({0}, {1})" + /// + public static extern Quaternion quat_from_to(vector3 v1_p1, vector3 v2_p2); + + + /// + /// The resulting quaternion describes a rotation of angle + /// radians around the axis described by the unit vector v. + /// + /// @CSharpLua.Template = "vmath.quat_axis_angle({0}, {1})" + /// + public static extern Quaternion quat_axis_angle(vector3 v_p1, double angle_p2); + + + /// + /// The resulting quaternion describes the rotation from the + /// identity quaternion (no rotation) to the coordinate system + /// as described by the given x, y and z base unit vectors. + /// + /// @CSharpLua.Template = "vmath.quat_basis({0}, {1}, {2})" + /// + public static extern Quaternion quat_basis(vector3 x_p1, vector3 y_p2, vector3 z_p3); + + + /// + /// The resulting quaternion describes a rotation of angle + /// radians around the x-axis. + /// + /// @CSharpLua.Template = "vmath.quat_rotation_x({0})" + /// + public static extern Quaternion quat_rotation_x(double angle_p1); + + + /// + /// The resulting quaternion describes a rotation of angle + /// radians around the y-axis. + /// + /// @CSharpLua.Template = "vmath.quat_rotation_y({0})" + /// + public static extern Quaternion quat_rotation_y(double angle_p1); + + + /// + /// The resulting quaternion describes a rotation of angle + /// radians around the z-axis. + /// + /// @CSharpLua.Template = "vmath.quat_rotation_z({0})" + /// + public static extern Quaternion quat_rotation_z(double angle_p1); + + + /// + /// The resulting identity matrix describes a transform with + /// no translation or rotation. + /// + /// @CSharpLua.Template = "vmath.matrix4()" + /// + public static extern Matrix4 matrix4(); + + + /// + /// Creates a new matrix with all components set to the + /// corresponding values from the supplied matrix. I.e. + /// the function creates a copy of the given matrix. + /// + /// @CSharpLua.Template = "vmath.matrix4({0})" + /// + public static extern Matrix4 matrix4(Matrix4 m1_p1); + + + /// + /// Constructs a frustum matrix from the given values. The left, right, + /// top and bottom coordinates of the view cone are expressed as distances + /// from the center of the near clipping plane. The near and far coordinates + /// are expressed as distances from the tip of the view frustum cone. + /// + /// @CSharpLua.Template = "vmath.matrix4_frustum({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern Matrix4 matrix4_frustum(double left_p1, double right_p2, double bottom_p3, double top_p4, double near_p5, double far_p6); + + + /// + /// The resulting matrix is created from the supplied look-at parameters. + /// This is useful for constructing a view matrix for a camera or + /// rendering in general. + /// + /// @CSharpLua.Template = "vmath.matrix4_look_at({0}, {1}, {2})" + /// + public static extern Matrix4 matrix4_look_at(vector3 eye_p1, vector3 look_at_p2, vector3 up_p3); + + + /// + /// Creates an orthographic projection matrix. + /// This is useful to construct a projection matrix for a camera or rendering in general. + /// + /// @CSharpLua.Template = "vmath.matrix4_orthographic({0}, {1}, {2}, {3}, {4}, {5})" + /// + public static extern Matrix4 matrix4_orthographic(double left_p1, double right_p2, double bottom_p3, double top_p4, double near_p5, double far_p6); + + + /// + /// Creates a perspective projection matrix. + /// This is useful to construct a projection matrix for a camera or rendering in general. + /// + /// @CSharpLua.Template = "vmath.matrix4_perspective({0}, {1}, {2}, {3})" + /// + public static extern Matrix4 matrix4_perspective(double fov_p1, double aspect_p2, double near_p3, double far_p4); + + + /// + /// The resulting matrix describes the same rotation as the quaternion, but does not have any translation (also like the quaternion). + /// + /// @CSharpLua.Template = "vmath.matrix4_from_quat({0})" + /// + public static extern Matrix4 matrix4_from_quat(Quaternion q_p1); + + + /// + /// The resulting matrix describes a rotation around the axis by the specified angle. + /// + /// @CSharpLua.Template = "vmath.matrix4_axis_angle({0}, {1})" + /// + public static extern Matrix4 matrix4_axis_angle(vector3 v_p1, double angle_p2); + + + /// + /// The resulting matrix describes a rotation around the x-axis + /// by the specified angle. + /// + /// @CSharpLua.Template = "vmath.matrix4_rotation_x({0})" + /// + public static extern Matrix4 matrix4_rotation_x(double angle_p1); + + + /// + /// The resulting matrix describes a rotation around the y-axis + /// by the specified angle. + /// + /// @CSharpLua.Template = "vmath.matrix4_rotation_y({0})" + /// + public static extern Matrix4 matrix4_rotation_y(double angle_p1); + + + /// + /// The resulting matrix describes a rotation around the z-axis + /// by the specified angle. + /// + /// @CSharpLua.Template = "vmath.matrix4_rotation_z({0})" + /// + public static extern Matrix4 matrix4_rotation_z(double angle_p1); + + + /// + /// The resulting matrix describes a translation of a point + /// in euclidean space. + /// + /// @CSharpLua.Template = "vmath.matrix4_translation({0})" + /// + public static extern Matrix4 matrix4_translation(vector3 position_p1); + + + /// + /// The resulting matrix describes a translation of a point + /// in euclidean space. + /// + /// @CSharpLua.Template = "vmath.matrix4_translation({0})" + /// + public static extern Matrix4 matrix4_translation(vector4 position_p1); + + + /// + /// The resulting matrix is the inverse of the supplied matrix. + /// For ortho-normal matrices, e.g. regular object transformation, + /// use vmath.ortho_inv() instead. + /// The specialized inverse for ortho-normalized matrices is much faster + /// than the general inverse. + /// + /// @CSharpLua.Template = "vmath.inv({0})" + /// + public static extern Matrix4 inv(Matrix4 m1_p1); + + + /// + /// The resulting matrix is the inverse of the supplied matrix. + /// The supplied matrix has to be an ortho-normal matrix, e.g. + /// describe a regular object transformation. + /// For matrices that are not ortho-normal + /// use the general inverse vmath.inv() instead. + /// + /// @CSharpLua.Template = "vmath.ortho_inv({0})" + /// + public static extern Matrix4 ortho_inv(Matrix4 m1_p1); + + + /// + /// The returned value is a scalar defined as: + /// P ⋅ Q = |P| |Q| cos θ + /// where θ is the angle between the vectors P and Q. + ///
    + ///
  • If the dot product is positive then the angle between the vectors is below 90 degrees.
  • + ///
  • If the dot product is zero the vectors are perpendicular (at right-angles to each other).
  • + ///
  • If the dot product is negative then the angle between the vectors is more than 90 degrees.
  • + ///
+ /// + /// @CSharpLua.Template = "vmath.dot({0}, {1})" + ///
+ public static extern double dot(vector3 v1_p1, vector3 v2_p2); + + + /// + /// The returned value is a scalar defined as: + /// P ⋅ Q = |P| |Q| cos θ + /// where θ is the angle between the vectors P and Q. + ///
    + ///
  • If the dot product is positive then the angle between the vectors is below 90 degrees.
  • + ///
  • If the dot product is zero the vectors are perpendicular (at right-angles to each other).
  • + ///
  • If the dot product is negative then the angle between the vectors is more than 90 degrees.
  • + ///
+ /// + /// @CSharpLua.Template = "vmath.dot({0}, {1})" + ///
+ public static extern double dot(vector3 v1_p1, vector4 v2_p2); + + + /// + /// The returned value is a scalar defined as: + /// P ⋅ Q = |P| |Q| cos θ + /// where θ is the angle between the vectors P and Q. + ///
    + ///
  • If the dot product is positive then the angle between the vectors is below 90 degrees.
  • + ///
  • If the dot product is zero the vectors are perpendicular (at right-angles to each other).
  • + ///
  • If the dot product is negative then the angle between the vectors is more than 90 degrees.
  • + ///
+ /// + /// @CSharpLua.Template = "vmath.dot({0}, {1})" + ///
+ public static extern double dot(vector4 v1_p1, vector3 v2_p2); + + + /// + /// The returned value is a scalar defined as: + /// P ⋅ Q = |P| |Q| cos θ + /// where θ is the angle between the vectors P and Q. + ///
    + ///
  • If the dot product is positive then the angle between the vectors is below 90 degrees.
  • + ///
  • If the dot product is zero the vectors are perpendicular (at right-angles to each other).
  • + ///
  • If the dot product is negative then the angle between the vectors is more than 90 degrees.
  • + ///
+ /// + /// @CSharpLua.Template = "vmath.dot({0}, {1})" + ///
+ public static extern double dot(vector4 v1_p1, vector4 v2_p2); + + + /// + /// Returns the squared length of the supplied vector or quaternion. + /// + /// @CSharpLua.Template = "vmath.length_sqr({0})" + /// + public static extern double length_sqr(vector3 v_p1); + + + /// + /// Returns the squared length of the supplied vector or quaternion. + /// + /// @CSharpLua.Template = "vmath.length_sqr({0})" + /// + public static extern double length_sqr(vector4 v_p1); + + + /// + /// Returns the squared length of the supplied vector or quaternion. + /// + /// @CSharpLua.Template = "vmath.length_sqr({0})" + /// + public static extern double length_sqr(Quaternion v_p1); + + + /// + /// Returns the length of the supplied vector or quaternion. + /// If you are comparing the lengths of vectors or quaternions, you should compare + /// the length squared instead as it is slightly more efficient to calculate + /// (it eliminates a square root calculation). + /// + /// @CSharpLua.Template = "vmath.length({0})" + /// + public static extern double length(vector3 v_p1); + + + /// + /// Returns the length of the supplied vector or quaternion. + /// If you are comparing the lengths of vectors or quaternions, you should compare + /// the length squared instead as it is slightly more efficient to calculate + /// (it eliminates a square root calculation). + /// + /// @CSharpLua.Template = "vmath.length({0})" + /// + public static extern double length(vector4 v_p1); + + + /// + /// Returns the length of the supplied vector or quaternion. + /// If you are comparing the lengths of vectors or quaternions, you should compare + /// the length squared instead as it is slightly more efficient to calculate + /// (it eliminates a square root calculation). + /// + /// @CSharpLua.Template = "vmath.length({0})" + /// + public static extern double length(Quaternion v_p1); + + + /// + /// Normalizes a vector, i.e. returns a new vector with the same + /// direction as the input vector, but with length 1. + /// The length of the vector must be above 0, otherwise a + /// division-by-zero will occur. + /// + /// @CSharpLua.Template = "vmath.normalize({0})" + /// + public static extern vector3 normalize(vector3 v1_p1); + + + /// + /// Normalizes a vector, i.e. returns a new vector with the same + /// direction as the input vector, but with length 1. + /// The length of the vector must be above 0, otherwise a + /// division-by-zero will occur. + /// + /// @CSharpLua.Template = "vmath.normalize({0})" + /// + public static extern vector4 normalize(vector4 v1_p1); + + + /// + /// Normalizes a vector, i.e. returns a new vector with the same + /// direction as the input vector, but with length 1. + /// The length of the vector must be above 0, otherwise a + /// division-by-zero will occur. + /// + /// @CSharpLua.Template = "vmath.normalize({0})" + /// + public static extern Quaternion normalize(Quaternion v1_p1); + + + /// + /// Given two linearly independent vectors P and Q, the cross product, + /// P × Q, is a vector that is perpendicular to both P and Q and + /// therefore normal to the plane containing them. + /// If the two vectors have the same direction (or have the exact + /// opposite direction from one another, i.e. are not linearly independent) + /// or if either one has zero length, then their cross product is zero. + /// + /// @CSharpLua.Template = "vmath.cross({0}, {1})" + /// + public static extern vector3 cross(vector3 v1_p1, vector3 v2_p2); + + + /// + /// Linearly interpolate between two vectors. The function + /// treats the vectors as positions and interpolates between + /// the positions in a straight line. Lerp is useful to describe + /// transitions from one place to another over time. + /// The function does not clamp t between 0 and 1. + /// + /// @CSharpLua.Template = "vmath.lerp({0}, {1}, {2})" + /// + public static extern vector3 lerp(double t_p1, vector3 v1_p2, vector3 v2_p3); + + + /// + /// Linearly interpolate between two vectors. The function + /// treats the vectors as positions and interpolates between + /// the positions in a straight line. Lerp is useful to describe + /// transitions from one place to another over time. + /// The function does not clamp t between 0 and 1. + /// + /// @CSharpLua.Template = "vmath.lerp({0}, {1}, {2})" + /// + public static extern vector4 lerp(double t_p1, vector4 v1_p2, vector4 v2_p3); + + + /// + /// Linearly interpolate between two vectors. The function + /// treats the vectors as positions and interpolates between + /// the positions in a straight line. Lerp is useful to describe + /// transitions from one place to another over time. + /// The function does not clamp t between 0 and 1. + /// + /// @CSharpLua.Template = "vmath.lerp({0}, {1}, {2})" + /// + public static extern Quaternion lerp(double t_p1, Quaternion v1_p2, Quaternion v2_p3); + + + /// + /// Linearly interpolate between two vectors. The function + /// treats the vectors as positions and interpolates between + /// the positions in a straight line. Lerp is useful to describe + /// transitions from one place to another over time. + /// The function does not clamp t between 0 and 1. + /// + /// @CSharpLua.Template = "vmath.lerp({0}, {1}, {2})" + /// + public static extern double lerp(double t_p1, double v1_p2, double v2_p3); + + + /// + /// Spherically interpolates between two vectors. The difference to + /// lerp is that slerp treats the vectors as directions instead of + /// positions in space. + /// The direction of the returned vector is interpolated by the angle + /// and the magnitude is interpolated between the magnitudes of the + /// from and to vectors. + /// Slerp is computationally more expensive than lerp. + /// The function does not clamp t between 0 and 1. + /// + /// @CSharpLua.Template = "vmath.slerp({0}, {1}, {2})" + /// + public static extern vector3 slerp(double t_p1, vector3 v1_p2, vector3 v2_p3); + + + /// + /// Spherically interpolates between two vectors. The difference to + /// lerp is that slerp treats the vectors as directions instead of + /// positions in space. + /// The direction of the returned vector is interpolated by the angle + /// and the magnitude is interpolated between the magnitudes of the + /// from and to vectors. + /// Slerp is computationally more expensive than lerp. + /// The function does not clamp t between 0 and 1. + /// + /// @CSharpLua.Template = "vmath.slerp({0}, {1}, {2})" + /// + public static extern vector4 slerp(double t_p1, vector4 v1_p2, vector4 v2_p3); + + + /// + /// Spherically interpolates between two vectors. The difference to + /// lerp is that slerp treats the vectors as directions instead of + /// positions in space. + /// The direction of the returned vector is interpolated by the angle + /// and the magnitude is interpolated between the magnitudes of the + /// from and to vectors. + /// Slerp is computationally more expensive than lerp. + /// The function does not clamp t between 0 and 1. + /// + /// @CSharpLua.Template = "vmath.slerp({0}, {1}, {2})" + /// + public static extern Quaternion slerp(double t_p1, Quaternion v1_p2, Quaternion v2_p3); + + + /// + /// Calculates the conjugate of a quaternion. The result is a + /// quaternion with the same magnitudes but with the sign of + /// the imaginary (vector) parts changed: + /// q* = [w, -v] + /// + /// @CSharpLua.Template = "vmath.conj({0})" + /// + public static extern Quaternion conj(Quaternion q1_p1); + + + /// + /// Returns a new vector from the supplied vector that is + /// rotated by the rotation described by the supplied + /// quaternion. + /// + /// @CSharpLua.Template = "vmath.rotate({0}, {1})" + /// + public static extern vector3 rotate(Quaternion q_p1, vector3 v1_p2); + + + /// + /// Calculates the extent the projection of the first vector onto the second. + /// The returned value is a scalar p defined as: + /// p = |P| cos θ / |Q| + /// where θ is the angle between the vectors P and Q. + /// + /// @CSharpLua.Template = "vmath.project({0}, {1})" + /// + public static extern double project(vector3 v1_p1, vector3 v2_p2); + + + /// + /// Performs an element wise multiplication between two vectors of the same type + /// The returned value is a vector defined as (e.g. for a vector3): + /// v = vmath.mul_per_elem(a, b) = vmath.vector3(a.x * b.x, a.y * b.y, a.z * b.z) + /// + /// @CSharpLua.Template = "vmath.mul_per_elem({0}, {1})" + /// + public static extern vector3 mul_per_elem(vector3 v1_p1, vector3 v2_p2); + + + /// + /// Performs an element wise multiplication between two vectors of the same type + /// The returned value is a vector defined as (e.g. for a vector3): + /// v = vmath.mul_per_elem(a, b) = vmath.vector3(a.x * b.x, a.y * b.y, a.z * b.z) + /// + /// @CSharpLua.Template = "vmath.mul_per_elem({0}, {1})" + /// + public static extern vector4 mul_per_elem(vector4 v1_p1, vector4 v2_p2); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/webview.cs b/DefoldSharpLib/webview.cs new file mode 100644 index 0000000..5f23351 --- /dev/null +++ b/DefoldSharpLib/webview.cs @@ -0,0 +1,12 @@ +namespace DefoldSharp +{ + /// + /// Webview API documentation + /// + /// + public static class Webview + { + #region Defold API + #endregion Defold API + } +} diff --git a/DefoldSharpLib/window.cs b/DefoldSharpLib/window.cs new file mode 100644 index 0000000..a34192d --- /dev/null +++ b/DefoldSharpLib/window.cs @@ -0,0 +1,68 @@ +using System; + +namespace DefoldSharp +{ + /// + /// Window API documentation + /// + /// + public static class Window + { + #region Defold API + /// + /// Sets a window event listener. + /// + /// @CSharpLua.Template = "window.set_listener({0})" + /// + public static extern void set_listener(Action callback_p1); + + + /// + /// Set the locking state for current mouse cursor on a PC platform. + /// This function locks or unlocks the mouse cursor to the center point of the window. While the cursor is locked, + /// mouse position updates will still be sent to the scripts as usual. + /// + /// @CSharpLua.Template = "window.set_mouse_lock({0})" + /// + public static extern void set_mouse_lock(bool flag_p1); + + + /// + /// Sets the dimming mode on a mobile device. + /// The dimming mode specifies whether or not a mobile device should dim the screen after a period without user interaction. The dimming mode will only affect the mobile device while the game is in focus on the device, but not when the game is running in the background. + /// This function has no effect on platforms that does not support dimming. + /// + /// @CSharpLua.Template = "window.set_dim_mode({0})" + /// + public static extern void set_dim_mode(WindowDimming mode_p1); + + + /// + /// Returns the current dimming mode set on a mobile device. + /// The dimming mode specifies whether or not a mobile device should dim the screen after a period without user interaction. + /// On platforms that does not support dimming, window.DIMMING_UNKNOWN is always returned. + /// + /// @CSharpLua.Template = "window.get_dim_mode()" + /// + public static extern WindowDimming get_dim_mode(); + + + /// + /// This returns the current window size (width and height). + /// + /// @CSharpLua.Template = "window.get_size()" + /// + public static extern double get_size(out double height_o1); + + + /// + /// This returns the current lock state of the mouse cursor + /// + /// @CSharpLua.Template = "window.get_mouse_lock()" + /// + public static extern bool get_mouse_lock(); + + + #endregion Defold API + } +} diff --git a/DefoldSharpLib/zlib.cs b/DefoldSharpLib/zlib.cs new file mode 100644 index 0000000..4c76510 --- /dev/null +++ b/DefoldSharpLib/zlib.cs @@ -0,0 +1,28 @@ +namespace DefoldSharp +{ + /// + /// Zlib compression API documentation + /// + /// + public static class Zlib + { + #region Defold API + /// + /// A lua error is raised is on error + /// + /// @CSharpLua.Template = "zlib.inflate({0})" + /// + public static extern string inflate(string buf_p1); + + + /// + /// A lua error is raised is on error + /// + /// @CSharpLua.Template = "zlib.deflate({0})" + /// + public static extern string deflate(string buf_p1); + + + #endregion Defold API + } +} diff --git a/bin/CoreSystem.Lua/Sample/test.lua b/bin/CoreSystem.Lua/Sample/test.lua deleted file mode 100644 index c21dfb0..0000000 --- a/bin/CoreSystem.Lua/Sample/test.lua +++ /dev/null @@ -1,426 +0,0 @@ -require("strict") -local _, socket = pcall(require, "socket") - -local now = 0 -local timeoutQueue - -local conf = { - time = socket and socket.gettime or os.time, - setTimeout = function (f, delay) - if not timeoutQueue then - timeoutQueue = System.TimeoutQueue() - end - return timeoutQueue:Add(now, delay, f) - end, - clearTimeout = function (t) - timeoutQueue:Erase(t) - end -} - -local function runTimeout() - if timeoutQueue then - while true do - local nextExpiration = timeoutQueue:getNextExpiration() - if nextExpiration then - now = nextExpiration - timeoutQueue:RunLoop(now) - else - break - end - end - end -end - -package.path = package.path .. ";CSharp.lua/Coresystem.lua/?.lua" -require("All")("", conf) -collectgarbage("collect") -print(collectgarbage("count")) - -local function test(f, name) - print("-----------------------------", name) - f() - print("\n") -end - -local function printList(list) - assert(list) - local t = {} - for _, i in System.each(list) do - table.insert(t, i:ToString()) - end - print(table.concat(t, " ")) -end - -local function testDateTimeAndTimeSpan() - local date = System.DateTime.getNow() - print(date:getTicks()) - print(date:ToString(), date:getYear(), date:getMonth(), date:getDay(), date:getHour(), date:getMinute(), date:getSecond()) - - local ts = System.TimeSpan.FromSeconds(20) - print(ts:ToString()) - - date = date + System.TimeSpan.FromDays(2) - print(date:ToString()) - - date = date:AddMonths(2); - print(date:ToString()) - - local baseTime = System.DateTime(1970, 1, 1) - print(baseTime:ToString()) - print(baseTime:AddMilliseconds(1458032204643):ToString()) -end - -local function testArray() - local arr = System.Array(System.Int32):new(10) - print(arr:ToString(), #arr) - printList(arr) - arr:set(0, 2) - arr:set(6, 4) - printList(arr) - print(arr:get(0), arr:get(6), arr:get(9)) -end - -local function testList() - local list = System.List(System.Int)() - list:Add(20) - list:Add(15) - list:Add(6) - print(list:ToString(), #list) - printList(list) - local subList = list:GetRange(1, 2) - printList(subList) - list:set(1, 8) - list:Sort() - printList(list) - print(list:Contains(10), list:Contains(15), list:IndexOf(20)) - list:RemoveAll(function(i) return i >= 10 end) - print(#list, list:get(1)) - printList(list) -end - -local function testDictionary() - local dict = System.Dictionary(System.String, System.Int)() - dict:Add("a", 1) - dict:Add("b", 12) - dict:Add("c", 25) - dict:Add("d", 30) - for _, pair in System.each(dict) do - print(pair.Key, pair.Value) - end - print("-------------") - for k, v in System.pairs(dict) do - print(k, v) - end -end - -local function testYeild() - local enumerable = function (begin, _end) - return System.yieldIEnumerable(function (begin, _end) - while begin < _end do - System.yield(begin) - begin = begin + 1 - end - end, System.Int, begin, _end) - end - local e = enumerable(1, 10) - printList(e) - printList(e) -end - -local function testDelegate() - local prints = "" - local function printExt(s) - prints = prints .. s - print(s) - end - - local function assertExt(s) - assert(prints == s, s) - prints = "" - end - - local d1 = function() printExt("d1") end - local d2 = function() printExt("d2") end - local d3 = function() printExt("d3") end - - local f = nil + d1 - f() - assertExt("d1") - print("--") - - f = d1 + nil - f() - assertExt("d1") - print("--") - - f = d1 + d2 - f() - assertExt("d1d2") - print("--") - - f = d1 + (d2 + d3) - f() - assertExt("d1d2d3") - print("--") - - f = (d1 + d2) + (d2 + d3) - f() - assertExt("d1d2d2d3") - print("--") - - f = d1 + d2 - d1 - f() - assertExt("d2") - print("--") - - f = d1 + d2 - d2 - f() - assertExt("d1") - print("--") - - f = d1 + d2 + d1 - d1 - f() - assertExt("d1d2") - print("--") - - f = d1 + d2 + d3 - (d1 + d2) - f() - assertExt("d3") - print("--") - - f = d1 + d2 + d3 - (d2 + d1) - f() - assertExt("d1d2d3") - print("--") - - f = (d1 + d2) + (d3 + d1 + d2) - local f1 = d1 + d2 - f = f - f1 - f() - assertExt("d1d2d3") - - print("--") - f = (d1 + d2) - (d1 + d2) - print(f == nil) -end - -local function testLinq() - local Linq = System.Linq.Enumerable - local list = System.List(System.Int)() - list:Add(10) list:Add(2) list:Add(30) list:Add(4) list:Add(5) list:Add(6) list:Add(7) list:Add(8) - printList(Linq.Where(list, function(i) return i >= 4 end)) - printList(Linq.Take(list, 4)) - printList(Linq.Select(list, function(i) return i + 2 end, System.Int)) - print(Linq.Min(list), Linq.Max(list)) - print(Linq.ElementAtOrDefault(Linq.Where(list, function(i) return i <= 4 end), 5)) - local ll = Linq.Where(list, function(i) return i <= 4 end) - print(Linq.Count(ll)) - Linq.Any(ll) - print(Linq.Count(ll)) - - printList(Linq.OrderByDescending(list, function(i) return i end, nil, System.Int)) - list = System.List(System.Object)() - local super = { - ToString = function(t) - return t[1] .. ',' .. t[2] .. ',' .. t[3] .. '|' - end - } - super.__index = super - - list:Add(setmetatable({ 4, 2, 3 }, super)) - list:Add(setmetatable({ 3, 1, 3 }, super)) - list:Add(setmetatable({ 1, 2, 3 }, super)) - list:Add(setmetatable({ 3, 2, 4 }, super)) - list:Add(setmetatable({ 3, 2, 3 }, super)) - - local t1 = Linq.OrderBy(list, function(i) return i[1] end, nil, System.Int) - printList(t1) - t1 = Linq.ThenBy(t1, function(i) return i[2] end, nil, System.Int) - t1 = Linq.ThenBy(t1, function(i) return i[3] end, nil, System.Int) - printList(t1) -end - -local function testGroupBy() - local Linq = System.Linq.Enumerable - local list = System.List(System.Object)() - list:Add({ id = 5, Template = 30 }) - list:Add({ id = 6, Template = 30 }) - list:Add({ id = 1, Template = 1 }) - list:Add({ id = 2, Template = 2 }) - list:Add({ id = 3, Template = 1 }) - list:Add({ id = 4, Template = 2 }) - local groups = Linq.GroupBy(list, function (i) return i.Template end, System.Int) - local s = "" - for _, group in System.each(groups) do - for _, item in System.each(group) do - s = s .. item.id - end - end - print(s) - assert(s == "561324"); -end - -local function testType() - local ins = 2 - print(System.is(ins, System.Double)) - local t = ins:GetType() - print(t:getName()) - print(System.is("ddd", System.String)) - print(System.as("ddd", System.String)) - print(System.cast(System.String, "ddd")) -end - -local function testNumCast() - assert(System.toInt32(-2147483659) == 2147483637) - assert(System.toUInt32(-2147483659) == 2147483637) - assert(System.toUInt64(-1) == 18446744073709551615) -end - -local function testSplit() - local a = "a, b" - local aa = a:Split(44 --[[',']]) - printList(aa) -end - -local function testConsole() - print("enter your name") - local name = System.Console.ReadLine() - print("enter your age") - local age = System.Console.ReadLine() - System.Console.WriteLine("name {0}, age {1}", name, age) -end - -local function testIO() - local path = "iotest.txt" - local s = "hero, CSharp.lua\nIO" - local File = System.IO.File - File.WriteAllText(path, s) - local text = File.ReadAllText(path) - assert(text == s) - File.Delete(path) -end - -local function testStringBuilder() - local sb = System.StringBuilder() - sb:Append("aa") - sb:Append("bbcc") - sb:setLength(5) - print(sb, sb:getLength()) -end - -local function testAsync() - -- Generated by CSharp.lua Compiler - local System = System - local Test - System.import(function (global) - Test = global.Test - end) - System.namespace("Test", function (namespace) - namespace.class("TestAsync", function (namespace) - local f, __ctor__ - __ctor__ = function (this) - local t = f(this) - System.Console.WriteLine(("{0}, {1}"):Format(t:getStatus():EnumToString(System.TaskStatus), t:getException())) - end - f = function (this) - return System.async(function (async, this) - local t = System.Task.Delay(2000) - async:await(t) - async:await(t) - System.Console.WriteLine(("Delay {0}"):Format(t:getStatus():ToEnumString(System.TaskStatus))) - end, nil, this) - end - return { - f = f, - __ctor__ = __ctor__ - } - end) - - namespace.class("Program", function (namespace) - local Main - Main = function () - Test.TestAsync() - end - return { - Main = Main - } - end) - end) - - System.init({ - types = { - "Test.Program", - "Test.TestAsync" - }, - Main = "Test.Program.Main" - }) - - Test.Program.Main() - runTimeout() -end - -local function testAsyncForeach() - local System = System - local ListInt32 = System.List(System.Int32) - System.namespace("Test", function (namespace) - namespace.class("Program", function (namespace) - local GenerateSequence, Main, Test - GenerateSequence = function (n) - return System.yieldIAsyncEnumerable(function (async, n) - for i = 0, n - 1 do - async:yield(i) - end - end, System.Int32, n) - end - Main = function (args) - Test() - end - Test = function () - System.async(function (async) - local l = ListInt32() - for _, number in System.asynceach(async, GenerateSequence(10)) do - System.Console.WriteLine(number) - l:Add(number) - end - async:await(System.Task.Delay(200)) - System.Console.WriteLine(System.String.JoinEnumerable(",", l)) - end, true) - end - return { - GenerateSequence = GenerateSequence, - Main = Main - } - end) - end) - - System.init({ - "Test.Program" - }, { - Main = "Test.Program.Main" - }) - - Test.Program.Main() - runTimeout() -end - -test(testDateTimeAndTimeSpan, "DateTime & TimeSpan") -test(testArray, "Array") -test(testList, "List") -test(testDictionary, "Dictionary") -test(testYeild, "Yeild") -test(testDelegate, "Delegate") -test(testLinq, "Linq") -test(testGroupBy, "GroupBy") -test(testType, "Type") -test(testNumCast, "NumCast") -test(testSplit, "testSplit") -test(testStringBuilder, "StringBuilder") -test(testIO, "IO") ---test(testConsole, "Console") ---test(testAsync, "Async") ---test(testAsyncForeach, "testAsyncForeach") - - - - - diff --git a/src/Directory.Build.props b/src/Directory.Build.props deleted file mode 100644 index 5586f51..0000000 --- a/src/Directory.Build.props +++ /dev/null @@ -1,6 +0,0 @@ - - - .obj - .obj - - \ No newline at end of file diff --git a/src/Game.csproj b/src/Game.csproj deleted file mode 100644 index f14c3f0..0000000 --- a/src/Game.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - net6.0 - 7.1 - .obj\$(AssemblyName) - true - - - - .bin\Debug\ - 1701;1702;0626;0824;0169 - - - - .bin\Release\ - 1701;1702;0626;0824;0169 - - - - - - - diff --git a/src/Game.sln b/src/Game.sln deleted file mode 100644 index d9d18e2..0000000 --- a/src/Game.sln +++ /dev/null @@ -1,16 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Game", "Game.csproj", "{71C2C149-E4FF-49B0-B6E8-51DF078701F1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {71C2C149-E4FF-49B0-B6E8-51DF078701F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {71C2C149-E4FF-49B0-B6E8-51DF078701F1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {71C2C149-E4FF-49B0-B6E8-51DF078701F1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {71C2C149-E4FF-49B0-B6E8-51DF078701F1}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/src/build.cmd b/src/build.cmd deleted file mode 100644 index fd2ddbe..0000000 --- a/src/build.cmd +++ /dev/null @@ -1 +0,0 @@ -..\\bin\\compiler\\CSharp.lua.Launcher.exe -s .\\ -d ..\\scripts -c -include ..\\bin\\CoreSystem.Lua -metadata -inline-property -p \ No newline at end of file diff --git a/src/defold/Defold.cs b/src/defold/Defold.cs deleted file mode 100644 index 0af04df..0000000 --- a/src/defold/Defold.cs +++ /dev/null @@ -1,24 +0,0 @@ -using types; - -/// -/// @CSharpLua.Ignore -/// -public static class Defold -{ - /// - /// @CSharpLua.Template = "hash({0})" - /// - public static extern Hash hash(string s); - - - /// - /// @CSharpLua.Template = "hash_to_hex({0})" - /// - public static extern string hash_to_hex(Hash h); - - - /// - /// @CSharpLua.Template = "pprint({0})" - /// - public static extern void pprint(object v); -} \ No newline at end of file diff --git a/src/defold/Message.cs b/src/defold/Message.cs deleted file mode 100644 index 3680189..0000000 --- a/src/defold/Message.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Dynamic; -using support; -using types; - -public static class Message -{ - private static readonly Dictionary typeToHashLookup = new Dictionary(); - ///// - ///// @CSharpLua.Template = "msg.post({0},{1})" - ///// - //public static extern void post(HashOrStringOrUrl receiver, Message message_id); - - ///// - ///// @CSharpLua.Template = "msg.post({0},{1},{2})" - ///// - //public static extern void post(HashOrStringOrUrl receiver, Message message_id, T message_data); - - - ///// - ///// @CSharpLua.Template = "msg.post({0},{1},{2})" - ///// - //public static extern void post(HashOrStringOrUrl receiver, HashOrString message_id, object message_data); - - - /// - /// @CSharpLua.Template = msg.post({0},{1}) - /// - public static extern void post(string id, string message); - - /// - /// @CSharpLua.Template = msg.post({0},{1}) - /// - public static extern void post(Url id, string message); - /// - /// @CSharpLua.Template = msg.post({0},{1}) - /// - public static extern void post(Hash id, string message); - - - /// - /// @CSharpLua.Template = msg.post({0},{1},{2}) - /// - public static extern void post(string id, string code, ILuaTable data); - - /// - /// @CSharpLua.Template = msg.post({0},{1},{2}) - /// - public static extern void post(Url id, string code, ILuaTable data); - - /// - /// @CSharpLua.Template = msg.post({0},{1},{2}) - /// - public static extern void post(Hash id, string code, ILuaTable data); - - - public static void postMessage(string id, string code, ILuaTableSerializable data) - { - post(id, code, data.ToTable()); - } - - - public static void postMessage(Url id, string code, ILuaTableSerializable data) - { - post(id, code, data.ToTable()); - } - - - public static void postMessage(Hash id, string code, ILuaTableSerializable data) - { - post(id, code, data.ToTable()); - } - - - public static void postMessage(string id, MessageImplementation message) - { - post(id, message.FetchCode(), message.ToTable()); - } - - - public static void postMessage(Hash id, MessageImplementation message) - { - post(id, message.FetchCode(), message.ToTable()); - } - - - public static void postMessage(Url id, MessageImplementation message) - { - post(id, message.FetchCode(), message.ToTable()); - } - - - public static bool IsMessage(Hash message_id, dynamic message, Hash expectedCode, out T messageImpl) - where T : MessageImplementation - { - if (message_id == expectedCode) - { - messageImpl = message; - return true; - } - - - messageImpl = message; - return false; - } - - - public static bool IsMessage(Hash message_id, dynamic message, out T messageImpl, - bool reconstructMetadata = false) where T : MessageImplementation, new() - { - if (!typeToHashLookup.TryGetValue(typeof(T), out var hash)) - { - var dummy = new T(); - hash = dummy.FetchCode(); - typeToHashLookup.Add(typeof(T), hash); - } - - if (hash == message_id) - { - if (reconstructMetadata) - messageImpl = LuaTableSerializableExt.DefaultTableDeserialization(message); - else - messageImpl = message; - - return true; - } - - - messageImpl = message; - return false; - } -} - -public abstract class MessageImplementation : ILuaTableSerializable -{ - public ILuaTable ToTable() - { - return this.DefaultTableSerialization(); - } - - - public abstract Hash FetchCode(); -} \ No newline at end of file diff --git a/src/defold/buffer.cs b/src/defold/buffer.cs deleted file mode 100644 index 79f4332..0000000 --- a/src/defold/buffer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using support; -using types; - -/// -/// Buffer API documentation -/// -/// -public static class Buffer -{ - #region Defold API - /// - /// Create a new data buffer containing a specified set of streams. A data buffer - /// can contain one or more streams with typed data. This is useful for managing - /// compound data, for instance a vertex buffer could contain separate streams for - /// vertex position, color, normal etc. - /// - /// @CSharpLua.Template = "buffer.create({0}, {1})" - /// - public static extern DataBuffer create(double element_count_p1, ILuaTable declaration_p2); - - - /// - /// Get a specified stream from a buffer. - /// - /// @CSharpLua.Template = "buffer.get_stream({0}, {1})" - /// - public static extern BufferStream get_stream(DataBuffer buffer_p1, Hash stream_name_p2); - - - /// - /// Get a specified stream from a buffer. - /// - /// @CSharpLua.Template = "buffer.get_stream({0}, {1})" - /// - public static extern BufferStream get_stream(DataBuffer buffer_p1, string stream_name_p2); - - - /// - /// Copy a specified amount of data from one stream to another. - /// The value type and size must match between source and destination streams. - /// The source and destination streams can be the same. - /// - /// @CSharpLua.Template = "buffer.copy_stream({0}, {1}, {2}, {3}, {4})" - /// - public static extern void copy_stream(BufferStream dst_p1, double dstoffset_p2, BufferStream src_p3, double srcoffset_p4, double count_p5); - - - /// - /// Copy all data streams from one buffer to another, element wise. - /// Each of the source streams must have a matching stream in the - /// destination buffer. The streams must match in both type and size. - /// The source and destination buffer can be the same. - /// - /// @CSharpLua.Template = "buffer.copy_buffer({0}, {1}, {2}, {3}, {4})" - /// - public static extern void copy_buffer(DataBuffer dst_p1, double dstoffset_p2, DataBuffer src_p3, double srcoffset_p4, double count_p5); - - - /// - /// Get a copy of all the bytes from a specified stream as a Lua string. - /// - /// @CSharpLua.Template = "buffer.get_bytes({0}, {1})" - /// - public static extern string get_bytes(DataBuffer buffer_p1, Hash stream_name_p2); - - - #endregion Defold API -} diff --git a/src/defold/builtins.cs b/src/defold/builtins.cs deleted file mode 100644 index e32993c..0000000 --- a/src/defold/builtins.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using support; -using types; - -/// -/// Built-ins API documentation -/// -/// -public static class Builtins -{ - #region Defold API - /// - /// Pretty printing of Lua values. This function prints Lua values - /// in a manner similar to +print()+, but will also recurse into tables - /// and pretty print them. There is a limit to how deep the function - /// will recurse. - /// - /// @CSharpLua.Template = "builtins.pprint({0})" - /// - public static extern void pprint(LuaType v_p1); - - - /// - /// All ids in the engine are represented as hashes, so a string needs to be hashed - /// before it can be compared with an id. - /// - /// @CSharpLua.Template = "builtins.hash({0})" - /// - public static extern Hash hash(string s_p1); - - - /// - /// Returns a hexadecimal representation of a hash value. - /// The returned string is always padded with leading zeros. - /// - /// @CSharpLua.Template = "builtins.hash_to_hex({0})" - /// - public static extern string hash_to_hex(Hash h_p1); - - - #endregion Defold API -} diff --git a/src/defold/camera.cs b/src/defold/camera.cs deleted file mode 100644 index aa8c0da..0000000 --- a/src/defold/camera.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using support; -using types; - -/// -/// Camera API documentation -/// -/// -public static class Camera -{ - #region Defold API - #region Messages - /// - /// - public class set_camera_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("set_camera"); - public override Hash FetchCode() => __CODE__; - - public double aspect_ratio; - public double fov; - public double near_z; - public double far_z; - public bool orthographic_projection; - public double orthographic_zoom; - } - - - /// - /// - public class acquire_camera_focus_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("acquire_camera_focus"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class release_camera_focus_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("release_camera_focus"); - public override Hash FetchCode() => __CODE__; - - } - - - #endregion Messages - - - #endregion Defold API -} diff --git a/src/defold/collectionfactory.cs b/src/defold/collectionfactory.cs deleted file mode 100644 index 78b600b..0000000 --- a/src/defold/collectionfactory.cs +++ /dev/null @@ -1,500 +0,0 @@ -using System; -using support; -using types; - -/// -/// Collection factory API documentation -/// -/// -public class CollectionFactory : BuiltInComponentBase -{ - #region Defold API - /// - /// This returns status of the collection factory. - /// Calling this function when the factory is not marked as dynamic loading always returns COMP_COLLECTION_FACTORY_STATUS_LOADED. - /// - /// @CSharpLua.Template = "collectionfactory.get_status()" - /// - public static extern FactoryStatus get_status(); - - - /// - /// This returns status of the collection factory. - /// Calling this function when the factory is not marked as dynamic loading always returns COMP_COLLECTION_FACTORY_STATUS_LOADED. - /// - /// @CSharpLua.Template = "collectionfactory.get_status({0})" - /// - public static extern FactoryStatus get_status(string url_p1); - - - /// - /// This returns status of the collection factory. - /// Calling this function when the factory is not marked as dynamic loading always returns COMP_COLLECTION_FACTORY_STATUS_LOADED. - /// - /// @CSharpLua.Template = "collectionfactory.get_status({0})" - /// - public static extern FactoryStatus get_status(Hash url_p1); - - - /// - /// This returns status of the collection factory. - /// Calling this function when the factory is not marked as dynamic loading always returns COMP_COLLECTION_FACTORY_STATUS_LOADED. - /// - /// @CSharpLua.Template = "collectionfactory.get_status({0})" - /// - public static extern FactoryStatus get_status(Url url_p1); - - - /// - /// This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "collectionfactory.unload()" - /// - public static extern void unload(); - - - /// - /// This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "collectionfactory.unload({0})" - /// - public static extern void unload(string url_p1); - - - /// - /// This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "collectionfactory.unload({0})" - /// - public static extern void unload(Hash url_p1); - - - /// - /// This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "collectionfactory.unload({0})" - /// - public static extern void unload(Url url_p1); - - - /// - /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "collectionfactory.load()" - /// - public static extern void load(); - - - /// - /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "collectionfactory.load({0})" - /// - public static extern void load(string url_p1); - - - /// - /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "collectionfactory.load({0}, {1})" - /// - public static extern void load(string url_p1, Action complete_function_p2); - - - /// - /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "collectionfactory.load({0})" - /// - public static extern void load(Hash url_p1); - - - /// - /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "collectionfactory.load({0}, {1})" - /// - public static extern void load(Hash url_p1, Action complete_function_p2); - - - /// - /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "collectionfactory.load({0})" - /// - public static extern void load(Url url_p1); - - - /// - /// Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "collectionfactory.load({0}, {1})" - /// - public static extern void load(Url url_p1, Action complete_function_p2); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0})" - /// - public static extern ILuaTable create(string url_p1); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0}, {1})" - /// - public static extern ILuaTable create(string url_p1, Vector3 position_p2); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2})" - /// - public static extern ILuaTable create(string url_p1, Vector3 position_p2, Quaternion rotation_p3); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3})" - /// - public static extern ILuaTable create(string url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3}, {4})" - /// - public static extern ILuaTable create(string url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4, double scale_p5); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0})" - /// - public static extern ILuaTable create(Hash url_p1); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0}, {1})" - /// - public static extern ILuaTable create(Hash url_p1, Vector3 position_p2); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2})" - /// - public static extern ILuaTable create(Hash url_p1, Vector3 position_p2, Quaternion rotation_p3); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3})" - /// - public static extern ILuaTable create(Hash url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3}, {4})" - /// - public static extern ILuaTable create(Hash url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4, double scale_p5); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0})" - /// - public static extern ILuaTable create(Url url_p1); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0}, {1})" - /// - public static extern ILuaTable create(Url url_p1, Vector3 position_p2); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2})" - /// - public static extern ILuaTable create(Url url_p1, Vector3 position_p2, Quaternion rotation_p3); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3})" - /// - public static extern ILuaTable create(Url url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4); - - - /// - /// The URL identifies the collectionfactory component that should do the spawning. - /// Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale - /// will be applied to the whole collection when spawned. - /// Script properties in the created game objects can be overridden through - /// a properties-parameter table. The table should contain game object ids - /// (hash) as keys and property tables as values to be used when initiating each - /// spawned game object. - /// See go.property for more information on script properties. - /// The function returns a table that contains a key for each game object - /// id (hash), as addressed if the collection file was top level, and the - /// corresponding spawned instance id (hash) as value with a unique path - /// prefix added to each instance. - /// Calling collectionfactory.create create on a collection factory that is marked as dynamic without having loaded resources - /// using collectionfactory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "collectionfactory.create({0}, {1}, {2}, {3}, {4})" - /// - public static extern ILuaTable create(Url url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4, double scale_p5); - - - #endregion Defold API - - - public readonly struct CollectionFactoryCreateResult - { - public readonly Hash RelativeHash; - public readonly Hash UniqueHash; - - - public CollectionFactoryCreateResult(Hash relativeHash, Hash uniqueHash) - { - RelativeHash = relativeHash; - UniqueHash = uniqueHash; - } - } - - public FactoryStatus Status => get_status(this); - - - public LuaTableOf Create() - { - return (dynamic)create(this); - } - - public LuaTableOf Create(Vector3 position) - { - return (dynamic)create(this, position); - } - - public LuaTableOf Create(Vector3 position, Quaternion rotation) - { - return (dynamic)create(this, position, rotation); - } - - public LuaTableOf Create(Vector3 position, Quaternion rotation, ILuaTable properties) - { - return (dynamic)create(this, position, rotation, properties); - } -} diff --git a/src/defold/collectionproxy.cs b/src/defold/collectionproxy.cs deleted file mode 100644 index c12e551..0000000 --- a/src/defold/collectionproxy.cs +++ /dev/null @@ -1,227 +0,0 @@ -using System; -using support; -using types; - -/// -/// Collection proxy API documentation -/// -/// -public class CollectionProxy : BuiltInComponentBase -{ - #region Defold API - #region Messages - /// - /// - public class set_time_step_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("set_time_step"); - public override Hash FetchCode() => __CODE__; - - public double factor; - public double mode; - } - - - /// - /// - public class load_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("load"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class async_load_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("async_load"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class proxy_loaded_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("proxy_loaded"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class init_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("init"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class enable_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("enable"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class disable_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("disable"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class final_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("final"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class unload_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("unload"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class proxy_unloaded_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("proxy_unloaded"); - public override Hash FetchCode() => __CODE__; - - } - - - #endregion Messages - - - /// - /// return an indexed table of resources for a collection proxy. Each - /// entry is a hexadecimal string that represents the data of the specific - /// resource. This representation corresponds with the filename for each - /// individual resource that is exported when you bundle an application with - /// LiveUpdate functionality. - /// - /// @CSharpLua.Template = "collectionproxy.get_resources({0})" - /// - public static extern ILuaTable get_resources(Url collectionproxy_p1); - - - /// - /// return an array of missing resources for a collection proxy. Each - /// entry is a hexadecimal string that represents the data of the specific - /// resource. This representation corresponds with the filename for each - /// individual resource that is exported when you bundle an application with - /// LiveUpdate functionality. It should be considered good practise to always - /// check whether or not there are any missing resources in a collection proxy - /// before attempting to load the collection proxy. - /// - /// @CSharpLua.Template = "collectionproxy.missing_resources({0})" - /// - public static extern ILuaTable missing_resources(Url collectionproxy_p1); - - - #endregion Defold API - - - /// - /// Posts a load message to the collection-proxy-component to start the loading of the referenced collection. When the loading has completed, the message proxy_loaded will be sent back to the script. A loaded collection must be initialized (message init) and enabled (message enable) in order to be simulated and drawn. - /// - public void Load() - { - var message = new load_message(); - Message.postMessage(this, message); - } - - - /// - /// Posts a async_load message to a collection-proxy-component to start background loading of the referenced collection. When the loading has completed, the message proxy_loaded will be sent back to the script. A loaded collection must be initialized (message init) and enabled (message enable) in order to be simulated and drawn. - /// - public void LoadAsync() - { - var message = new async_load_message(); - Message.postMessage(this, message); - } - - - /// - /// Post this message to a collection-proxy-component to initialize the game objects and components in the referenced collection. Sending enable to an uninitialized collection proxy automatically initializes it. The init message simply provides a higher level of control. - /// - public void Init() - { - var message = new init_message(); - Message.postMessage(this, message); - } - - - /// - /// Post this message to a collection-proxy-component to enable the referenced collection, which in turn enables the contained game objects and components. If the referenced collection was not initialized prior to this call, it will automatically be initialized. - /// - public void Enable() - { - var message = new enable_message(); - Message.postMessage(this, message); - } - - - /// - /// Post this message to a collection-proxy-component to disable the referenced collection, which in turn disables the contained game objects and components. - /// - public void Disable() - { - var message = new disable_message(); - Message.postMessage(this, message); - } - - - /// - /// Post this message to a collection-proxy-component to finalize the referenced collection, which in turn finalizes the contained game objects and components. - /// - public void Final() - { - var message = new final_message(); - Message.postMessage(this, message); - } - - - /// - /// Post this message to a collection-proxy-component to start the unloading of the referenced collection. When the unloading has completed, the message proxy_unloaded will be sent back to the script. - /// - public void Unload() - { - var message = new unload_message(); - Message.postMessage(this, message); - } - - - /// - /// Post this message to a collection-proxy-component to modify the time-step used when updating the collection controlled by the proxy. The time-step is modified by a scaling factor and can be incremented either continuously or in discrete steps. The continuous mode can be used for slow-motion or fast-forward effects. The discrete mode is only useful when scaling the time-step to pass slower than real time (factor is below 1). The time-step will then be set to 0 for as many frames as the scaling demands and then take on the full real-time-step for one frame, to simulate pulses. E.g. if factor is set to 0.1 the time-step would be 0 for 9 frames, then be 1/60 for one frame, 0 for 9 frames, and so on. The result in practice is that the game looks like it's updated at a much lower frequency than 60 Hz, which can be useful for debugging when each frame needs to be inspected. - /// - /// - /// - public void SetTimeStep(double factor, TimeStepMode mode) - { - var message = new set_time_step_message() { factor = factor, mode = (dynamic)mode }; - Message.postMessage(this, message); - } -} diff --git a/src/defold/crash.cs b/src/defold/crash.cs deleted file mode 100644 index 117ab20..0000000 --- a/src/defold/crash.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using support; -using types; - -/// -/// Crash API documentation -/// -/// -public static class Crash -{ - #region Defold API - /// - /// Performs the same steps as if a crash had just occured but - /// allows the program to continue. - /// The generated dump can be read by crash.load_previous - /// - /// @CSharpLua.Template = "crash.write_dump()" - /// - public static extern void write_dump(); - - - /// - /// Crashes occuring before the path is set will be stored to a default engine location. - /// - /// @CSharpLua.Template = "crash.set_file_path({0})" - /// - public static extern void set_file_path(string path_p1); - - - /// - /// The crash dump will be removed from disk upon a successful - /// load, so loading is one-shot. - /// - /// @CSharpLua.Template = "crash.load_previous()" - /// - public static extern double load_previous(); - - - /// - /// releases a previously loaded crash dump - /// - /// @CSharpLua.Template = "crash.release({0})" - /// - public static extern void release(double handle_p1); - - - /// - /// Store a user value that will get written to a crash dump when - /// a crash occurs. This can be user id:s, breadcrumb data etc. - /// There are 32 slots indexed from 0. Each slot stores at most 255 characters. - /// - /// @CSharpLua.Template = "crash.set_user_field({0}, {1})" - /// - public static extern void set_user_field(double index_p1, string value_p2); - - - /// - /// The function returns a table containing entries with sub-tables that - /// have fields 'name' and 'address' set for all loaded modules. - /// - /// @CSharpLua.Template = "crash.get_modules({0})" - /// - public static extern ILuaTable get_modules(double handle_p1); - - - /// - /// reads user field from a loaded crash dump - /// - /// @CSharpLua.Template = "crash.get_user_field({0}, {1})" - /// - public static extern string get_user_field(double handle_p1, double index_p2); - - - /// - /// reads a system field from a loaded crash dump - /// - /// @CSharpLua.Template = "crash.get_sys_field({0}, {1})" - /// - public static extern string get_sys_field(double handle_p1, double index_p2); - - - /// - /// read signal number from a crash report - /// - /// @CSharpLua.Template = "crash.get_signum({0})" - /// - public static extern double get_signum(double handle_p1); - - - /// - /// A table is returned containing the addresses of the call stack. - /// - /// @CSharpLua.Template = "crash.get_backtrace({0})" - /// - public static extern ILuaTable get_backtrace(double handle_p1); - - - /// - /// The format of read text blob is platform specific - /// and not guaranteed - /// but can be useful for manual inspection. - /// - /// @CSharpLua.Template = "crash.get_extra_data({0})" - /// - public static extern string get_extra_data(double handle_p1); - - - #endregion Defold API -} diff --git a/src/defold/debug.cs b/src/defold/debug.cs deleted file mode 100644 index 1a7a47b..0000000 --- a/src/defold/debug.cs +++ /dev/null @@ -1,70 +0,0 @@ -public static class Debug -{ - /// - /// @CSharpLua.Template = "sys.get_engine_info().is_debug" - /// - public extern static bool IsEditorDebug(); - - - static Debug() - { - if (IsEditorDebug()) - { - _debuggingEnabled = true; - - _hook = _getHook(out _mask, out _count); - } - } - - - /// - /// @CSharpLua.Template = "debug.gethook()" - /// - private static extern object _getHook(out object mask, out object count); - - - /// - /// @CSharpLua.Template = "debug.sethook()" - /// - private static extern object _setHook(); - - - /// - /// @CSharpLua.Template = "debug.sethook({0},{1},{2})" - /// - private static extern object _setHook(object hook, object mask, object count); - - - private static object _hook; - private static object _mask; - private static object _count; - private static bool _debuggingEnabled = true; - - - public static void SetEditorDebug(bool shouldDebug = true) - { - if (!IsEditorDebug()) - return; - - if (shouldDebug) - { - _setHook(_hook, _mask, _count); - _debuggingEnabled = true; - } - else - { - _setHook(); - _debuggingEnabled = false; - } - } - - - public static bool ToggleEditorDebug() - { - if (!IsEditorDebug()) - return false; - - SetEditorDebug(!_debuggingEnabled); - return _debuggingEnabled; - } -} \ No newline at end of file diff --git a/src/defold/facebook.cs b/src/defold/facebook.cs deleted file mode 100644 index 03b2a70..0000000 --- a/src/defold/facebook.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using support; -using types; - -/// -/// Facebook API documentation -/// -/// -public static class Facebook -{ - #region Defold API - #endregion Defold API -} diff --git a/src/defold/factory.cs b/src/defold/factory.cs deleted file mode 100644 index 6bbb173..0000000 --- a/src/defold/factory.cs +++ /dev/null @@ -1,448 +0,0 @@ -using System; -using support; -using types; - -/// -/// Factory API documentation -/// -/// -public class Factory : BuiltInComponentBase -{ - #region Defold API - /// - /// This returns status of the factory. - /// Calling this function when the factory is not marked as dynamic loading always returns - /// factory.STATUS_LOADED. - /// - /// @CSharpLua.Template = "factory.get_status()" - /// - public static extern FactoryStatus get_status(); - - - /// - /// This returns status of the factory. - /// Calling this function when the factory is not marked as dynamic loading always returns - /// factory.STATUS_LOADED. - /// - /// @CSharpLua.Template = "factory.get_status({0})" - /// - public static extern FactoryStatus get_status(string url_p1); - - - /// - /// This returns status of the factory. - /// Calling this function when the factory is not marked as dynamic loading always returns - /// factory.STATUS_LOADED. - /// - /// @CSharpLua.Template = "factory.get_status({0})" - /// - public static extern FactoryStatus get_status(Hash url_p1); - - - /// - /// This returns status of the factory. - /// Calling this function when the factory is not marked as dynamic loading always returns - /// factory.STATUS_LOADED. - /// - /// @CSharpLua.Template = "factory.get_status({0})" - /// - public static extern FactoryStatus get_status(Url url_p1); - - - /// - /// This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "factory.unload()" - /// - public static extern void unload(); - - - /// - /// This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "factory.unload({0})" - /// - public static extern void unload(string url_p1); - - - /// - /// This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "factory.unload({0})" - /// - public static extern void unload(Hash url_p1); - - - /// - /// This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "factory.unload({0})" - /// - public static extern void unload(Url url_p1); - - - /// - /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "factory.load()" - /// - public static extern void load(); - - - /// - /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "factory.load({0})" - /// - public static extern void load(string url_p1); - - - /// - /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "factory.load({0}, {1})" - /// - public static extern void load(string url_p1, Action complete_function_p2); - - - /// - /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "factory.load({0})" - /// - public static extern void load(Hash url_p1); - - - /// - /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "factory.load({0}, {1})" - /// - public static extern void load(Hash url_p1, Action complete_function_p2); - - - /// - /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "factory.load({0})" - /// - public static extern void load(Url url_p1); - - - /// - /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - /// @CSharpLua.Template = "factory.load({0}, {1})" - /// - public static extern void load(Url url_p1, Action complete_function_p2); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0})" - /// - public static extern Hash create(string url_p1); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1})" - /// - public static extern Hash create(string url_p1, Vector3 position_p2); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1}, {2})" - /// - public static extern Hash create(string url_p1, Vector3 position_p2, Quaternion rotation_p3); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3})" - /// - public static extern Hash create(string url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" - /// - public static extern Hash create(string url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4, double scale_p5); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" - /// - public static extern Hash create(string url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4, Vector3 scale_p5); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0})" - /// - public static extern Hash create(Hash url_p1); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1})" - /// - public static extern Hash create(Hash url_p1, Vector3 position_p2); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1}, {2})" - /// - public static extern Hash create(Hash url_p1, Vector3 position_p2, Quaternion rotation_p3); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3})" - /// - public static extern Hash create(Hash url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" - /// - public static extern Hash create(Hash url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4, double scale_p5); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" - /// - public static extern Hash create(Hash url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4, Vector3 scale_p5); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0})" - /// - public static extern Hash create(Url url_p1); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1})" - /// - public static extern Hash create(Url url_p1, Vector3 position_p2); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1}, {2})" - /// - public static extern Hash create(Url url_p1, Vector3 position_p2, Quaternion rotation_p3); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3})" - /// - public static extern Hash create(Url url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" - /// - public static extern Hash create(Url url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4, double scale_p5); - - - /// - /// The URL identifies which factory should create the game object. - /// If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. - /// Properties defined in scripts in the created game object can be overridden through the properties-parameter below. - /// See go.property for more information on script properties. - /// Calling factory.create on a factory that is marked as dynamic without having loaded resources - /// using factory.load will synchronously load and create resources which may affect application performance. - /// - /// @CSharpLua.Template = "factory.create({0}, {1}, {2}, {3}, {4})" - /// - public static extern Hash create(Url url_p1, Vector3 position_p2, Quaternion rotation_p3, ILuaTable properties_p4, Vector3 scale_p5); - - - #endregion Defold API - - - /// - /// Calling this function when the factory is not marked as dynamic loading always returns - /// factory.STATUS_LOADED. - /// - public FactoryStatus Status => get_status(this); - - - /// - /// This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - public void Unload() => unload(this); - - - /// - /// Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. - /// Calling this function when the factory is not marked as dynamic loading does nothing. - /// - public void Load() => load(this); - - - public void Load(Action callback) - { - void IntermediateCallback(object obj, Url url, bool b) - { - callback(obj, this, b); - } - - load(this, IntermediateCallback); - } - - - public Hash Create() - { - return (dynamic)create(this); - } - - - public Hash Create(Vector3 position) - { - return (dynamic)create(this, position); - } - - - public Hash Create(Vector3 position, Quaternion rotation) - { - return (dynamic)create(this, position, rotation); - } - - - public Hash Create(Vector3 position, Quaternion rotation, ILuaTable properties) - { - return (dynamic)create(this, position, rotation, properties); - } - - - public Hash Create(Vector3 position, Quaternion rotation, ILuaTable properties, double scale) - { - return (dynamic)create(this, position, rotation, properties, scale); - } -} diff --git a/src/defold/go.cs b/src/defold/go.cs deleted file mode 100644 index dda1889..0000000 --- a/src/defold/go.cs +++ /dev/null @@ -1,2391 +0,0 @@ -using System; -using support; -using types; - -/// -/// Game object API documentation -/// -/// -public static class Go -{ - #region Defold API - #region Messages - /// - /// - public class acquire_input_focus_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("acquire_input_focus"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class release_input_focus_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("release_input_focus"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class set_parent_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("set_parent"); - public override Hash FetchCode() => __CODE__; - - public Hash parent_id; - public double keep_world_transform; - } - - - /// - /// - public class enable_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("enable"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class disable_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("disable"); - public override Hash FetchCode() => __CODE__; - - } - - - #endregion Messages - - - /// - /// gets a named property of the specified game object or component - /// - /// @CSharpLua.Template = "go.get({0}, {1})" - /// - public static extern LuaType get(string url_p1, string property_p2); - - - /// - /// gets a named property of the specified game object or component - /// - /// @CSharpLua.Template = "go.get({0}, {1}, {2})" - /// - public static extern LuaType get(string url_p1, string property_p2, ILuaTable options_p3); - - - /// - /// gets a named property of the specified game object or component - /// - /// @CSharpLua.Template = "go.get({0}, {1})" - /// - public static extern LuaType get(string url_p1, Hash property_p2); - - - /// - /// gets a named property of the specified game object or component - /// - /// @CSharpLua.Template = "go.get({0}, {1}, {2})" - /// - public static extern LuaType get(string url_p1, Hash property_p2, ILuaTable options_p3); - - - /// - /// gets a named property of the specified game object or component - /// - /// @CSharpLua.Template = "go.get({0}, {1})" - /// - public static extern LuaType get(Hash url_p1, string property_p2); - - - /// - /// gets a named property of the specified game object or component - /// - /// @CSharpLua.Template = "go.get({0}, {1}, {2})" - /// - public static extern LuaType get(Hash url_p1, string property_p2, ILuaTable options_p3); - - - /// - /// gets a named property of the specified game object or component - /// - /// @CSharpLua.Template = "go.get({0}, {1})" - /// - public static extern LuaType get(Hash url_p1, Hash property_p2); - - - /// - /// gets a named property of the specified game object or component - /// - /// @CSharpLua.Template = "go.get({0}, {1}, {2})" - /// - public static extern LuaType get(Hash url_p1, Hash property_p2, ILuaTable options_p3); - - - /// - /// gets a named property of the specified game object or component - /// - /// @CSharpLua.Template = "go.get({0}, {1})" - /// - public static extern LuaType get(Url url_p1, string property_p2); - - - /// - /// gets a named property of the specified game object or component - /// - /// @CSharpLua.Template = "go.get({0}, {1}, {2})" - /// - public static extern LuaType get(Url url_p1, string property_p2, ILuaTable options_p3); - - - /// - /// gets a named property of the specified game object or component - /// - /// @CSharpLua.Template = "go.get({0}, {1})" - /// - public static extern LuaType get(Url url_p1, Hash property_p2); - - - /// - /// gets a named property of the specified game object or component - /// - /// @CSharpLua.Template = "go.get({0}, {1}, {2})" - /// - public static extern LuaType get(Url url_p1, Hash property_p2, ILuaTable options_p3); - - - /// - /// sets a named property of the specified game object or component, or a material constant - /// - /// @CSharpLua.Template = "go.set({0}, {1}, {2})" - /// - public static extern void set(string url_p1, string property_p2, LuaType value_p3); - - - /// - /// sets a named property of the specified game object or component, or a material constant - /// - /// @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" - /// - public static extern void set(string url_p1, string property_p2, LuaType value_p3, ILuaTable options_p4); - - - /// - /// sets a named property of the specified game object or component, or a material constant - /// - /// @CSharpLua.Template = "go.set({0}, {1}, {2})" - /// - public static extern void set(string url_p1, Hash property_p2, LuaType value_p3); - - - /// - /// sets a named property of the specified game object or component, or a material constant - /// - /// @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" - /// - public static extern void set(string url_p1, Hash property_p2, LuaType value_p3, ILuaTable options_p4); - - - /// - /// sets a named property of the specified game object or component, or a material constant - /// - /// @CSharpLua.Template = "go.set({0}, {1}, {2})" - /// - public static extern void set(Hash url_p1, string property_p2, LuaType value_p3); - - - /// - /// sets a named property of the specified game object or component, or a material constant - /// - /// @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" - /// - public static extern void set(Hash url_p1, string property_p2, LuaType value_p3, ILuaTable options_p4); - - - /// - /// sets a named property of the specified game object or component, or a material constant - /// - /// @CSharpLua.Template = "go.set({0}, {1}, {2})" - /// - public static extern void set(Hash url_p1, Hash property_p2, LuaType value_p3); - - - /// - /// sets a named property of the specified game object or component, or a material constant - /// - /// @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" - /// - public static extern void set(Hash url_p1, Hash property_p2, LuaType value_p3, ILuaTable options_p4); - - - /// - /// sets a named property of the specified game object or component, or a material constant - /// - /// @CSharpLua.Template = "go.set({0}, {1}, {2})" - /// - public static extern void set(Url url_p1, string property_p2, LuaType value_p3); - - - /// - /// sets a named property of the specified game object or component, or a material constant - /// - /// @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" - /// - public static extern void set(Url url_p1, string property_p2, LuaType value_p3, ILuaTable options_p4); - - - /// - /// sets a named property of the specified game object or component, or a material constant - /// - /// @CSharpLua.Template = "go.set({0}, {1}, {2})" - /// - public static extern void set(Url url_p1, Hash property_p2, LuaType value_p3); - - - /// - /// sets a named property of the specified game object or component, or a material constant - /// - /// @CSharpLua.Template = "go.set({0}, {1}, {2}, {3})" - /// - public static extern void set(Url url_p1, Hash property_p2, LuaType value_p3, ILuaTable options_p4); - - - /// - /// The position is relative the parent (if any). Use go.get_world_position to retrieve the global world position. - /// - /// @CSharpLua.Template = "go.get_position()" - /// - public static extern Vector3 get_position(); - - - /// - /// The position is relative the parent (if any). Use go.get_world_position to retrieve the global world position. - /// - /// @CSharpLua.Template = "go.get_position({0})" - /// - public static extern Vector3 get_position(string id_p1); - - - /// - /// The position is relative the parent (if any). Use go.get_world_position to retrieve the global world position. - /// - /// @CSharpLua.Template = "go.get_position({0})" - /// - public static extern Vector3 get_position(Hash id_p1); - - - /// - /// The position is relative the parent (if any). Use go.get_world_position to retrieve the global world position. - /// - /// @CSharpLua.Template = "go.get_position({0})" - /// - public static extern Vector3 get_position(Url id_p1); - - - /// - /// The rotation is relative to the parent (if any). Use go.get_world_rotation to retrieve the global world rotation. - /// - /// @CSharpLua.Template = "go.get_rotation()" - /// - public static extern Quaternion get_rotation(); - - - /// - /// The rotation is relative to the parent (if any). Use go.get_world_rotation to retrieve the global world rotation. - /// - /// @CSharpLua.Template = "go.get_rotation({0})" - /// - public static extern Quaternion get_rotation(string id_p1); - - - /// - /// The rotation is relative to the parent (if any). Use go.get_world_rotation to retrieve the global world rotation. - /// - /// @CSharpLua.Template = "go.get_rotation({0})" - /// - public static extern Quaternion get_rotation(Hash id_p1); - - - /// - /// The rotation is relative to the parent (if any). Use go.get_world_rotation to retrieve the global world rotation. - /// - /// @CSharpLua.Template = "go.get_rotation({0})" - /// - public static extern Quaternion get_rotation(Url id_p1); - - - /// - /// The scale is relative the parent (if any). Use go.get_world_scale to retrieve the global world 3D scale factor. - /// - /// @CSharpLua.Template = "go.get_scale()" - /// - public static extern Vector3 get_scale(); - - - /// - /// The scale is relative the parent (if any). Use go.get_world_scale to retrieve the global world 3D scale factor. - /// - /// @CSharpLua.Template = "go.get_scale({0})" - /// - public static extern Vector3 get_scale(string id_p1); - - - /// - /// The scale is relative the parent (if any). Use go.get_world_scale to retrieve the global world 3D scale factor. - /// - /// @CSharpLua.Template = "go.get_scale({0})" - /// - public static extern Vector3 get_scale(Hash id_p1); - - - /// - /// The scale is relative the parent (if any). Use go.get_world_scale to retrieve the global world 3D scale factor. - /// - /// @CSharpLua.Template = "go.get_scale({0})" - /// - public static extern Vector3 get_scale(Url id_p1); - - - /// - /// The uniform scale is relative the parent (if any). If the underlying scale vector is non-uniform the min element of the vector is returned as the uniform scale factor. - /// - /// @CSharpLua.Template = "go.get_scale_uniform()" - /// - public static extern double get_scale_uniform(); - - - /// - /// The uniform scale is relative the parent (if any). If the underlying scale vector is non-uniform the min element of the vector is returned as the uniform scale factor. - /// - /// @CSharpLua.Template = "go.get_scale_uniform({0})" - /// - public static extern double get_scale_uniform(string id_p1); - - - /// - /// The uniform scale is relative the parent (if any). If the underlying scale vector is non-uniform the min element of the vector is returned as the uniform scale factor. - /// - /// @CSharpLua.Template = "go.get_scale_uniform({0})" - /// - public static extern double get_scale_uniform(Hash id_p1); - - - /// - /// The uniform scale is relative the parent (if any). If the underlying scale vector is non-uniform the min element of the vector is returned as the uniform scale factor. - /// - /// @CSharpLua.Template = "go.get_scale_uniform({0})" - /// - public static extern double get_scale_uniform(Url id_p1); - - - /// - /// The position is relative to the parent (if any). The global world position cannot be manually set. - /// - /// @CSharpLua.Template = "go.set_position({0})" - /// - public static extern void set_position(Vector3 position_p1); - - - /// - /// The position is relative to the parent (if any). The global world position cannot be manually set. - /// - /// @CSharpLua.Template = "go.set_position({0}, {1})" - /// - public static extern void set_position(Vector3 position_p1, string id_p2); - - - /// - /// The position is relative to the parent (if any). The global world position cannot be manually set. - /// - /// @CSharpLua.Template = "go.set_position({0}, {1})" - /// - public static extern void set_position(Vector3 position_p1, Hash id_p2); - - - /// - /// The position is relative to the parent (if any). The global world position cannot be manually set. - /// - /// @CSharpLua.Template = "go.set_position({0}, {1})" - /// - public static extern void set_position(Vector3 position_p1, Url id_p2); - - - /// - /// The rotation is relative to the parent (if any). The global world rotation cannot be manually set. - /// - /// @CSharpLua.Template = "go.set_rotation({0})" - /// - public static extern void set_rotation(Quaternion rotation_p1); - - - /// - /// The rotation is relative to the parent (if any). The global world rotation cannot be manually set. - /// - /// @CSharpLua.Template = "go.set_rotation({0}, {1})" - /// - public static extern void set_rotation(Quaternion rotation_p1, string id_p2); - - - /// - /// The rotation is relative to the parent (if any). The global world rotation cannot be manually set. - /// - /// @CSharpLua.Template = "go.set_rotation({0}, {1})" - /// - public static extern void set_rotation(Quaternion rotation_p1, Hash id_p2); - - - /// - /// The rotation is relative to the parent (if any). The global world rotation cannot be manually set. - /// - /// @CSharpLua.Template = "go.set_rotation({0}, {1})" - /// - public static extern void set_rotation(Quaternion rotation_p1, Url id_p2); - - - /// - /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. - /// Physics are currently not affected when setting scale from this function. - /// - /// @CSharpLua.Template = "go.set_scale({0})" - /// - public static extern void set_scale(double scale_p1); - - - /// - /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. - /// Physics are currently not affected when setting scale from this function. - /// - /// @CSharpLua.Template = "go.set_scale({0}, {1})" - /// - public static extern void set_scale(double scale_p1, string id_p2); - - - /// - /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. - /// Physics are currently not affected when setting scale from this function. - /// - /// @CSharpLua.Template = "go.set_scale({0}, {1})" - /// - public static extern void set_scale(double scale_p1, Hash id_p2); - - - /// - /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. - /// Physics are currently not affected when setting scale from this function. - /// - /// @CSharpLua.Template = "go.set_scale({0}, {1})" - /// - public static extern void set_scale(double scale_p1, Url id_p2); - - - /// - /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. - /// Physics are currently not affected when setting scale from this function. - /// - /// @CSharpLua.Template = "go.set_scale({0})" - /// - public static extern void set_scale(Vector3 scale_p1); - - - /// - /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. - /// Physics are currently not affected when setting scale from this function. - /// - /// @CSharpLua.Template = "go.set_scale({0}, {1})" - /// - public static extern void set_scale(Vector3 scale_p1, string id_p2); - - - /// - /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. - /// Physics are currently not affected when setting scale from this function. - /// - /// @CSharpLua.Template = "go.set_scale({0}, {1})" - /// - public static extern void set_scale(Vector3 scale_p1, Hash id_p2); - - - /// - /// The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. - /// Physics are currently not affected when setting scale from this function. - /// - /// @CSharpLua.Template = "go.set_scale({0}, {1})" - /// - public static extern void set_scale(Vector3 scale_p1, Url id_p2); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent()" - /// - public static extern void set_parent(); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0})" - /// - public static extern void set_parent(string id_p1); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1})" - /// - public static extern void set_parent(string id_p1, string parent_id_p2); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" - /// - public static extern void set_parent(string id_p1, string parent_id_p2, bool keep_world_transform_p3); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1})" - /// - public static extern void set_parent(string id_p1, Hash parent_id_p2); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" - /// - public static extern void set_parent(string id_p1, Hash parent_id_p2, bool keep_world_transform_p3); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1})" - /// - public static extern void set_parent(string id_p1, Url parent_id_p2); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" - /// - public static extern void set_parent(string id_p1, Url parent_id_p2, bool keep_world_transform_p3); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0})" - /// - public static extern void set_parent(Hash id_p1); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1})" - /// - public static extern void set_parent(Hash id_p1, string parent_id_p2); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" - /// - public static extern void set_parent(Hash id_p1, string parent_id_p2, bool keep_world_transform_p3); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1})" - /// - public static extern void set_parent(Hash id_p1, Hash parent_id_p2); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" - /// - public static extern void set_parent(Hash id_p1, Hash parent_id_p2, bool keep_world_transform_p3); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1})" - /// - public static extern void set_parent(Hash id_p1, Url parent_id_p2); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" - /// - public static extern void set_parent(Hash id_p1, Url parent_id_p2, bool keep_world_transform_p3); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0})" - /// - public static extern void set_parent(Url id_p1); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1})" - /// - public static extern void set_parent(Url id_p1, string parent_id_p2); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" - /// - public static extern void set_parent(Url id_p1, string parent_id_p2, bool keep_world_transform_p3); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1})" - /// - public static extern void set_parent(Url id_p1, Hash parent_id_p2); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" - /// - public static extern void set_parent(Url id_p1, Hash parent_id_p2, bool keep_world_transform_p3); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1})" - /// - public static extern void set_parent(Url id_p1, Url parent_id_p2); - - - /// - /// Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, - /// like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world - /// space. - /// This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This - /// typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the - /// engine. - /// - /// @CSharpLua.Template = "go.set_parent({0}, {1}, {2})" - /// - public static extern void set_parent(Url id_p1, Url parent_id_p2, bool keep_world_transform_p3); - - - /// - /// Get the parent for a game object instance. - /// - /// @CSharpLua.Template = "go.get_parent()" - /// - public static extern Hash get_parent(); - - - /// - /// Get the parent for a game object instance. - /// - /// @CSharpLua.Template = "go.get_parent({0})" - /// - public static extern Hash get_parent(string id_p1); - - - /// - /// Get the parent for a game object instance. - /// - /// @CSharpLua.Template = "go.get_parent({0})" - /// - public static extern Hash get_parent(Hash id_p1); - - - /// - /// Get the parent for a game object instance. - /// - /// @CSharpLua.Template = "go.get_parent({0})" - /// - public static extern Hash get_parent(Url id_p1); - - - /// - /// The function will return the world position calculated at the end of the previous frame. - /// Use go.get_position to retrieve the position relative to the parent. - /// - /// @CSharpLua.Template = "go.get_world_position()" - /// - public static extern Vector3 get_world_position(); - - - /// - /// The function will return the world position calculated at the end of the previous frame. - /// Use go.get_position to retrieve the position relative to the parent. - /// - /// @CSharpLua.Template = "go.get_world_position({0})" - /// - public static extern Vector3 get_world_position(string id_p1); - - - /// - /// The function will return the world position calculated at the end of the previous frame. - /// Use go.get_position to retrieve the position relative to the parent. - /// - /// @CSharpLua.Template = "go.get_world_position({0})" - /// - public static extern Vector3 get_world_position(Hash id_p1); - - - /// - /// The function will return the world position calculated at the end of the previous frame. - /// Use go.get_position to retrieve the position relative to the parent. - /// - /// @CSharpLua.Template = "go.get_world_position({0})" - /// - public static extern Vector3 get_world_position(Url id_p1); - - - /// - /// The function will return the world rotation calculated at the end of the previous frame. - /// Use go.get_rotation to retrieve the rotation relative to the parent. - /// - /// @CSharpLua.Template = "go.get_world_rotation()" - /// - public static extern Quaternion get_world_rotation(); - - - /// - /// The function will return the world rotation calculated at the end of the previous frame. - /// Use go.get_rotation to retrieve the rotation relative to the parent. - /// - /// @CSharpLua.Template = "go.get_world_rotation({0})" - /// - public static extern Quaternion get_world_rotation(string id_p1); - - - /// - /// The function will return the world rotation calculated at the end of the previous frame. - /// Use go.get_rotation to retrieve the rotation relative to the parent. - /// - /// @CSharpLua.Template = "go.get_world_rotation({0})" - /// - public static extern Quaternion get_world_rotation(Hash id_p1); - - - /// - /// The function will return the world rotation calculated at the end of the previous frame. - /// Use go.get_rotation to retrieve the rotation relative to the parent. - /// - /// @CSharpLua.Template = "go.get_world_rotation({0})" - /// - public static extern Quaternion get_world_rotation(Url id_p1); - - - /// - /// The function will return the world 3D scale factor calculated at the end of the previous frame. - /// Use go.get_scale to retrieve the 3D scale factor relative to the parent. - /// This vector is derived by decomposing the transformation matrix and should be used with care. - /// For most cases it should be fine to use go.get_world_scale_uniform instead. - /// - /// @CSharpLua.Template = "go.get_world_scale()" - /// - public static extern Vector3 get_world_scale(); - - - /// - /// The function will return the world 3D scale factor calculated at the end of the previous frame. - /// Use go.get_scale to retrieve the 3D scale factor relative to the parent. - /// This vector is derived by decomposing the transformation matrix and should be used with care. - /// For most cases it should be fine to use go.get_world_scale_uniform instead. - /// - /// @CSharpLua.Template = "go.get_world_scale({0})" - /// - public static extern Vector3 get_world_scale(string id_p1); - - - /// - /// The function will return the world 3D scale factor calculated at the end of the previous frame. - /// Use go.get_scale to retrieve the 3D scale factor relative to the parent. - /// This vector is derived by decomposing the transformation matrix and should be used with care. - /// For most cases it should be fine to use go.get_world_scale_uniform instead. - /// - /// @CSharpLua.Template = "go.get_world_scale({0})" - /// - public static extern Vector3 get_world_scale(Hash id_p1); - - - /// - /// The function will return the world 3D scale factor calculated at the end of the previous frame. - /// Use go.get_scale to retrieve the 3D scale factor relative to the parent. - /// This vector is derived by decomposing the transformation matrix and should be used with care. - /// For most cases it should be fine to use go.get_world_scale_uniform instead. - /// - /// @CSharpLua.Template = "go.get_world_scale({0})" - /// - public static extern Vector3 get_world_scale(Url id_p1); - - - /// - /// The function will return the world scale factor calculated at the end of the previous frame. - /// Use go.get_scale_uniform to retrieve the scale factor relative to the parent. - /// - /// @CSharpLua.Template = "go.get_world_scale_uniform()" - /// - public static extern double get_world_scale_uniform(); - - - /// - /// The function will return the world scale factor calculated at the end of the previous frame. - /// Use go.get_scale_uniform to retrieve the scale factor relative to the parent. - /// - /// @CSharpLua.Template = "go.get_world_scale_uniform({0})" - /// - public static extern double get_world_scale_uniform(string id_p1); - - - /// - /// The function will return the world scale factor calculated at the end of the previous frame. - /// Use go.get_scale_uniform to retrieve the scale factor relative to the parent. - /// - /// @CSharpLua.Template = "go.get_world_scale_uniform({0})" - /// - public static extern double get_world_scale_uniform(Hash id_p1); - - - /// - /// The function will return the world scale factor calculated at the end of the previous frame. - /// Use go.get_scale_uniform to retrieve the scale factor relative to the parent. - /// - /// @CSharpLua.Template = "go.get_world_scale_uniform({0})" - /// - public static extern double get_world_scale_uniform(Url id_p1); - - - /// - /// The function will return the world transform matrix calculated at the end of the previous frame. - /// - /// @CSharpLua.Template = "go.get_world_transform()" - /// - public static extern Matrix4 get_world_transform(); - - - /// - /// The function will return the world transform matrix calculated at the end of the previous frame. - /// - /// @CSharpLua.Template = "go.get_world_transform({0})" - /// - public static extern Matrix4 get_world_transform(string id_p1); - - - /// - /// The function will return the world transform matrix calculated at the end of the previous frame. - /// - /// @CSharpLua.Template = "go.get_world_transform({0})" - /// - public static extern Matrix4 get_world_transform(Hash id_p1); - - - /// - /// The function will return the world transform matrix calculated at the end of the previous frame. - /// - /// @CSharpLua.Template = "go.get_world_transform({0})" - /// - public static extern Matrix4 get_world_transform(Url id_p1); - - - /// - /// Returns or constructs an instance identifier. The instance id is a hash - /// of the absolute path to the instance. - ///
    - ///
  • If path is specified, it can either be absolute or relative to the instance of the calling script.
  • - ///
  • If path is not specified, the id of the game object instance the script is attached to will be returned.
  • - ///
- /// - /// @CSharpLua.Template = "go.get_id()" - ///
- public static extern Hash get_id(); - - - /// - /// Returns or constructs an instance identifier. The instance id is a hash - /// of the absolute path to the instance. - ///
    - ///
  • If path is specified, it can either be absolute or relative to the instance of the calling script.
  • - ///
  • If path is not specified, the id of the game object instance the script is attached to will be returned.
  • - ///
- /// - /// @CSharpLua.Template = "go.get_id({0})" - ///
- public static extern Hash get_id(string path_p1); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(string url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(string url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Hash url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Hash url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Url url_p1, string property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, double to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector3 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, Vector4 to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7); - - - /// - /// This is only supported for numerical properties. If the node property is already being - /// animated, that animation will be canceled and replaced by the new one. - /// If a complete_function (lua function) is specified, that function will be called when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. - /// If you call go.animate() from a game object's final() function, - /// any passed complete_function will be ignored and never called upon animation completion. - /// See the properties guide for which properties can be animated and the animation guide for how - /// them. - /// - /// @CSharpLua.Template = "go.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Url url_p1, Hash property_p2, GoPlaybackMode playback_p3, Quaternion to_p4, Easing easing_p5, double duration_p6, double delay_p7, Action complete_function_p8); - - - /// - /// By calling this function, all or specified stored property animations of the game object or component will be canceled. - /// See the properties guide for which properties can be animated and the animation guide for how to animate them. - /// - /// @CSharpLua.Template = "go.cancel_animations({0})" - /// - public static extern void cancel_animations(string url_p1); - - - /// - /// By calling this function, all or specified stored property animations of the game object or component will be canceled. - /// See the properties guide for which properties can be animated and the animation guide for how to animate them. - /// - /// @CSharpLua.Template = "go.cancel_animations({0}, {1})" - /// - public static extern void cancel_animations(string url_p1, string property_p2); - - - /// - /// By calling this function, all or specified stored property animations of the game object or component will be canceled. - /// See the properties guide for which properties can be animated and the animation guide for how to animate them. - /// - /// @CSharpLua.Template = "go.cancel_animations({0}, {1})" - /// - public static extern void cancel_animations(string url_p1, Hash property_p2); - - - /// - /// By calling this function, all or specified stored property animations of the game object or component will be canceled. - /// See the properties guide for which properties can be animated and the animation guide for how to animate them. - /// - /// @CSharpLua.Template = "go.cancel_animations({0})" - /// - public static extern void cancel_animations(Hash url_p1); - - - /// - /// By calling this function, all or specified stored property animations of the game object or component will be canceled. - /// See the properties guide for which properties can be animated and the animation guide for how to animate them. - /// - /// @CSharpLua.Template = "go.cancel_animations({0}, {1})" - /// - public static extern void cancel_animations(Hash url_p1, string property_p2); - - - /// - /// By calling this function, all or specified stored property animations of the game object or component will be canceled. - /// See the properties guide for which properties can be animated and the animation guide for how to animate them. - /// - /// @CSharpLua.Template = "go.cancel_animations({0}, {1})" - /// - public static extern void cancel_animations(Hash url_p1, Hash property_p2); - - - /// - /// By calling this function, all or specified stored property animations of the game object or component will be canceled. - /// See the properties guide for which properties can be animated and the animation guide for how to animate them. - /// - /// @CSharpLua.Template = "go.cancel_animations({0})" - /// - public static extern void cancel_animations(Url url_p1); - - - /// - /// By calling this function, all or specified stored property animations of the game object or component will be canceled. - /// See the properties guide for which properties can be animated and the animation guide for how to animate them. - /// - /// @CSharpLua.Template = "go.cancel_animations({0}, {1})" - /// - public static extern void cancel_animations(Url url_p1, string property_p2); - - - /// - /// By calling this function, all or specified stored property animations of the game object or component will be canceled. - /// See the properties guide for which properties can be animated and the animation guide for how to animate them. - /// - /// @CSharpLua.Template = "go.cancel_animations({0}, {1})" - /// - public static extern void cancel_animations(Url url_p1, Hash property_p2); - - - /// - /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that - /// the game object(s) are scheduled for deletion which will happen at the end of the current - /// frame. Note that game objects scheduled for deletion will be counted against - /// max_instances in "game.project" until they are actually removed. - /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). - /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). - /// - /// @CSharpLua.Template = "go.delete()" - /// - public static extern void delete(); - - - /// - /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that - /// the game object(s) are scheduled for deletion which will happen at the end of the current - /// frame. Note that game objects scheduled for deletion will be counted against - /// max_instances in "game.project" until they are actually removed. - /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). - /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). - /// - /// @CSharpLua.Template = "go.delete({0})" - /// - public static extern void delete(string id_p1); - - - /// - /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that - /// the game object(s) are scheduled for deletion which will happen at the end of the current - /// frame. Note that game objects scheduled for deletion will be counted against - /// max_instances in "game.project" until they are actually removed. - /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). - /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). - /// - /// @CSharpLua.Template = "go.delete({0}, {1})" - /// - public static extern void delete(string id_p1, bool recursive_p2); - - - /// - /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that - /// the game object(s) are scheduled for deletion which will happen at the end of the current - /// frame. Note that game objects scheduled for deletion will be counted against - /// max_instances in "game.project" until they are actually removed. - /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). - /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). - /// - /// @CSharpLua.Template = "go.delete({0})" - /// - public static extern void delete(Hash id_p1); - - - /// - /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that - /// the game object(s) are scheduled for deletion which will happen at the end of the current - /// frame. Note that game objects scheduled for deletion will be counted against - /// max_instances in "game.project" until they are actually removed. - /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). - /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). - /// - /// @CSharpLua.Template = "go.delete({0}, {1})" - /// - public static extern void delete(Hash id_p1, bool recursive_p2); - - - /// - /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that - /// the game object(s) are scheduled for deletion which will happen at the end of the current - /// frame. Note that game objects scheduled for deletion will be counted against - /// max_instances in "game.project" until they are actually removed. - /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). - /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). - /// - /// @CSharpLua.Template = "go.delete({0})" - /// - public static extern void delete(Url id_p1); - - - /// - /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that - /// the game object(s) are scheduled for deletion which will happen at the end of the current - /// frame. Note that game objects scheduled for deletion will be counted against - /// max_instances in "game.project" until they are actually removed. - /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). - /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). - /// - /// @CSharpLua.Template = "go.delete({0}, {1})" - /// - public static extern void delete(Url id_p1, bool recursive_p2); - - - /// - /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that - /// the game object(s) are scheduled for deletion which will happen at the end of the current - /// frame. Note that game objects scheduled for deletion will be counted against - /// max_instances in "game.project" until they are actually removed. - /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). - /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). - /// - /// @CSharpLua.Template = "go.delete({0})" - /// - public static extern void delete(ILuaTable id_p1); - - - /// - /// Delete one or more game objects identified by id. Deletion is asynchronous meaning that - /// the game object(s) are scheduled for deletion which will happen at the end of the current - /// frame. Note that game objects scheduled for deletion will be counted against - /// max_instances in "game.project" until they are actually removed. - /// Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). - /// Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). - /// - /// @CSharpLua.Template = "go.delete({0}, {1})" - /// - public static extern void delete(ILuaTable id_p1, bool recursive_p2); - - - /// - /// This function defines a property which can then be used in the script through the self-reference. - /// The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. - /// Note that you can only use this function outside any callback-functions like init and update. - /// - /// @CSharpLua.Template = "go.property({0}, {1})" - /// - public static extern void property(string name_p1, double value_p2); - - - /// - /// This function defines a property which can then be used in the script through the self-reference. - /// The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. - /// Note that you can only use this function outside any callback-functions like init and update. - /// - /// @CSharpLua.Template = "go.property({0}, {1})" - /// - public static extern void property(string name_p1, Hash value_p2); - - - /// - /// This function defines a property which can then be used in the script through the self-reference. - /// The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. - /// Note that you can only use this function outside any callback-functions like init and update. - /// - /// @CSharpLua.Template = "go.property({0}, {1})" - /// - public static extern void property(string name_p1, Url value_p2); - - - /// - /// This function defines a property which can then be used in the script through the self-reference. - /// The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. - /// Note that you can only use this function outside any callback-functions like init and update. - /// - /// @CSharpLua.Template = "go.property({0}, {1})" - /// - public static extern void property(string name_p1, Vector3 value_p2); - - - /// - /// This function defines a property which can then be used in the script through the self-reference. - /// The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. - /// Note that you can only use this function outside any callback-functions like init and update. - /// - /// @CSharpLua.Template = "go.property({0}, {1})" - /// - public static extern void property(string name_p1, Vector4 value_p2); - - - /// - /// This function defines a property which can then be used in the script through the self-reference. - /// The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. - /// Note that you can only use this function outside any callback-functions like init and update. - /// - /// @CSharpLua.Template = "go.property({0}, {1})" - /// - public static extern void property(string name_p1, Quaternion value_p2); - - - #endregion Defold API -} diff --git a/src/defold/gui.cs b/src/defold/gui.cs deleted file mode 100644 index 5ac73c9..0000000 --- a/src/defold/gui.cs +++ /dev/null @@ -1,1779 +0,0 @@ -using System; -using support; -using types; - -/// -/// GUI API documentation -/// -/// -public static class Gui -{ - #region Defold API - #region Messages - /// - /// - public class layout_changed_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("layout_changed"); - public override Hash FetchCode() => __CODE__; - - public Hash id; - public Hash previous_id; - } - - - #endregion Messages - - - /// - /// Retrieves the node with the specified id. - /// - /// @CSharpLua.Template = "gui.get_node({0})" - /// - public static extern Node get_node(string id_p1); - - - /// - /// Retrieves the node with the specified id. - /// - /// @CSharpLua.Template = "gui.get_node({0})" - /// - public static extern Node get_node(Hash id_p1); - - - /// - /// Retrieves the id of the specified node. - /// - /// @CSharpLua.Template = "gui.get_id({0})" - /// - public static extern Hash get_id(Node node_p1); - - - /// - /// Set the id of the specicied node to a new value. - /// Nodes created with the gui.new_*_node() functions get - /// an empty id. This function allows you to give dynamically - /// created nodes an id. - /// No checking is done on the uniqueness of supplied ids. - /// It is up to you to make sure you use unique ids. - /// - /// @CSharpLua.Template = "gui.set_id({0}, {1})" - /// - public static extern void set_id(Node node_p1, string id_p2); - - - /// - /// Set the id of the specicied node to a new value. - /// Nodes created with the gui.new_*_node() functions get - /// an empty id. This function allows you to give dynamically - /// created nodes an id. - /// No checking is done on the uniqueness of supplied ids. - /// It is up to you to make sure you use unique ids. - /// - /// @CSharpLua.Template = "gui.set_id({0}, {1})" - /// - public static extern void set_id(Node node_p1, Hash id_p2); - - - /// - /// Retrieve the index of the specified node among its siblings. - /// The index defines the order in which a node appear in a GUI scene. - /// Higher index means the node is drawn on top of lower indexed nodes. - /// - /// @CSharpLua.Template = "gui.get_index({0})" - /// - public static extern double get_index(Node node_p1); - - - /// - /// Deletes the specified node. Any child nodes of the specified node will be - /// recursively deleted. - /// - /// @CSharpLua.Template = "gui.delete_node({0})" - /// - public static extern void delete_node(Node node_p1); - - - /// - /// This starts an animation of a node property according to the specified parameters. - /// If the node property is already being animated, that animation will be canceled and - /// replaced by the new one. Note however that several different node properties - /// can be animated simultaneously. Use gui.cancel_animation to stop the animation - /// before it has completed. - /// Composite properties of type vector3, vector4 or quaternion - /// also expose their sub-components (x, y, z and w). - /// You can address the components individually by suffixing the name with a dot '.' - /// and the name of the component. - /// For instance, "position.x" (the position x coordinate) or "color.w" - /// (the color alpha value). - /// If a complete_function (Lua function) is specified, that function will be called - /// when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced - /// together. See the examples below for more information. - /// - /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4})" - /// - public static extern void animate(Node node_p1, string property_p2, double to_p3, Easing easing_p4, double duration_p5); - - - /// - /// This starts an animation of a node property according to the specified parameters. - /// If the node property is already being animated, that animation will be canceled and - /// replaced by the new one. Note however that several different node properties - /// can be animated simultaneously. Use gui.cancel_animation to stop the animation - /// before it has completed. - /// Composite properties of type vector3, vector4 or quaternion - /// also expose their sub-components (x, y, z and w). - /// You can address the components individually by suffixing the name with a dot '.' - /// and the name of the component. - /// For instance, "position.x" (the position x coordinate) or "color.w" - /// (the color alpha value). - /// If a complete_function (Lua function) is specified, that function will be called - /// when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced - /// together. See the examples below for more information. - /// - /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Node node_p1, string property_p2, double to_p3, Easing easing_p4, double duration_p5, double delay_p6); - - - /// - /// This starts an animation of a node property according to the specified parameters. - /// If the node property is already being animated, that animation will be canceled and - /// replaced by the new one. Note however that several different node properties - /// can be animated simultaneously. Use gui.cancel_animation to stop the animation - /// before it has completed. - /// Composite properties of type vector3, vector4 or quaternion - /// also expose their sub-components (x, y, z and w). - /// You can address the components individually by suffixing the name with a dot '.' - /// and the name of the component. - /// For instance, "position.x" (the position x coordinate) or "color.w" - /// (the color alpha value). - /// If a complete_function (Lua function) is specified, that function will be called - /// when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced - /// together. See the examples below for more information. - /// - /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Node node_p1, string property_p2, double to_p3, Easing easing_p4, double duration_p5, double delay_p6, Action complete_function_p7); - - - /// - /// This starts an animation of a node property according to the specified parameters. - /// If the node property is already being animated, that animation will be canceled and - /// replaced by the new one. Note however that several different node properties - /// can be animated simultaneously. Use gui.cancel_animation to stop the animation - /// before it has completed. - /// Composite properties of type vector3, vector4 or quaternion - /// also expose their sub-components (x, y, z and w). - /// You can address the components individually by suffixing the name with a dot '.' - /// and the name of the component. - /// For instance, "position.x" (the position x coordinate) or "color.w" - /// (the color alpha value). - /// If a complete_function (Lua function) is specified, that function will be called - /// when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced - /// together. See the examples below for more information. - /// - /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Node node_p1, string property_p2, double to_p3, Easing easing_p4, double duration_p5, double delay_p6, Action complete_function_p7, GuiPlaybackMode playback_p8); - - - /// - /// This starts an animation of a node property according to the specified parameters. - /// If the node property is already being animated, that animation will be canceled and - /// replaced by the new one. Note however that several different node properties - /// can be animated simultaneously. Use gui.cancel_animation to stop the animation - /// before it has completed. - /// Composite properties of type vector3, vector4 or quaternion - /// also expose their sub-components (x, y, z and w). - /// You can address the components individually by suffixing the name with a dot '.' - /// and the name of the component. - /// For instance, "position.x" (the position x coordinate) or "color.w" - /// (the color alpha value). - /// If a complete_function (Lua function) is specified, that function will be called - /// when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced - /// together. See the examples below for more information. - /// - /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4})" - /// - public static extern void animate(Node node_p1, string property_p2, Vector3 to_p3, Easing easing_p4, double duration_p5); - - - /// - /// This starts an animation of a node property according to the specified parameters. - /// If the node property is already being animated, that animation will be canceled and - /// replaced by the new one. Note however that several different node properties - /// can be animated simultaneously. Use gui.cancel_animation to stop the animation - /// before it has completed. - /// Composite properties of type vector3, vector4 or quaternion - /// also expose their sub-components (x, y, z and w). - /// You can address the components individually by suffixing the name with a dot '.' - /// and the name of the component. - /// For instance, "position.x" (the position x coordinate) or "color.w" - /// (the color alpha value). - /// If a complete_function (Lua function) is specified, that function will be called - /// when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced - /// together. See the examples below for more information. - /// - /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Node node_p1, string property_p2, Vector3 to_p3, Easing easing_p4, double duration_p5, double delay_p6); - - - /// - /// This starts an animation of a node property according to the specified parameters. - /// If the node property is already being animated, that animation will be canceled and - /// replaced by the new one. Note however that several different node properties - /// can be animated simultaneously. Use gui.cancel_animation to stop the animation - /// before it has completed. - /// Composite properties of type vector3, vector4 or quaternion - /// also expose their sub-components (x, y, z and w). - /// You can address the components individually by suffixing the name with a dot '.' - /// and the name of the component. - /// For instance, "position.x" (the position x coordinate) or "color.w" - /// (the color alpha value). - /// If a complete_function (Lua function) is specified, that function will be called - /// when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced - /// together. See the examples below for more information. - /// - /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Node node_p1, string property_p2, Vector3 to_p3, Easing easing_p4, double duration_p5, double delay_p6, Action complete_function_p7); - - - /// - /// This starts an animation of a node property according to the specified parameters. - /// If the node property is already being animated, that animation will be canceled and - /// replaced by the new one. Note however that several different node properties - /// can be animated simultaneously. Use gui.cancel_animation to stop the animation - /// before it has completed. - /// Composite properties of type vector3, vector4 or quaternion - /// also expose their sub-components (x, y, z and w). - /// You can address the components individually by suffixing the name with a dot '.' - /// and the name of the component. - /// For instance, "position.x" (the position x coordinate) or "color.w" - /// (the color alpha value). - /// If a complete_function (Lua function) is specified, that function will be called - /// when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced - /// together. See the examples below for more information. - /// - /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Node node_p1, string property_p2, Vector3 to_p3, Easing easing_p4, double duration_p5, double delay_p6, Action complete_function_p7, GuiPlaybackMode playback_p8); - - - /// - /// This starts an animation of a node property according to the specified parameters. - /// If the node property is already being animated, that animation will be canceled and - /// replaced by the new one. Note however that several different node properties - /// can be animated simultaneously. Use gui.cancel_animation to stop the animation - /// before it has completed. - /// Composite properties of type vector3, vector4 or quaternion - /// also expose their sub-components (x, y, z and w). - /// You can address the components individually by suffixing the name with a dot '.' - /// and the name of the component. - /// For instance, "position.x" (the position x coordinate) or "color.w" - /// (the color alpha value). - /// If a complete_function (Lua function) is specified, that function will be called - /// when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced - /// together. See the examples below for more information. - /// - /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4})" - /// - public static extern void animate(Node node_p1, string property_p2, Vector4 to_p3, Easing easing_p4, double duration_p5); - - - /// - /// This starts an animation of a node property according to the specified parameters. - /// If the node property is already being animated, that animation will be canceled and - /// replaced by the new one. Note however that several different node properties - /// can be animated simultaneously. Use gui.cancel_animation to stop the animation - /// before it has completed. - /// Composite properties of type vector3, vector4 or quaternion - /// also expose their sub-components (x, y, z and w). - /// You can address the components individually by suffixing the name with a dot '.' - /// and the name of the component. - /// For instance, "position.x" (the position x coordinate) or "color.w" - /// (the color alpha value). - /// If a complete_function (Lua function) is specified, that function will be called - /// when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced - /// together. See the examples below for more information. - /// - /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void animate(Node node_p1, string property_p2, Vector4 to_p3, Easing easing_p4, double duration_p5, double delay_p6); - - - /// - /// This starts an animation of a node property according to the specified parameters. - /// If the node property is already being animated, that animation will be canceled and - /// replaced by the new one. Note however that several different node properties - /// can be animated simultaneously. Use gui.cancel_animation to stop the animation - /// before it has completed. - /// Composite properties of type vector3, vector4 or quaternion - /// also expose their sub-components (x, y, z and w). - /// You can address the components individually by suffixing the name with a dot '.' - /// and the name of the component. - /// For instance, "position.x" (the position x coordinate) or "color.w" - /// (the color alpha value). - /// If a complete_function (Lua function) is specified, that function will be called - /// when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced - /// together. See the examples below for more information. - /// - /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void animate(Node node_p1, string property_p2, Vector4 to_p3, Easing easing_p4, double duration_p5, double delay_p6, Action complete_function_p7); - - - /// - /// This starts an animation of a node property according to the specified parameters. - /// If the node property is already being animated, that animation will be canceled and - /// replaced by the new one. Note however that several different node properties - /// can be animated simultaneously. Use gui.cancel_animation to stop the animation - /// before it has completed. - /// Composite properties of type vector3, vector4 or quaternion - /// also expose their sub-components (x, y, z and w). - /// You can address the components individually by suffixing the name with a dot '.' - /// and the name of the component. - /// For instance, "position.x" (the position x coordinate) or "color.w" - /// (the color alpha value). - /// If a complete_function (Lua function) is specified, that function will be called - /// when the animation has completed. - /// By starting a new animation in that function, several animations can be sequenced - /// together. See the examples below for more information. - /// - /// @CSharpLua.Template = "gui.animate({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})" - /// - public static extern void animate(Node node_p1, string property_p2, Vector4 to_p3, Easing easing_p4, double duration_p5, double delay_p6, Action complete_function_p7, GuiPlaybackMode playback_p8); - - - /// - /// If an animation of the specified node is currently running (started by gui.animate), it will immediately be canceled. - /// - /// @CSharpLua.Template = "gui.cancel_animation({0}, {1})" - /// - public static extern void cancel_animation(Node node_p1, string property_p2); - - - /// - /// Dynamically create a new box node. - /// - /// @CSharpLua.Template = "gui.new_box_node({0}, {1})" - /// - public static extern Node new_box_node(Vector3 pos_p1, Vector3 size_p2); - - - /// - /// Dynamically create a new box node. - /// - /// @CSharpLua.Template = "gui.new_box_node({0}, {1})" - /// - public static extern Node new_box_node(Vector4 pos_p1, Vector3 size_p2); - - - /// - /// Dynamically create a new text node. - /// - /// @CSharpLua.Template = "gui.new_text_node({0}, {1})" - /// - public static extern Node new_text_node(Vector3 pos_p1, string text_p2); - - - /// - /// Dynamically create a new text node. - /// - /// @CSharpLua.Template = "gui.new_text_node({0}, {1})" - /// - public static extern Node new_text_node(Vector4 pos_p1, string text_p2); - - - /// - /// Dynamically create a new pie node. - /// - /// @CSharpLua.Template = "gui.new_pie_node({0}, {1})" - /// - public static extern Node new_pie_node(Vector3 pos_p1, Vector3 size_p2); - - - /// - /// Dynamically create a new pie node. - /// - /// @CSharpLua.Template = "gui.new_pie_node({0}, {1})" - /// - public static extern Node new_pie_node(Vector4 pos_p1, Vector3 size_p2); - - - /// - /// Returns the text value of a text node. This is only useful for text nodes. - /// - /// @CSharpLua.Template = "gui.get_text({0})" - /// - public static extern string get_text(Node node_p1); - - - /// - /// Set the text value of a text node. This is only useful for text nodes. - /// - /// @CSharpLua.Template = "gui.set_text({0}, {1})" - /// - public static extern void set_text(Node node_p1, string text_p2); - - - /// - /// Returns whether a text node is in line-break mode or not. - /// This is only useful for text nodes. - /// - /// @CSharpLua.Template = "gui.get_line_break({0})" - /// - public static extern bool get_line_break(Node node_p1); - - - /// - /// Sets the line-break mode on a text node. - /// This is only useful for text nodes. - /// - /// @CSharpLua.Template = "gui.set_line_break({0}, {1})" - /// - public static extern void set_line_break(Node node_p1, bool line_break_p2); - - - /// - /// Returns the blend mode of a node. - /// Blend mode defines how the node will be blended with the background. - /// - /// @CSharpLua.Template = "gui.get_blend_mode()" - /// - public static extern BlendMode get_blend_mode(); - - - /// - /// Set the blend mode of a node. - /// Blend mode defines how the node will be blended with the background. - /// - /// @CSharpLua.Template = "gui.set_blend_mode({0}, {1})" - /// - public static extern void set_blend_mode(Node node_p1, BlendMode blend_mode_p2); - - - /// - /// Returns the texture of a node. - /// This is currently only useful for box or pie nodes. - /// The texture must be mapped to the gui scene in the gui editor. - /// - /// @CSharpLua.Template = "gui.get_texture({0})" - /// - public static extern Hash get_texture(Node node_p1); - - - /// - /// Set the texture on a box or pie node. The texture must be mapped to - /// the gui scene in the gui editor. The function points out which texture - /// the node should render from. If the texture is an atlas, further - /// information is needed to select which image/animation in the atlas - /// to render. In such cases, use gui.play_flipbook() in - /// addition to this function. - /// - /// @CSharpLua.Template = "gui.set_texture({0}, {1})" - /// - public static extern void set_texture(Node node_p1, string texture_p2); - - - /// - /// Set the texture on a box or pie node. The texture must be mapped to - /// the gui scene in the gui editor. The function points out which texture - /// the node should render from. If the texture is an atlas, further - /// information is needed to select which image/animation in the atlas - /// to render. In such cases, use gui.play_flipbook() in - /// addition to this function. - /// - /// @CSharpLua.Template = "gui.set_texture({0}, {1})" - /// - public static extern void set_texture(Node node_p1, Hash texture_p2); - - - /// - /// Get node flipbook animation. - /// - /// @CSharpLua.Template = "gui.get_flipbook({0})" - /// - public static extern Hash get_flipbook(Node node_p1); - - - /// - /// Play flipbook animation on a box or pie node. - /// The current node texture must contain the animation. - /// Use this function to set one-frame still images on the node. - /// - /// @CSharpLua.Template = "gui.play_flipbook({0}, {1})" - /// - public static extern void play_flipbook(Node node_p1, string animation_p2); - - - /// - /// Play flipbook animation on a box or pie node. - /// The current node texture must contain the animation. - /// Use this function to set one-frame still images on the node. - /// - /// @CSharpLua.Template = "gui.play_flipbook({0}, {1}, {2})" - /// - public static extern void play_flipbook(Node node_p1, string animation_p2, Action complete_function_p3); - - - /// - /// Play flipbook animation on a box or pie node. - /// The current node texture must contain the animation. - /// Use this function to set one-frame still images on the node. - /// - /// @CSharpLua.Template = "gui.play_flipbook({0}, {1}, {2}, {3})" - /// - public static extern void play_flipbook(Node node_p1, string animation_p2, Action complete_function_p3, ILuaTable play_properties_p4); - - - /// - /// Play flipbook animation on a box or pie node. - /// The current node texture must contain the animation. - /// Use this function to set one-frame still images on the node. - /// - /// @CSharpLua.Template = "gui.play_flipbook({0}, {1})" - /// - public static extern void play_flipbook(Node node_p1, Hash animation_p2); - - - /// - /// Play flipbook animation on a box or pie node. - /// The current node texture must contain the animation. - /// Use this function to set one-frame still images on the node. - /// - /// @CSharpLua.Template = "gui.play_flipbook({0}, {1}, {2})" - /// - public static extern void play_flipbook(Node node_p1, Hash animation_p2, Action complete_function_p3); - - - /// - /// Play flipbook animation on a box or pie node. - /// The current node texture must contain the animation. - /// Use this function to set one-frame still images on the node. - /// - /// @CSharpLua.Template = "gui.play_flipbook({0}, {1}, {2}, {3})" - /// - public static extern void play_flipbook(Node node_p1, Hash animation_p2, Action complete_function_p3, ILuaTable play_properties_p4); - - - /// - /// Cancels any running flipbook animation on the specified node. - /// - /// @CSharpLua.Template = "gui.cancel_flipbook({0})" - /// - public static extern void cancel_flipbook(Node node_p1); - - - /// - /// Dynamically create a new texture. - /// - /// @CSharpLua.Template = "gui.new_texture({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern bool new_texture(string texture_p1, double width_p2, double height_p3, GuiTextureType type_p4, string buffer_p5, bool flip_p6, out double code_o1); - - - /// - /// Dynamically create a new texture. - /// - /// @CSharpLua.Template = "gui.new_texture({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern bool new_texture(Hash texture_p1, double width_p2, double height_p3, GuiTextureType type_p4, string buffer_p5, bool flip_p6, out double code_o1); - - - /// - /// Delete a dynamically created texture. - /// - /// @CSharpLua.Template = "gui.delete_texture({0})" - /// - public static extern void delete_texture(string texture_p1); - - - /// - /// Delete a dynamically created texture. - /// - /// @CSharpLua.Template = "gui.delete_texture({0})" - /// - public static extern void delete_texture(Hash texture_p1); - - - /// - /// Set the texture buffer data for a dynamically created texture. - /// - /// @CSharpLua.Template = "gui.set_texture_data({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern bool set_texture_data(string texture_p1, double width_p2, double height_p3, GuiTextureType type_p4, string buffer_p5, bool flip_p6); - - - /// - /// Set the texture buffer data for a dynamically created texture. - /// - /// @CSharpLua.Template = "gui.set_texture_data({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern bool set_texture_data(Hash texture_p1, double width_p2, double height_p3, GuiTextureType type_p4, string buffer_p5, bool flip_p6); - - - /// - /// This is only useful for text nodes. The font must be mapped to the gui scene in the gui editor. - /// - /// @CSharpLua.Template = "gui.get_font({0})" - /// - public static extern Hash get_font(Node node_p1); - - - /// - /// This is only useful for text nodes. The font must be mapped to the gui scene in the gui editor. - /// - /// @CSharpLua.Template = "gui.get_font_resource({0})" - /// - public static extern Hash get_font_resource(Hash font_name_p1); - - - /// - /// This is only useful for text nodes. The font must be mapped to the gui scene in the gui editor. - /// - /// @CSharpLua.Template = "gui.get_font_resource({0})" - /// - public static extern Hash get_font_resource(string font_name_p1); - - - /// - /// This is only useful for text nodes. - /// The font must be mapped to the gui scene in the gui editor. - /// - /// @CSharpLua.Template = "gui.set_font({0}, {1})" - /// - public static extern void set_font(Node node_p1, string font_p2); - - - /// - /// This is only useful for text nodes. - /// The font must be mapped to the gui scene in the gui editor. - /// - /// @CSharpLua.Template = "gui.set_font({0}, {1})" - /// - public static extern void set_font(Node node_p1, Hash font_p2); - - - /// - /// The layer must be mapped to the gui scene in the gui editor. - /// - /// @CSharpLua.Template = "gui.get_layer({0})" - /// - public static extern Hash get_layer(Node node_p1); - - - /// - /// The layer must be mapped to the gui scene in the gui editor. - /// - /// @CSharpLua.Template = "gui.set_layer({0}, {1})" - /// - public static extern void set_layer(Node node_p1, string layer_p2); - - - /// - /// The layer must be mapped to the gui scene in the gui editor. - /// - /// @CSharpLua.Template = "gui.set_layer({0}, {1})" - /// - public static extern void set_layer(Node node_p1, Hash layer_p2); - - - /// - /// gets the scene current layout - /// - /// @CSharpLua.Template = "gui.get_layout()" - /// - public static extern Hash get_layout(); - - - /// - /// Clipping mode defines how the node will clip it's children nodes - /// - /// @CSharpLua.Template = "gui.get_clipping_mode()" - /// - public static extern ClippingMode get_clipping_mode(); - - - /// - /// Clipping mode defines how the node will clip it's children nodes - /// - /// @CSharpLua.Template = "gui.set_clipping_mode({0}, {1})" - /// - public static extern void set_clipping_mode(Node node_p1, ClippingMode clipping_mode_p2); - - - /// - /// If node is set as visible clipping node, it will be shown as well as clipping. Otherwise, it will only clip but not show visually. - /// - /// @CSharpLua.Template = "gui.get_clipping_visible({0})" - /// - public static extern bool get_clipping_visible(Node node_p1); - - - /// - /// If node is set as an visible clipping node, it will be shown as well as clipping. Otherwise, it will only clip but not show visually. - /// - /// @CSharpLua.Template = "gui.set_clipping_visible({0}, {1})" - /// - public static extern void set_clipping_visible(Node node_p1, bool visible_p2); - - - /// - /// If node is set as an inverted clipping node, it will clip anything inside as opposed to outside. - /// - /// @CSharpLua.Template = "gui.get_clipping_inverted({0})" - /// - public static extern bool get_clipping_inverted(Node node_p1); - - - /// - /// If node is set as an inverted clipping node, it will clip anything inside as opposed to outside. - /// - /// @CSharpLua.Template = "gui.set_clipping_inverted({0}, {1})" - /// - public static extern void set_clipping_inverted(Node node_p1, bool inverted_p2); - - - /// - /// The x-anchor specifies how the node is moved when the game is run in a different resolution. - /// - /// @CSharpLua.Template = "gui.get_xanchor()" - /// - public static extern GuiAnchor get_xanchor(); - - - /// - /// The x-anchor specifies how the node is moved when the game is run in a different resolution. - /// - /// @CSharpLua.Template = "gui.set_xanchor({0}, {1})" - /// - public static extern void set_xanchor(Node node_p1, GuiAnchor anchor_p2); - - - /// - /// The y-anchor specifies how the node is moved when the game is run in a different resolution. - /// - /// @CSharpLua.Template = "gui.get_yanchor()" - /// - public static extern GuiAnchor get_yanchor(); - - - /// - /// The y-anchor specifies how the node is moved when the game is run in a different resolution. - /// - /// @CSharpLua.Template = "gui.set_yanchor({0}, {1})" - /// - public static extern void set_yanchor(Node node_p1, GuiAnchor anchor_p2); - - - /// - /// The pivot specifies how the node is drawn and rotated from its position. - /// - /// @CSharpLua.Template = "gui.get_pivot()" - /// - public static extern Node get_pivot(out GuiPivot pivot_o1); - - - /// - /// The pivot specifies how the node is drawn and rotated from its position. - /// - /// @CSharpLua.Template = "gui.set_pivot({0}, {1})" - /// - public static extern void set_pivot(Node node_p1, GuiPivot pivot_p2); - - - /// - /// Returns the scene width. - /// - /// @CSharpLua.Template = "gui.get_width()" - /// - public static extern double get_width(); - - - /// - /// Returns the scene height. - /// - /// @CSharpLua.Template = "gui.get_height()" - /// - public static extern double get_height(); - - - /// - /// Set the slice9 configuration values for the node. - /// - /// @CSharpLua.Template = "gui.set_slice9({0}, {1})" - /// - public static extern void set_slice9(Node node_p1, Vector4 values_p2); - - - /// - /// Returns the slice9 configuration values for the node. - /// - /// @CSharpLua.Template = "gui.get_slice9({0})" - /// - public static extern Vector4 get_slice9(Node node_p1); - - - /// - /// Sets the number of generated vertices around the perimeter of a pie node. - /// - /// @CSharpLua.Template = "gui.set_perimeter_vertices({0}, {1})" - /// - public static extern void set_perimeter_vertices(Node node_p1, double vertices_p2); - - - /// - /// Returns the number of generated vertices around the perimeter - /// of a pie node. - /// - /// @CSharpLua.Template = "gui.get_perimeter_vertices({0})" - /// - public static extern double get_perimeter_vertices(Node node_p1); - - - /// - /// Set the sector angle of a pie node. - /// - /// @CSharpLua.Template = "gui.set_fill_angle({0}, {1})" - /// - public static extern void set_fill_angle(Node node_p1, double angle_p2); - - - /// - /// Returns the sector angle of a pie node. - /// - /// @CSharpLua.Template = "gui.get_fill_angle({0})" - /// - public static extern double get_fill_angle(Node node_p1); - - - /// - /// Sets the inner radius of a pie node. - /// The radius is defined along the x-axis. - /// - /// @CSharpLua.Template = "gui.set_inner_radius({0}, {1})" - /// - public static extern void set_inner_radius(Node node_p1, double radius_p2); - - - /// - /// Returns the inner radius of a pie node. - /// The radius is defined along the x-axis. - /// - /// @CSharpLua.Template = "gui.get_inner_radius({0})" - /// - public static extern double get_inner_radius(Node node_p1); - - - /// - /// Sets the outer bounds mode for a pie node. - /// - /// @CSharpLua.Template = "gui.set_outer_bounds({0}, {1})" - /// - public static extern void set_outer_bounds(Node node_p1, PieBounds bounds_mode_p2); - - - /// - /// Returns the outer bounds mode for a pie node. - /// - /// @CSharpLua.Template = "gui.get_outer_bounds({0})" - /// - public static extern PieBounds get_outer_bounds(Node node_p1); - - - /// - /// Sets the leading value for a text node. This value is used to - /// scale the line spacing of text. - /// - /// @CSharpLua.Template = "gui.set_leading({0}, {1})" - /// - public static extern void set_leading(Node node_p1, double leading_p2); - - - /// - /// Returns the leading value for a text node. - /// - /// @CSharpLua.Template = "gui.get_leading({0})" - /// - public static extern double get_leading(Node node_p1); - - - /// - /// Sets the tracking value of a text node. This value is used to - /// adjust the vertical spacing of characters in the text. - /// - /// @CSharpLua.Template = "gui.set_tracking({0}, {1})" - /// - public static extern void set_tracking(Node node_p1, double tracking_p2); - - - /// - /// Returns the tracking value of a text node. - /// - /// @CSharpLua.Template = "gui.get_tracking({0})" - /// - public static extern double get_tracking(Node node_p1); - - - /// - /// Tests whether a coordinate is within the bounding box of a - /// node. - /// - /// @CSharpLua.Template = "gui.pick_node({0}, {1}, {2})" - /// - public static extern bool pick_node(Node node_p1, double x_p2, double y_p3); - - - /// - /// Returns true if a node is enabled and false if it's not. - /// Disabled nodes are not rendered and animations acting on them are not evaluated. - /// - /// @CSharpLua.Template = "gui.is_enabled({0}, {1})" - /// - public static extern bool is_enabled(Node node_p1, bool recursive_p2); - - - /// - /// Sets a node to the disabled or enabled state. - /// Disabled nodes are not rendered and animations acting on them are not evaluated. - /// - /// @CSharpLua.Template = "gui.set_enabled({0}, {1})" - /// - public static extern void set_enabled(Node node_p1, bool enabled_p2); - - - /// - /// Returns true if a node is visible and false if it's not. - /// Invisible nodes are not rendered. - /// - /// @CSharpLua.Template = "gui.get_visible({0})" - /// - public static extern bool get_visible(Node node_p1); - - - /// - /// Set if a node should be visible or not. Only visible nodes are rendered. - /// - /// @CSharpLua.Template = "gui.set_visible({0}, {1})" - /// - public static extern void set_visible(Node node_p1, bool visible_p2); - - - /// - /// Returns the adjust mode of a node. - /// The adjust mode defines how the node will adjust itself to screen - /// resolutions that differs from the one in the project settings. - /// - /// @CSharpLua.Template = "gui.get_adjust_mode({0})" - /// - public static extern AdjustMode get_adjust_mode(Node node_p1); - - - /// - /// Sets the adjust mode on a node. - /// The adjust mode defines how the node will adjust itself to screen - /// resolutions that differs from the one in the project settings. - /// - /// @CSharpLua.Template = "gui.set_adjust_mode({0}, {1})" - /// - public static extern void set_adjust_mode(Node node_p1, AdjustMode adjust_mode_p2); - - - /// - /// Returns the size of a node. - /// The size mode defines how the node will adjust itself in size. Automatic - /// size mode alters the node size based on the node's content. Automatic size - /// mode works for Box nodes and Pie nodes which will both adjust their size - /// to match the assigned image. Particle fx and Text nodes will ignore - /// any size mode setting. - /// - /// @CSharpLua.Template = "gui.get_size_mode({0})" - /// - public static extern SizeMode get_size_mode(Node node_p1); - - - /// - /// Sets the size mode of a node. - /// The size mode defines how the node will adjust itself in size. Automatic - /// size mode alters the node size based on the node's content. Automatic size - /// mode works for Box nodes and Pie nodes which will both adjust their size - /// to match the assigned image. Particle fx and Text nodes will ignore - /// any size mode setting. - /// - /// @CSharpLua.Template = "gui.set_size_mode({0}, {1})" - /// - public static extern void set_size_mode(Node node_p1, SizeMode size_mode_p2); - - - /// - /// Alters the ordering of the two supplied nodes by moving the first node - /// above the second. - /// If the second argument is nil the first node is moved to the top. - /// - /// @CSharpLua.Template = "gui.move_above({0}, {1})" - /// - public static extern void move_above(Node node_p1, Node node_p2); - - - /// - /// Alters the ordering of the two supplied nodes by moving the first node - /// above the second. - /// If the second argument is nil the first node is moved to the top. - /// - /// @CSharpLua.Template = "gui.move_above({0})" - /// - public static extern void move_above(Node node_p1); - - - /// - /// Alters the ordering of the two supplied nodes by moving the first node - /// below the second. - /// If the second argument is nil the first node is moved to the bottom. - /// - /// @CSharpLua.Template = "gui.move_below({0}, {1})" - /// - public static extern void move_below(Node node_p1, Node node_p2); - - - /// - /// Alters the ordering of the two supplied nodes by moving the first node - /// below the second. - /// If the second argument is nil the first node is moved to the bottom. - /// - /// @CSharpLua.Template = "gui.move_below({0})" - /// - public static extern void move_below(Node node_p1); - - - /// - /// Returns the parent node of the specified node. - /// If the supplied node does not have a parent, nil is returned. - /// - /// @CSharpLua.Template = "gui.get_parent({0})" - /// - public static extern Node get_parent(Node node_p1); - - - /// - /// Sets the parent node of the specified node. - /// - /// @CSharpLua.Template = "gui.set_parent({0}, {1}, {2})" - /// - public static extern void set_parent(Node node_p1, Node parent_p2, bool keep_scene_transform_p3); - - - /// - /// Make a clone instance of a node. - /// This function does not clone the supplied node's children nodes. - /// Use gui.clone_tree for that purpose. - /// - /// @CSharpLua.Template = "gui.clone({0})" - /// - public static extern Node clone(Node node_p1); - - - /// - /// Make a clone instance of a node and all its children. - /// Use gui.clone to clone a node excluding its children. - /// - /// @CSharpLua.Template = "gui.clone_tree({0})" - /// - public static extern ILuaTable clone_tree(Node node_p1); - - - /// - /// Resets all nodes in the current GUI scene to their initial state. - /// The reset only applies to static node loaded from the scene. - /// Nodes that are created dynamically from script are not affected. - /// - /// @CSharpLua.Template = "gui.reset_nodes()" - /// - public static extern void reset_nodes(); - - - /// - /// Set the order number for the current GUI scene. - /// The number dictates the sorting of the "gui" render predicate, - /// in other words in which order the scene will be rendered in relation - /// to other currently rendered GUI scenes. - /// The number must be in the range 0 to 15. - /// - /// @CSharpLua.Template = "gui.set_render_order({0})" - /// - public static extern void set_render_order(double order_p1); - - - /// - /// Shows the on-display touch keyboard. - /// The specified type of keyboard is displayed if it is available on - /// the device. - /// This function is only available on iOS and Android. . - /// - /// @CSharpLua.Template = "gui.show_keyboard({0}, {1})" - /// - public static extern void show_keyboard(KeyboardType type_p1, bool autoclose_p2); - - - /// - /// Hides the on-display touch keyboard on the device. - /// - /// @CSharpLua.Template = "gui.hide_keyboard()" - /// - public static extern void hide_keyboard(); - - - /// - /// Resets the input context of keyboard. This will clear marked text. - /// - /// @CSharpLua.Template = "gui.reset_keyboard()" - /// - public static extern void reset_keyboard(); - - - /// - /// Returns the position of the supplied node. - /// - /// @CSharpLua.Template = "gui.get_position({0})" - /// - public static extern Vector3 get_position(Node node_p1); - - - /// - /// Sets the position of the supplied node. - /// - /// @CSharpLua.Template = "gui.set_position({0}, {1})" - /// - public static extern void set_position(Node node_p1, Vector3 position_p2); - - - /// - /// Sets the position of the supplied node. - /// - /// @CSharpLua.Template = "gui.set_position({0}, {1})" - /// - public static extern void set_position(Node node_p1, Vector4 position_p2); - - - /// - /// Returns the rotation of the supplied node. - /// The rotation is expressed in degree Euler angles. - /// - /// @CSharpLua.Template = "gui.get_rotation({0})" - /// - public static extern Vector3 get_rotation(Node node_p1); - - - /// - /// Sets the rotation of the supplied node. - /// The rotation is expressed in degree Euler angles. - /// - /// @CSharpLua.Template = "gui.set_rotation({0}, {1})" - /// - public static extern void set_rotation(Node node_p1, Vector3 rotation_p2); - - - /// - /// Sets the rotation of the supplied node. - /// The rotation is expressed in degree Euler angles. - /// - /// @CSharpLua.Template = "gui.set_rotation({0}, {1})" - /// - public static extern void set_rotation(Node node_p1, Vector4 rotation_p2); - - - /// - /// Returns the scale of the supplied node. - /// - /// @CSharpLua.Template = "gui.get_scale({0})" - /// - public static extern Vector3 get_scale(Node node_p1); - - - /// - /// Sets the scaling of the supplied node. - /// - /// @CSharpLua.Template = "gui.set_scale({0}, {1})" - /// - public static extern void set_scale(Node node_p1, Vector3 scale_p2); - - - /// - /// Sets the scaling of the supplied node. - /// - /// @CSharpLua.Template = "gui.set_scale({0}, {1})" - /// - public static extern void set_scale(Node node_p1, Vector4 scale_p2); - - - /// - /// Returns the color of the supplied node. The components - /// of the returned vector4 contains the color channel values: - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
ComponentColor value
xRed value
yGreen value
zBlue value
wAlpha value
- /// - /// @CSharpLua.Template = "gui.get_color({0})" - ///
- public static extern Vector4 get_color(Node node_p1); - - - /// - /// Sets the color of the supplied node. The components - /// of the supplied vector3 or vector4 should contain the color channel values: - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
ComponentColor value
xRed value
yGreen value
zBlue value
w vector4Alpha value
- /// - /// @CSharpLua.Template = "gui.set_color({0}, {1})" - ///
- public static extern void set_color(Node node_p1, Vector3 color_p2); - - - /// - /// Sets the color of the supplied node. The components - /// of the supplied vector3 or vector4 should contain the color channel values: - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
ComponentColor value
xRed value
yGreen value
zBlue value
w vector4Alpha value
- /// - /// @CSharpLua.Template = "gui.set_color({0}, {1})" - ///
- public static extern void set_color(Node node_p1, Vector4 color_p2); - - - /// - /// Returns the outline color of the supplied node. - /// See gui.get_color for info how vectors encode color values. - /// - /// @CSharpLua.Template = "gui.get_outline({0})" - /// - public static extern Vector4 get_outline(Node node_p1); - - - /// - /// Sets the outline color of the supplied node. - /// See gui.set_color for info how vectors encode color values. - /// - /// @CSharpLua.Template = "gui.set_outline({0}, {1})" - /// - public static extern void set_outline(Node node_p1, Vector3 color_p2); - - - /// - /// Sets the outline color of the supplied node. - /// See gui.set_color for info how vectors encode color values. - /// - /// @CSharpLua.Template = "gui.set_outline({0}, {1})" - /// - public static extern void set_outline(Node node_p1, Vector4 color_p2); - - - /// - /// Returns the shadow color of the supplied node. - /// See gui.get_color for info how vectors encode color values. - /// - /// @CSharpLua.Template = "gui.get_shadow({0})" - /// - public static extern Vector4 get_shadow(Node node_p1); - - - /// - /// Sets the shadow color of the supplied node. - /// See gui.set_color for info how vectors encode color values. - /// - /// @CSharpLua.Template = "gui.set_shadow({0}, {1})" - /// - public static extern void set_shadow(Node node_p1, Vector3 color_p2); - - - /// - /// Sets the shadow color of the supplied node. - /// See gui.set_color for info how vectors encode color values. - /// - /// @CSharpLua.Template = "gui.set_shadow({0}, {1})" - /// - public static extern void set_shadow(Node node_p1, Vector4 color_p2); - - - /// - /// Sets the size of the supplied node. - /// You can only set size on nodes with size mode set to SIZE_MODE_MANUAL - /// - /// @CSharpLua.Template = "gui.set_size({0}, {1})" - /// - public static extern void set_size(Node node_p1, Vector3 size_p2); - - - /// - /// Sets the size of the supplied node. - /// You can only set size on nodes with size mode set to SIZE_MODE_MANUAL - /// - /// @CSharpLua.Template = "gui.set_size({0}, {1})" - /// - public static extern void set_size(Node node_p1, Vector4 size_p2); - - - /// - /// Returns the size of the supplied node. - /// - /// @CSharpLua.Template = "gui.get_size({0})" - /// - public static extern Vector3 get_size(Node node_p1); - - - /// - /// Returns the screen position of the supplied node. This function returns the - /// calculated transformed position of the node, taking into account any parent node - /// transforms. - /// - /// @CSharpLua.Template = "gui.get_screen_position({0})" - /// - public static extern Vector3 get_screen_position(Node node_p1); - - - /// - /// Set the screen position to the supplied node - /// - /// @CSharpLua.Template = "gui.set_screen_position({0}, {1})" - /// - public static extern void set_screen_position(Node node_p1, Vector3 screen_position_p2); - - - /// - /// Convert the screen position to the local position of supplied node - /// - /// @CSharpLua.Template = "gui.screen_to_local({0}, {1})" - /// - public static extern Vector3 screen_to_local(Node node_p1, Vector3 screen_position_p2); - - - /// - /// This is only useful nodes with flipbook animations. The cursor is normalized. - /// - /// @CSharpLua.Template = "gui.set_flipbook_cursor({0}, {1})" - /// - public static extern void set_flipbook_cursor(Node node_p1, double cursor_p2); - - - /// - /// This is only useful nodes with flipbook animations. Gets the playback rate of the flipbook animation on a node. - /// - /// @CSharpLua.Template = "gui.get_flipbook_playback_rate({0})" - /// - public static extern double get_flipbook_playback_rate(Node node_p1); - - - /// - /// This is only useful nodes with flipbook animations. Sets the playback rate of the flipbook animation on a node. Must be positive. - /// - /// @CSharpLua.Template = "gui.set_flipbook_playback_rate({0}, {1})" - /// - public static extern void set_flipbook_playback_rate(Node node_p1, double playback_rate_p2); - - - /// - /// Dynamically create a particle fx node. - /// - /// @CSharpLua.Template = "gui.new_particlefx_node({0}, {1})" - /// - public static extern Node new_particlefx_node(Vector3 pos_p1, Hash particlefx_p2); - - - /// - /// Dynamically create a particle fx node. - /// - /// @CSharpLua.Template = "gui.new_particlefx_node({0}, {1})" - /// - public static extern Node new_particlefx_node(Vector3 pos_p1, string particlefx_p2); - - - /// - /// Dynamically create a particle fx node. - /// - /// @CSharpLua.Template = "gui.new_particlefx_node({0}, {1})" - /// - public static extern Node new_particlefx_node(Vector4 pos_p1, Hash particlefx_p2); - - - /// - /// Dynamically create a particle fx node. - /// - /// @CSharpLua.Template = "gui.new_particlefx_node({0}, {1})" - /// - public static extern Node new_particlefx_node(Vector4 pos_p1, string particlefx_p2); - - - /// - /// Plays the paricle fx for a gui node - /// - /// @CSharpLua.Template = "gui.play_particlefx({0})" - /// - public static extern void play_particlefx(Node node_p1); - - - /// - /// Plays the paricle fx for a gui node - /// - /// @CSharpLua.Template = "gui.play_particlefx({0}, {1})" - /// - public static extern void play_particlefx(Node node_p1, Action emitter_state_function_p2); - - - /// - /// Stops the particle fx for a gui node - /// - /// @CSharpLua.Template = "gui.stop_particlefx({0}, {1})" - /// - public static extern void stop_particlefx(Node node_p1, ILuaTable options_p2); - - - /// - /// Set the paricle fx for a gui node - /// - /// @CSharpLua.Template = "gui.set_particlefx({0}, {1})" - /// - public static extern void set_particlefx(Node node_p1, Hash particlefx_p2); - - - /// - /// Set the paricle fx for a gui node - /// - /// @CSharpLua.Template = "gui.set_particlefx({0}, {1})" - /// - public static extern void set_particlefx(Node node_p1, string particlefx_p2); - - - /// - /// Get the paricle fx for a gui node - /// - /// @CSharpLua.Template = "gui.get_particlefx({0})" - /// - public static extern Hash get_particlefx(Node node_p1); - - - /// - /// gets the node inherit alpha state - /// - /// @CSharpLua.Template = "gui.get_inherit_alpha({0})" - /// - public static extern void get_inherit_alpha(Node node_p1); - - - /// - /// sets the node inherit alpha state - /// - /// @CSharpLua.Template = "gui.set_inherit_alpha({0}, {1})" - /// - public static extern void set_inherit_alpha(Node node_p1, bool inherit_alpha_p2); - - - /// - /// gets the node alpha - /// - /// @CSharpLua.Template = "gui.get_alpha({0})" - /// - public static extern void get_alpha(Node node_p1); - - - /// - /// sets the node alpha - /// - /// @CSharpLua.Template = "gui.set_alpha({0}, {1})" - /// - public static extern void set_alpha(Node node_p1, double alpha_p2); - - - /// - /// This is a callback-function, which is called by the engine when a gui component is initialized. It can be used - /// to set the initial state of the script and gui scene. - /// - /// @CSharpLua.Template = "gui.init({0})" - /// - public static extern void init(object self_p1); - - - /// - /// This is a callback-function, which is called by the engine when a gui component is finalized (destroyed). It can - /// be used to e.g. take some last action, report the finalization to other game object instances - /// or release user input focus (see release_input_focus). There is no use in starting any animations or similar - /// from this function since the gui component is about to be destroyed. - /// - /// @CSharpLua.Template = "gui.final({0})" - /// - public static extern void final(object self_p1); - - - /// - /// This is a callback-function, which is called by the engine every frame to update the state of a gui component. - /// It can be used to perform any kind of gui related tasks, e.g. animating nodes. - /// - /// @CSharpLua.Template = "gui.update({0}, {1})" - /// - public static extern void update(object self_p1, double dt_p2); - - - /// - /// This is a callback-function, which is called by the engine whenever a message has been sent to the gui component. - /// It can be used to take action on the message, e.g. update the gui or send a response back to the sender of the message. - /// The message parameter is a table containing the message data. If the message is sent from the engine, the - /// documentation of the message specifies which data is supplied. - /// See the update function for examples on how to use this callback-function. - /// - /// @CSharpLua.Template = "gui.on_message({0}, {1}, {2})" - /// - public static extern void on_message(object self_p1, Hash message_id_p2, ILuaTable message_p3); - - - /// - /// This is a callback-function, which is called by the engine when user input is sent to the instance of the gui component. - /// It can be used to take action on the input, e.g. modify the gui according to the input. - /// For an instance to obtain user input, it must first acquire input - /// focus through the message acquire_input_focus. - /// Any instance that has obtained input will be put on top of an - /// input stack. Input is sent to all listeners on the stack until the - /// end of stack is reached, or a listener returns true - /// to signal that it wants input to be consumed. - /// See the documentation of acquire_input_focus for more - /// information. - /// The action parameter is a table containing data about the input mapped to the - /// action_id. - /// For mapped actions it specifies the value of the input and if it was just pressed or released. - /// Actions are mapped to input in an input_binding-file. - /// Mouse movement is specifically handled and uses nil as its action_id. - /// The action only contains positional parameters in this case, such as x and y of the pointer. - /// Here is a brief description of the available table fields: - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
FieldDescription
valueThe amount of input given by the user. This is usually 1 for buttons and 0-1 for analogue inputs. This is not present for mouse movement.
pressedIf the input was pressed this frame. This is not present for mouse movement.
releasedIf the input was released this frame. This is not present for mouse movement.
repeatedIf the input was repeated this frame. This is similar to how a key on a keyboard is repeated when you hold it down. This is not present for mouse movement.
xThe x value of a pointer device, if present.
yThe y value of a pointer device, if present.
screen_xThe screen space x value of a pointer device, if present.
screen_yThe screen space y value of a pointer device, if present.
dxThe change in x value of a pointer device, if present.
dyThe change in y value of a pointer device, if present.
screen_dxThe change in screen space x value of a pointer device, if present.
screen_dyThe change in screen space y value of a pointer device, if present.
gamepadThe index of the gamepad device that provided the input.
touchList of touch input, one element per finger, if present. See table below about touch input
- /// Touch input table: - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
FieldDescription
idA number identifying the touch input during its duration.
pressedTrue if the finger was pressed this frame.
releasedTrue if the finger was released this frame.
tap_countNumber of taps, one for single, two for double-tap, etc
xThe x touch location.
yThe y touch location.
dxThe change in x value.
dyThe change in y value.
acc_xAccelerometer x value (if present).
acc_yAccelerometer y value (if present).
acc_zAccelerometer z value (if present).
- /// - /// @CSharpLua.Template = "gui.on_input({0}, {1}, {2})" - ///
- public static extern bool on_input(object self_p1, Hash action_id_p2, ILuaTable action_p3); - - - /// - /// This is a callback-function, which is called by the engine when the gui script is reloaded, e.g. from the editor. - /// It can be used for live development, e.g. to tweak constants or set up the state properly for the script. - /// - /// @CSharpLua.Template = "gui.on_reload({0})" - /// - public static extern void on_reload(object self_p1); - - - #endregion Defold API - - - /// - /// @CSharpLua.Template = "gui.get_node({0})" - /// - public static extern Node GetNode(Hash id); - - - public static TNode GetNode(Hash id) where TNode : NodeProxy, new() - { - var node = new TNode(); - node.__assignproxy__(Gui.get_node(id)); - return node; - } -} diff --git a/src/defold/html5.cs b/src/defold/html5.cs deleted file mode 100644 index 9cf7f0c..0000000 --- a/src/defold/html5.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using support; -using types; - -/// -/// HTML5 API documentation -/// -/// -public static class Html5 -{ - #region Defold API - /// - /// Executes the supplied string as JavaScript inside the browser. - /// A call to this function is blocking, the result is returned as-is, as a string. - /// (Internally this will execute the string using the eval() JavaScript function.) - /// - /// @CSharpLua.Template = "html5.run({0})" - /// - public static extern string run(string code_p1); - - - /// - /// Set a JavaScript interaction listener callaback from lua that will be - /// invoked when a user interacts with the web page by clicking, touching or typing. - /// The callback can then call DOM restricted actions like requesting a pointer lock, - /// or start playing sounds the first time the callback is invoked. - /// - /// @CSharpLua.Template = "html5.set_interaction_listener()" - /// - public static extern void set_interaction_listener(); - - - #endregion Defold API -} diff --git a/src/defold/http.cs b/src/defold/http.cs deleted file mode 100644 index 111a1bb..0000000 --- a/src/defold/http.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using support; -using types; - -/// -/// HTTP API documentation -/// -/// -public static class Http -{ - #region Defold API - /// - /// Perform a HTTP/HTTPS request. - /// If no timeout value is passed, the configuration value "network.http_timeout" is used. If that is not set, the timeout value is 0 (which blocks indefinitely). - /// - /// @CSharpLua.Template = "http.request({0}, {1}, {2})" - /// - public static extern void request(string url_p1, string method_p2, Action callback_p3); - - - /// - /// Perform a HTTP/HTTPS request. - /// If no timeout value is passed, the configuration value "network.http_timeout" is used. If that is not set, the timeout value is 0 (which blocks indefinitely). - /// - /// @CSharpLua.Template = "http.request({0}, {1}, {2}, {3})" - /// - public static extern void request(string url_p1, string method_p2, Action callback_p3, ILuaTable headers_p4); - - - /// - /// Perform a HTTP/HTTPS request. - /// If no timeout value is passed, the configuration value "network.http_timeout" is used. If that is not set, the timeout value is 0 (which blocks indefinitely). - /// - /// @CSharpLua.Template = "http.request({0}, {1}, {2}, {3}, {4})" - /// - public static extern void request(string url_p1, string method_p2, Action callback_p3, ILuaTable headers_p4, string post_data_p5); - - - /// - /// Perform a HTTP/HTTPS request. - /// If no timeout value is passed, the configuration value "network.http_timeout" is used. If that is not set, the timeout value is 0 (which blocks indefinitely). - /// - /// @CSharpLua.Template = "http.request({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void request(string url_p1, string method_p2, Action callback_p3, ILuaTable headers_p4, string post_data_p5, ILuaTable options_p6); - - - #endregion Defold API -} diff --git a/src/defold/iac.cs b/src/defold/iac.cs deleted file mode 100644 index ca5ac59..0000000 --- a/src/defold/iac.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using support; -using types; - -/// -/// Inter-app communication API documentation -/// -/// -public static class Iac -{ - #region Defold API - #endregion Defold API -} diff --git a/src/defold/iap.cs b/src/defold/iap.cs deleted file mode 100644 index 75371a5..0000000 --- a/src/defold/iap.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using support; -using types; - -/// -/// In-app purchases API documentation -/// -/// -public static class Iap -{ - #region Defold API - #endregion Defold API -} diff --git a/src/defold/image.cs b/src/defold/image.cs deleted file mode 100644 index c623d48..0000000 --- a/src/defold/image.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using support; -using types; - -/// -/// Image API documentation -/// -/// -public static class Image -{ - #region Defold API - /// - /// Load image (PNG or JPEG) from buffer. - /// - /// @CSharpLua.Template = "image.load({0})" - /// - public static extern ILuaTable load(string buffer_p1); - - - /// - /// Load image (PNG or JPEG) from buffer. - /// - /// @CSharpLua.Template = "image.load({0}, {1})" - /// - public static extern ILuaTable load(string buffer_p1, bool premult_p2); - - - #endregion Defold API -} diff --git a/src/defold/json.cs b/src/defold/json.cs deleted file mode 100644 index f06c4bf..0000000 --- a/src/defold/json.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using support; -using types; - -/// -/// JSON API documentation -/// -/// -public static class Json -{ - #region Defold API - /// - /// Decode a string of JSON data into a Lua table. - /// A Lua error is raised for syntax errors. - /// - /// @CSharpLua.Template = "json.decode({0})" - /// - public static extern ILuaTable decode(string json_p1); - - - /// - /// Encode a lua table to a JSON string. - /// A Lua error is raised for syntax errors. - /// - /// @CSharpLua.Template = "json.encode({0})" - /// - public static extern string encode(ILuaTable tbl_p1); - - - #endregion Defold API -} diff --git a/src/defold/label.cs b/src/defold/label.cs deleted file mode 100644 index 56dd9d1..0000000 --- a/src/defold/label.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using support; -using types; - -/// -/// Label API documentation -/// -/// -public static class Label -{ - #region Defold API - /// - /// Sets the text of a label component - /// This method uses the message passing that means the value will be set after dispatch messages step. - /// More information is available in the Application Lifecycle manual. - /// - /// @CSharpLua.Template = "label.set_text({0}, {1})" - /// - public static extern void set_text(string url_p1, string text_p2); - - - /// - /// Sets the text of a label component - /// This method uses the message passing that means the value will be set after dispatch messages step. - /// More information is available in the Application Lifecycle manual. - /// - /// @CSharpLua.Template = "label.set_text({0}, {1})" - /// - public static extern void set_text(Hash url_p1, string text_p2); - - - /// - /// Sets the text of a label component - /// This method uses the message passing that means the value will be set after dispatch messages step. - /// More information is available in the Application Lifecycle manual. - /// - /// @CSharpLua.Template = "label.set_text({0}, {1})" - /// - public static extern void set_text(Url url_p1, string text_p2); - - - /// - /// Gets the text from a label component - /// - /// @CSharpLua.Template = "label.get_text({0})" - /// - public static extern string get_text(string url_p1); - - - /// - /// Gets the text from a label component - /// - /// @CSharpLua.Template = "label.get_text({0})" - /// - public static extern string get_text(Hash url_p1); - - - /// - /// Gets the text from a label component - /// - /// @CSharpLua.Template = "label.get_text({0})" - /// - public static extern string get_text(Url url_p1); - - - #endregion Defold API -} diff --git a/src/defold/math.cs b/src/defold/math.cs deleted file mode 100644 index e3665f8..0000000 --- a/src/defold/math.cs +++ /dev/null @@ -1,345 +0,0 @@ -using System; -using support; -using types; - -/// -/// Lua math standard library -/// -/// -public static class Math -{ - #region Defold API - /// - /// This function is an interface to the simple - /// pseudo-random generator function rand provided by ANSI C. - /// (No guarantees can be given for its statistical properties.) - /// When called without arguments, - /// returns a uniform pseudo-random real number - /// in the range [0,1). - /// When called with an integer number m, - /// math.random returns - /// a uniform pseudo-random integer in the range [1, m]. - /// When called with two integer numbers m and n, - /// math.random returns a uniform pseudo-random - /// integer in the range [m, n]. - /// - /// @CSharpLua.Template = "math.random()" - /// - public static extern double random(); - - - #endregion Defold API - - - - /// - /// @CSharpLua.Template = "math.abs({0})" - /// - public static extern double abs(double x); - - - /// - /// @CSharpLua.Template = "math.acos({0})" - /// - public static extern double acos(double x); - - - /// - /// @CSharpLua.Template = "math.asin({0})" - /// - public static extern double asin(double x); - - - /// - /// @CSharpLua.Template = "math.atan({0})" - /// - public static extern double atan(double x); - - - - /// - /// @CSharpLua.Template = "math.atan2({0},{1})" - /// - public static extern double atan2(double x, double y); - - - /// - /// @CSharpLua.Template = "math.ceil({0})" - /// - public static extern double ceil(double x); - - - /// - /// @CSharpLua.Template = "math.cos({0})" - /// - public static extern double cos(double x); - - - /// - /// @CSharpLua.Template = "math.cosh({0})" - /// - public static extern double cosh(double x); - - - /// - /// @CSharpLua.Template = "math.deg({0})" - /// - public static extern double deg(double x); - - - /// - /// @CSharpLua.Template = "math.exp({0})" - /// - public static extern double exp(double x); - - - /// - /// @CSharpLua.Template = "math.floor({0})" - /// - public static extern double floor(double x); - - - /// - /// @CSharpLua.Template = "math.fmod({0},{1})" - /// - public static extern double fmod(double x, double y); - - - /// - /// @CSharpLua.Template = "math.frexp({0})" - /// - public static extern double frexp(double x); - - - /// - /// @CSharpLua.Template = "math.ldexp({0},{1})" - /// - public static extern double ldexp(double x, double y); - - - /// - /// @CSharpLua.Template = "math.log({0})" - /// - public static extern double log(double x); - - - /// - /// @CSharpLua.Template = "math.log10({0})" - /// - public static extern double log10(double x); - - - /// - /// @CSharpLua.Template = "math.max({0},{1})" - /// - public static extern double max(double x1, double x2); - - - /// - /// @CSharpLua.Template = "math.max({0},{1},{2})" - /// - public static extern double max(double x1, double x2, double x3); - - - /// - /// @CSharpLua.Template = "math.max({0},{1},{2},{3})" - /// - public static extern double max(double x1, double x2, double x3, double x4); - - - /// - /// @CSharpLua.Template = "math.max({0},{1},{2},{3},{4})" - /// - public static extern double max(double x1, double x2, double x3, double x4, double x5); - - - /// - /// @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5})" - /// - public static extern double max(double x1, double x2, double x3, double x4, double x5, double x6); - - - /// - /// @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5},{6})" - /// - public static extern double max(double x1, double x2, double x3, double x4, double x5, double x6, double x7); - - - /// - /// @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5},{6},{7})" - /// - public static extern double max(double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8); - - - /// - /// @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5},{6},{7},{8})" - /// - public static extern double max(double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, double x9); - - - /// - /// @CSharpLua.Template = "math.max({0},{1},{2},{3},{4},{5},{6},{7},{8},{9})" - /// - public static extern double max(double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, double x9, double x10); - - - /// - /// @CSharpLua.Template = "math.min({0},{1})" - /// - public static extern double min(double x1, double x2); - - - /// - /// @CSharpLua.Template = "math.min({0},{1},{2})" - /// - public static extern double min(double x1, double x2, double x3); - - - /// - /// @CSharpLua.Template = "math.min({0},{1},{2},{3})" - /// - public static extern double min(double x1, double x2, double x3, double x4); - - - /// - /// @CSharpLua.Template = "math.min({0},{1},{2},{3},{4})" - /// - public static extern double min(double x1, double x2, double x3, double x4, double x5); - - - /// - /// @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5})" - /// - public static extern double min(double x1, double x2, double x3, double x4, double x5, double x6); - - - /// - /// @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5},{6})" - /// - public static extern double min(double x1, double x2, double x3, double x4, double x5, double x6, double x7); - - - /// - /// @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5},{6},{7})" - /// - public static extern double min(double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8); - - - /// - /// @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5},{6},{7},{8})" - /// - public static extern double min(double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, double x9); - - - /// - /// @CSharpLua.Template = "math.min({0},{1},{2},{3},{4},{5},{6},{7},{8},{9})" - /// - public static extern double min(double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8, double x9, double x10); - - - /// - /// @CSharpLua.Template = "math.modf({0})" - /// - public static extern double modf(double x1); - - - /// - /// @CSharpLua.Template = "math.pow({0},{1})" - /// - public static extern double pow(double x, double y); - - - /// - /// @CSharpLua.Template = "math.rad({0})" - /// - public static extern double rad(double x); - - - /// - /// @CSharpLua.Template = "math.random({0})" - /// - public static extern double random(double m); - - - /// - /// @CSharpLua.Template = "math.random({0}, {1})" - /// - public static extern double random(double m, double n); - - - /// - /// @CSharpLua.Template = "math.random({0})" - /// - public static extern int random(int m); - - - /// - /// @CSharpLua.Template = "math.random({0}, {1})" - /// - public static extern int random(int m, int n); - - - /// - /// @CSharpLua.Template = "math.randomseed({0})" - /// - public static extern void randomseed(double x); - - - /// - /// @CSharpLua.Template = "math.sin({0})" - /// - public static extern double sin(double x); - - - /// - /// @CSharpLua.Template = "math.sinh({0})" - /// - public static extern double sinh(double x); - - - /// - /// @CSharpLua.Template = "math.sqrt({0})" - /// - public static extern double sqrt(double x); - - - /// - /// @CSharpLua.Template = "math.tan({0})" - /// - public static extern double tan(double x); - - - /// - /// @CSharpLua.Template = "math.tan({0})" - /// - public static extern double tanh(double x); - - - - /// - /// @CSharpLua.Template = "math.huge" - /// - private extern static double GetHuge(); - public readonly static double Huge = GetHuge(); - - - /// - /// @CSharpLua.Template = "math.pi" - /// - private extern static double GetPI(); - public static double PI { get; } = GetPI(); - - - /// - /// @CSharpLua.Template = "(2*math.pi)" - /// - private extern static double GetTau(); - - - /// - /// The mathematically superior and far more intuitive constant. 2 x PI. So, a quarter circle is TAU/4, half a circle is TAU/2, etc. - /// - public static double TAU { get; } = GetTau(); - - -} diff --git a/src/defold/model.cs b/src/defold/model.cs deleted file mode 100644 index 032a48f..0000000 --- a/src/defold/model.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using support; -using types; - -/// -/// Model API documentation -/// -/// -public static class Model -{ - #region Defold API - #region Messages - /// - /// - public class model_animation_done_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("model_animation_done"); - public override Hash FetchCode() => __CODE__; - - public Hash animation_id; - } - - - #endregion Messages - - - /// - /// Cancels all animation on a model component. - /// - /// @CSharpLua.Template = "model.cancel({0})" - /// - public static extern void cancel(string url_p1); - - - /// - /// Cancels all animation on a model component. - /// - /// @CSharpLua.Template = "model.cancel({0})" - /// - public static extern void cancel(Hash url_p1); - - - /// - /// Cancels all animation on a model component. - /// - /// @CSharpLua.Template = "model.cancel({0})" - /// - public static extern void cancel(Url url_p1); - - - /// - /// Gets the id of the game object that corresponds to a model skeleton bone. - /// The returned game object can be used for parenting and transform queries. - /// This function has complexity O(n), where n is the number of bones in the model skeleton. - /// Game objects corresponding to a model skeleton bone can not be individually deleted. - /// - /// @CSharpLua.Template = "model.get_go({0}, {1})" - /// - public static extern Hash get_go(string url_p1, string bone_id_p2); - - - /// - /// Gets the id of the game object that corresponds to a model skeleton bone. - /// The returned game object can be used for parenting and transform queries. - /// This function has complexity O(n), where n is the number of bones in the model skeleton. - /// Game objects corresponding to a model skeleton bone can not be individually deleted. - /// - /// @CSharpLua.Template = "model.get_go({0}, {1})" - /// - public static extern Hash get_go(string url_p1, Hash bone_id_p2); - - - /// - /// Gets the id of the game object that corresponds to a model skeleton bone. - /// The returned game object can be used for parenting and transform queries. - /// This function has complexity O(n), where n is the number of bones in the model skeleton. - /// Game objects corresponding to a model skeleton bone can not be individually deleted. - /// - /// @CSharpLua.Template = "model.get_go({0}, {1})" - /// - public static extern Hash get_go(Hash url_p1, string bone_id_p2); - - - /// - /// Gets the id of the game object that corresponds to a model skeleton bone. - /// The returned game object can be used for parenting and transform queries. - /// This function has complexity O(n), where n is the number of bones in the model skeleton. - /// Game objects corresponding to a model skeleton bone can not be individually deleted. - /// - /// @CSharpLua.Template = "model.get_go({0}, {1})" - /// - public static extern Hash get_go(Hash url_p1, Hash bone_id_p2); - - - /// - /// Gets the id of the game object that corresponds to a model skeleton bone. - /// The returned game object can be used for parenting and transform queries. - /// This function has complexity O(n), where n is the number of bones in the model skeleton. - /// Game objects corresponding to a model skeleton bone can not be individually deleted. - /// - /// @CSharpLua.Template = "model.get_go({0}, {1})" - /// - public static extern Hash get_go(Url url_p1, string bone_id_p2); - - - /// - /// Gets the id of the game object that corresponds to a model skeleton bone. - /// The returned game object can be used for parenting and transform queries. - /// This function has complexity O(n), where n is the number of bones in the model skeleton. - /// Game objects corresponding to a model skeleton bone can not be individually deleted. - /// - /// @CSharpLua.Template = "model.get_go({0}, {1})" - /// - public static extern Hash get_go(Url url_p1, Hash bone_id_p2); - - - #endregion Defold API -} diff --git a/src/defold/msg.cs b/src/defold/msg.cs deleted file mode 100644 index ef94695..0000000 --- a/src/defold/msg.cs +++ /dev/null @@ -1,332 +0,0 @@ -using System; -using support; -using types; - -/// -/// Messaging API documentation -/// -/// -public static class Msg -{ - #region Defold API - /// - /// This is equivalent to msg.url(nil) or msg.url("#"), which creates an url to the current - /// script component. - /// - /// @CSharpLua.Template = "msg.url()" - /// - public static extern Url url(); - - - /// - /// The format of the string must be [socket:][path][#fragment], which is similar to a HTTP URL. - /// When addressing instances: - ///
    - ///
  • socket is the name of a valid world (a collection)
  • - ///
  • path is the id of the instance, which can either be relative the instance of the calling script or global
  • - ///
  • fragment would be the id of the desired component
  • - ///
- /// In addition, the following shorthands are available: - ///
    - ///
  • "." the current game object
  • - ///
  • "#" the current component
  • - ///
- /// - /// @CSharpLua.Template = "msg.url({0})" - ///
- public static extern Url url(string urlstring_p1); - - - /// - /// creates a new URL from separate arguments - /// - /// @CSharpLua.Template = "msg.url({0}, {1})" - /// - public static extern Url url(string socket_p1, string path_p2); - - - /// - /// creates a new URL from separate arguments - /// - /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" - /// - public static extern Url url(string socket_p1, string path_p2, string fragment_p3); - - - /// - /// creates a new URL from separate arguments - /// - /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" - /// - public static extern Url url(string socket_p1, string path_p2, Hash fragment_p3); - - - /// - /// creates a new URL from separate arguments - /// - /// @CSharpLua.Template = "msg.url({0}, {1})" - /// - public static extern Url url(string socket_p1, Hash path_p2); - - - /// - /// creates a new URL from separate arguments - /// - /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" - /// - public static extern Url url(string socket_p1, Hash path_p2, string fragment_p3); - - - /// - /// creates a new URL from separate arguments - /// - /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" - /// - public static extern Url url(string socket_p1, Hash path_p2, Hash fragment_p3); - - - /// - /// creates a new URL from separate arguments - /// - /// @CSharpLua.Template = "msg.url({0}, {1})" - /// - public static extern Url url(Hash socket_p1, string path_p2); - - - /// - /// creates a new URL from separate arguments - /// - /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" - /// - public static extern Url url(Hash socket_p1, string path_p2, string fragment_p3); - - - /// - /// creates a new URL from separate arguments - /// - /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" - /// - public static extern Url url(Hash socket_p1, string path_p2, Hash fragment_p3); - - - /// - /// creates a new URL from separate arguments - /// - /// @CSharpLua.Template = "msg.url({0}, {1})" - /// - public static extern Url url(Hash socket_p1, Hash path_p2); - - - /// - /// creates a new URL from separate arguments - /// - /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" - /// - public static extern Url url(Hash socket_p1, Hash path_p2, string fragment_p3); - - - /// - /// creates a new URL from separate arguments - /// - /// @CSharpLua.Template = "msg.url({0}, {1}, {2})" - /// - public static extern Url url(Hash socket_p1, Hash path_p2, Hash fragment_p3); - - - /// - /// Post a message to a receiving URL. The most common case is to send messages - /// to a component. If the component part of the receiver is omitted, the message - /// is broadcast to all components in the game object. - /// The following receiver shorthands are available: - ///
    - ///
  • "." the current game object
  • - ///
  • "#" the current component
  • - ///
- /// There is a 2 kilobyte limit to the message parameter table size. - /// - /// @CSharpLua.Template = "msg.post({0}, {1})" - ///
- public static extern void post(string receiver_p1, string message_id_p2); - - - /// - /// Post a message to a receiving URL. The most common case is to send messages - /// to a component. If the component part of the receiver is omitted, the message - /// is broadcast to all components in the game object. - /// The following receiver shorthands are available: - ///
    - ///
  • "." the current game object
  • - ///
  • "#" the current component
  • - ///
- /// There is a 2 kilobyte limit to the message parameter table size. - /// - /// @CSharpLua.Template = "msg.post({0}, {1}, {2})" - ///
- public static extern void post(string receiver_p1, string message_id_p2, ILuaTable message_p3); - - - /// - /// Post a message to a receiving URL. The most common case is to send messages - /// to a component. If the component part of the receiver is omitted, the message - /// is broadcast to all components in the game object. - /// The following receiver shorthands are available: - ///
    - ///
  • "." the current game object
  • - ///
  • "#" the current component
  • - ///
- /// There is a 2 kilobyte limit to the message parameter table size. - /// - /// @CSharpLua.Template = "msg.post({0}, {1})" - ///
- public static extern void post(string receiver_p1, Hash message_id_p2); - - - /// - /// Post a message to a receiving URL. The most common case is to send messages - /// to a component. If the component part of the receiver is omitted, the message - /// is broadcast to all components in the game object. - /// The following receiver shorthands are available: - ///
    - ///
  • "." the current game object
  • - ///
  • "#" the current component
  • - ///
- /// There is a 2 kilobyte limit to the message parameter table size. - /// - /// @CSharpLua.Template = "msg.post({0}, {1}, {2})" - ///
- public static extern void post(string receiver_p1, Hash message_id_p2, ILuaTable message_p3); - - - /// - /// Post a message to a receiving URL. The most common case is to send messages - /// to a component. If the component part of the receiver is omitted, the message - /// is broadcast to all components in the game object. - /// The following receiver shorthands are available: - ///
    - ///
  • "." the current game object
  • - ///
  • "#" the current component
  • - ///
- /// There is a 2 kilobyte limit to the message parameter table size. - /// - /// @CSharpLua.Template = "msg.post({0}, {1})" - ///
- public static extern void post(Url receiver_p1, string message_id_p2); - - - /// - /// Post a message to a receiving URL. The most common case is to send messages - /// to a component. If the component part of the receiver is omitted, the message - /// is broadcast to all components in the game object. - /// The following receiver shorthands are available: - ///
    - ///
  • "." the current game object
  • - ///
  • "#" the current component
  • - ///
- /// There is a 2 kilobyte limit to the message parameter table size. - /// - /// @CSharpLua.Template = "msg.post({0}, {1}, {2})" - ///
- public static extern void post(Url receiver_p1, string message_id_p2, ILuaTable message_p3); - - - /// - /// Post a message to a receiving URL. The most common case is to send messages - /// to a component. If the component part of the receiver is omitted, the message - /// is broadcast to all components in the game object. - /// The following receiver shorthands are available: - ///
    - ///
  • "." the current game object
  • - ///
  • "#" the current component
  • - ///
- /// There is a 2 kilobyte limit to the message parameter table size. - /// - /// @CSharpLua.Template = "msg.post({0}, {1})" - ///
- public static extern void post(Url receiver_p1, Hash message_id_p2); - - - /// - /// Post a message to a receiving URL. The most common case is to send messages - /// to a component. If the component part of the receiver is omitted, the message - /// is broadcast to all components in the game object. - /// The following receiver shorthands are available: - ///
    - ///
  • "." the current game object
  • - ///
  • "#" the current component
  • - ///
- /// There is a 2 kilobyte limit to the message parameter table size. - /// - /// @CSharpLua.Template = "msg.post({0}, {1}, {2})" - ///
- public static extern void post(Url receiver_p1, Hash message_id_p2, ILuaTable message_p3); - - - /// - /// Post a message to a receiving URL. The most common case is to send messages - /// to a component. If the component part of the receiver is omitted, the message - /// is broadcast to all components in the game object. - /// The following receiver shorthands are available: - ///
    - ///
  • "." the current game object
  • - ///
  • "#" the current component
  • - ///
- /// There is a 2 kilobyte limit to the message parameter table size. - /// - /// @CSharpLua.Template = "msg.post({0}, {1})" - ///
- public static extern void post(Hash receiver_p1, string message_id_p2); - - - /// - /// Post a message to a receiving URL. The most common case is to send messages - /// to a component. If the component part of the receiver is omitted, the message - /// is broadcast to all components in the game object. - /// The following receiver shorthands are available: - ///
    - ///
  • "." the current game object
  • - ///
  • "#" the current component
  • - ///
- /// There is a 2 kilobyte limit to the message parameter table size. - /// - /// @CSharpLua.Template = "msg.post({0}, {1}, {2})" - ///
- public static extern void post(Hash receiver_p1, string message_id_p2, ILuaTable message_p3); - - - /// - /// Post a message to a receiving URL. The most common case is to send messages - /// to a component. If the component part of the receiver is omitted, the message - /// is broadcast to all components in the game object. - /// The following receiver shorthands are available: - ///
    - ///
  • "." the current game object
  • - ///
  • "#" the current component
  • - ///
- /// There is a 2 kilobyte limit to the message parameter table size. - /// - /// @CSharpLua.Template = "msg.post({0}, {1})" - ///
- public static extern void post(Hash receiver_p1, Hash message_id_p2); - - - /// - /// Post a message to a receiving URL. The most common case is to send messages - /// to a component. If the component part of the receiver is omitted, the message - /// is broadcast to all components in the game object. - /// The following receiver shorthands are available: - ///
    - ///
  • "." the current game object
  • - ///
  • "#" the current component
  • - ///
- /// There is a 2 kilobyte limit to the message parameter table size. - /// - /// @CSharpLua.Template = "msg.post({0}, {1}, {2})" - ///
- public static extern void post(Hash receiver_p1, Hash message_id_p2, ILuaTable message_p3); - - - #endregion Defold API - - - public const string DefaultSocket = null; -} diff --git a/src/defold/os.cs b/src/defold/os.cs deleted file mode 100644 index 7218b6c..0000000 --- a/src/defold/os.cs +++ /dev/null @@ -1,124 +0,0 @@ -using types; - -public static class OS -{ - /// - /// @CSharpLua.Template = "os.clock()" - /// - public static extern double clock(); - - - //TODO: Figure out how we need to format this one. Might need a stand-in. - - /// - /// @CSharpLua.Template = "os.date({0},{1})" - /// - public static extern string date(); - - - /// - /// @CSharpLua.Template = "os.date({0})" - /// - public static extern string date(string format); - - - /// - /// @CSharpLua.Template = "os.difftime({0},{1})" - /// - public static extern double difftime(double t2, double t1); - - - /// - /// @CSharpLua.Template = "os.execute({0})" - /// - public static extern int execute(string command); - - - /// - /// @CSharpLua.Template = "(os.execute() ~= 0)" - /// - public static extern bool IsShellAvailable(); - - - /// - /// Safely shuts the game down. Use exit() if an immediate force exit is needed - /// - public static void Shutdown() - { - /*[[ - msg.post("@system:", "exit", {code = 0}) - ]]*/ - } - - - /// - /// @CSharpLua.Template = "os.exit()" - /// - public static extern void exit(); - - - /// - /// @CSharpLua.Template = "os.exit({0})" - /// - public static extern void exit(int code); - - - /// - /// @CSharpLua.Template = "os.getenv({0})" - /// - public static extern string getenv(string varname); - - - /// - /// @CSharpLua.Template = "os.remove({0})" - /// - public static extern bool remove(string filename, out string error); - - - /// - /// @CSharpLua.Template = "os.rename({0},{1})" - /// - public static extern bool rename(string oldname, string newname, out string error); - - - /// - /// @CSharpLua.Template = "os.setlocale(nil)" - /// - public static extern string setlocale(); - - - /// - /// @CSharpLua.Template = "os.setlocale(nil)" - /// - public static extern string getlocale(); - - - /// - /// @CSharpLua.Template = "os.setlocale({0})" - /// - public static extern string setlocale(string locale); - - - /// - /// @CSharpLua.Template = "os.setlocale({0},{1})" - /// - public static extern string setlocale(string locale, string category); - - - /// - /// @CSharpLua.Template = "os.time()" - /// - public static extern double time(); - - - /// - /// @CSharpLua.Template = "os.time({0})" - /// - public static extern double time(ILuaTable table); - - - /// - /// @CSharpLua.Template = "os.time()" - /// - public static extern string tmpname(); -} \ No newline at end of file diff --git a/src/defold/particlefx.cs b/src/defold/particlefx.cs deleted file mode 100644 index bd08dd4..0000000 --- a/src/defold/particlefx.cs +++ /dev/null @@ -1,385 +0,0 @@ -using System; -using support; -using types; - -/// -/// Particle effects API documentation -/// -/// -public static class Particlefx -{ - #region Defold API - /// - /// Starts playing a particle FX component. - /// Particle FX started this way need to be manually stopped through particlefx.stop(). - /// Which particle FX to play is identified by the URL. - /// A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. - /// - /// @CSharpLua.Template = "particlefx.play({0})" - /// - public static extern void play(string url_p1); - - - /// - /// Starts playing a particle FX component. - /// Particle FX started this way need to be manually stopped through particlefx.stop(). - /// Which particle FX to play is identified by the URL. - /// A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. - /// - /// @CSharpLua.Template = "particlefx.play({0}, {1})" - /// - public static extern void play(string url_p1, Action emitter_state_function_p2); - - - /// - /// Starts playing a particle FX component. - /// Particle FX started this way need to be manually stopped through particlefx.stop(). - /// Which particle FX to play is identified by the URL. - /// A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. - /// - /// @CSharpLua.Template = "particlefx.play({0})" - /// - public static extern void play(Hash url_p1); - - - /// - /// Starts playing a particle FX component. - /// Particle FX started this way need to be manually stopped through particlefx.stop(). - /// Which particle FX to play is identified by the URL. - /// A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. - /// - /// @CSharpLua.Template = "particlefx.play({0}, {1})" - /// - public static extern void play(Hash url_p1, Action emitter_state_function_p2); - - - /// - /// Starts playing a particle FX component. - /// Particle FX started this way need to be manually stopped through particlefx.stop(). - /// Which particle FX to play is identified by the URL. - /// A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. - /// - /// @CSharpLua.Template = "particlefx.play({0})" - /// - public static extern void play(Url url_p1); - - - /// - /// Starts playing a particle FX component. - /// Particle FX started this way need to be manually stopped through particlefx.stop(). - /// Which particle FX to play is identified by the URL. - /// A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. - /// - /// @CSharpLua.Template = "particlefx.play({0}, {1})" - /// - public static extern void play(Url url_p1, Action emitter_state_function_p2); - - - /// - /// Stops a particle FX component from playing. - /// Stopping a particle FX does not remove already spawned particles. - /// Which particle FX to stop is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.stop({0}, {1})" - /// - public static extern void stop(string url_p1, ILuaTable options_p2); - - - /// - /// Stops a particle FX component from playing. - /// Stopping a particle FX does not remove already spawned particles. - /// Which particle FX to stop is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.stop({0}, {1})" - /// - public static extern void stop(Hash url_p1, ILuaTable options_p2); - - - /// - /// Stops a particle FX component from playing. - /// Stopping a particle FX does not remove already spawned particles. - /// Which particle FX to stop is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.stop({0}, {1})" - /// - public static extern void stop(Url url_p1, ILuaTable options_p2); - - - /// - /// Sets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Setting a constant through this function will override the value set for that constant in the material. - /// The value will be overridden until particlefx.reset_constant is called. - /// Which particle FX to set a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" - /// - public static extern void set_constant(string url_p1, string emitter_p2, string constant_p3, Vector4 value_p4); - - - /// - /// Sets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Setting a constant through this function will override the value set for that constant in the material. - /// The value will be overridden until particlefx.reset_constant is called. - /// Which particle FX to set a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" - /// - public static extern void set_constant(string url_p1, string emitter_p2, Hash constant_p3, Vector4 value_p4); - - - /// - /// Sets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Setting a constant through this function will override the value set for that constant in the material. - /// The value will be overridden until particlefx.reset_constant is called. - /// Which particle FX to set a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" - /// - public static extern void set_constant(string url_p1, Hash emitter_p2, string constant_p3, Vector4 value_p4); - - - /// - /// Sets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Setting a constant through this function will override the value set for that constant in the material. - /// The value will be overridden until particlefx.reset_constant is called. - /// Which particle FX to set a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" - /// - public static extern void set_constant(string url_p1, Hash emitter_p2, Hash constant_p3, Vector4 value_p4); - - - /// - /// Sets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Setting a constant through this function will override the value set for that constant in the material. - /// The value will be overridden until particlefx.reset_constant is called. - /// Which particle FX to set a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" - /// - public static extern void set_constant(Hash url_p1, string emitter_p2, string constant_p3, Vector4 value_p4); - - - /// - /// Sets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Setting a constant through this function will override the value set for that constant in the material. - /// The value will be overridden until particlefx.reset_constant is called. - /// Which particle FX to set a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" - /// - public static extern void set_constant(Hash url_p1, string emitter_p2, Hash constant_p3, Vector4 value_p4); - - - /// - /// Sets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Setting a constant through this function will override the value set for that constant in the material. - /// The value will be overridden until particlefx.reset_constant is called. - /// Which particle FX to set a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" - /// - public static extern void set_constant(Hash url_p1, Hash emitter_p2, string constant_p3, Vector4 value_p4); - - - /// - /// Sets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Setting a constant through this function will override the value set for that constant in the material. - /// The value will be overridden until particlefx.reset_constant is called. - /// Which particle FX to set a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" - /// - public static extern void set_constant(Hash url_p1, Hash emitter_p2, Hash constant_p3, Vector4 value_p4); - - - /// - /// Sets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Setting a constant through this function will override the value set for that constant in the material. - /// The value will be overridden until particlefx.reset_constant is called. - /// Which particle FX to set a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" - /// - public static extern void set_constant(Url url_p1, string emitter_p2, string constant_p3, Vector4 value_p4); - - - /// - /// Sets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Setting a constant through this function will override the value set for that constant in the material. - /// The value will be overridden until particlefx.reset_constant is called. - /// Which particle FX to set a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" - /// - public static extern void set_constant(Url url_p1, string emitter_p2, Hash constant_p3, Vector4 value_p4); - - - /// - /// Sets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Setting a constant through this function will override the value set for that constant in the material. - /// The value will be overridden until particlefx.reset_constant is called. - /// Which particle FX to set a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" - /// - public static extern void set_constant(Url url_p1, Hash emitter_p2, string constant_p3, Vector4 value_p4); - - - /// - /// Sets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Setting a constant through this function will override the value set for that constant in the material. - /// The value will be overridden until particlefx.reset_constant is called. - /// Which particle FX to set a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.set_constant({0}, {1}, {2}, {3})" - /// - public static extern void set_constant(Url url_p1, Hash emitter_p2, Hash constant_p3, Vector4 value_p4); - - - /// - /// Resets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Resetting a constant through this function implies that the value defined in the material will be used. - /// Which particle FX to reset a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" - /// - public static extern void reset_constant(string url_p1, string emitter_p2, string constant_p3); - - - /// - /// Resets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Resetting a constant through this function implies that the value defined in the material will be used. - /// Which particle FX to reset a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" - /// - public static extern void reset_constant(string url_p1, string emitter_p2, Hash constant_p3); - - - /// - /// Resets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Resetting a constant through this function implies that the value defined in the material will be used. - /// Which particle FX to reset a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" - /// - public static extern void reset_constant(string url_p1, Hash emitter_p2, string constant_p3); - - - /// - /// Resets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Resetting a constant through this function implies that the value defined in the material will be used. - /// Which particle FX to reset a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" - /// - public static extern void reset_constant(string url_p1, Hash emitter_p2, Hash constant_p3); - - - /// - /// Resets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Resetting a constant through this function implies that the value defined in the material will be used. - /// Which particle FX to reset a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" - /// - public static extern void reset_constant(Hash url_p1, string emitter_p2, string constant_p3); - - - /// - /// Resets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Resetting a constant through this function implies that the value defined in the material will be used. - /// Which particle FX to reset a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" - /// - public static extern void reset_constant(Hash url_p1, string emitter_p2, Hash constant_p3); - - - /// - /// Resets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Resetting a constant through this function implies that the value defined in the material will be used. - /// Which particle FX to reset a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" - /// - public static extern void reset_constant(Hash url_p1, Hash emitter_p2, string constant_p3); - - - /// - /// Resets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Resetting a constant through this function implies that the value defined in the material will be used. - /// Which particle FX to reset a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" - /// - public static extern void reset_constant(Hash url_p1, Hash emitter_p2, Hash constant_p3); - - - /// - /// Resets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Resetting a constant through this function implies that the value defined in the material will be used. - /// Which particle FX to reset a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" - /// - public static extern void reset_constant(Url url_p1, string emitter_p2, string constant_p3); - - - /// - /// Resets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Resetting a constant through this function implies that the value defined in the material will be used. - /// Which particle FX to reset a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" - /// - public static extern void reset_constant(Url url_p1, string emitter_p2, Hash constant_p3); - - - /// - /// Resets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Resetting a constant through this function implies that the value defined in the material will be used. - /// Which particle FX to reset a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" - /// - public static extern void reset_constant(Url url_p1, Hash emitter_p2, string constant_p3); - - - /// - /// Resets a shader constant for a particle FX component emitter. - /// The constant must be defined in the material assigned to the emitter. - /// Resetting a constant through this function implies that the value defined in the material will be used. - /// Which particle FX to reset a constant for is identified by the URL. - /// - /// @CSharpLua.Template = "particlefx.reset_constant({0}, {1}, {2})" - /// - public static extern void reset_constant(Url url_p1, Hash emitter_p2, Hash constant_p3); - - - #endregion Defold API -} diff --git a/src/defold/physics.cs b/src/defold/physics.cs deleted file mode 100644 index 4827fda..0000000 --- a/src/defold/physics.cs +++ /dev/null @@ -1,976 +0,0 @@ -using System; -using support; -using types; - -/// -/// Collision object physics API documentation -/// -/// -public static class Physics -{ - #region Defold API - #region Messages - /// - /// - public class apply_force_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("apply_force"); - public override Hash FetchCode() => __CODE__; - - public Vector3 force; - public Vector3 position; - } - - - /// - /// - public class collision_response_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("collision_response"); - public override Hash FetchCode() => __CODE__; - - public Hash other_id; - public Vector3 other_position; - public Hash other_group; - public Hash own_group; - } - - - /// - /// - public class contact_point_response_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("contact_point_response"); - public override Hash FetchCode() => __CODE__; - - public Vector3 position; - public Vector3 normal; - public Vector3 relative_velocity; - public double distance; - public double applied_impulse; - public double life_time; - public double mass; - public double other_mass; - public Hash other_id; - public Vector3 other_position; - public Hash other_group; - public Hash own_group; - } - - - /// - /// - public class trigger_response_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("trigger_response"); - public override Hash FetchCode() => __CODE__; - - public Hash other_id; - public bool enter; - public Hash other_group; - public Hash own_group; - } - - - /// - /// - public class ray_cast_response_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("ray_cast_response"); - public override Hash FetchCode() => __CODE__; - - public double fraction; - public Vector3 position; - public Vector3 normal; - public Hash id; - public Hash group; - public double request_id; - } - - - /// - /// - public class ray_cast_missed_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("ray_cast_missed"); - public override Hash FetchCode() => __CODE__; - - public double request_id; - } - - - #endregion Messages - - - /// - /// Ray casts are used to test for intersections against collision objects in the physics world. - /// Collision objects of types kinematic, dynamic and static are tested against. Trigger objects - /// do not intersect with ray casts. - /// Which collision objects to hit is filtered by their collision groups and can be configured - /// through groups. - /// The actual ray cast will be performed during the physics-update. - ///
    - ///
  • If an object is hit, the result will be reported via a ray_cast_response message.
  • - ///
  • If there is no object hit, the result will be reported via a ray_cast_missed message.
  • - ///
- /// - /// @CSharpLua.Template = "physics.raycast_async({0}, {1}, {2})" - ///
- public static extern void raycast_async(Vector3 from_p1, Vector3 to_p2, ILuaTable groups_p3); - - - /// - /// Ray casts are used to test for intersections against collision objects in the physics world. - /// Collision objects of types kinematic, dynamic and static are tested against. Trigger objects - /// do not intersect with ray casts. - /// Which collision objects to hit is filtered by their collision groups and can be configured - /// through groups. - /// The actual ray cast will be performed during the physics-update. - ///
    - ///
  • If an object is hit, the result will be reported via a ray_cast_response message.
  • - ///
  • If there is no object hit, the result will be reported via a ray_cast_missed message.
  • - ///
- /// - /// @CSharpLua.Template = "physics.raycast_async({0}, {1}, {2}, {3})" - ///
- public static extern void raycast_async(Vector3 from_p1, Vector3 to_p2, ILuaTable groups_p3, double request_id_p4); - - - /// - /// Ray casts are used to test for intersections against collision objects in the physics world. - /// Collision objects of types kinematic, dynamic and static are tested against. Trigger objects - /// do not intersect with ray casts. - /// Which collision objects to hit is filtered by their collision groups and can be configured - /// through groups. - /// - /// @CSharpLua.Template = "physics.raycast({0}, {1}, {2}, {3})" - /// - public static extern ILuaTable raycast(Vector3 from_p1, Vector3 to_p2, ILuaTable groups_p3, ILuaTable options_p4); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, string collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, string collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, Hash collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, Hash collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, Url collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, Url collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, string collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, string collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, Hash collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, Hash collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, Url collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, string collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, Url collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, string collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, string collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, Hash collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, Hash collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, Url collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, Url collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, string collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, string collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, Hash collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, Hash collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, Url collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, Hash collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, Url collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, string collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, string collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, Hash collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, Hash collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, Url collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, string joint_id_p3, Vector3 position_a_p4, Url collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, string collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, string collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, Hash collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, Hash collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, Url collisionobject_b_p5, Vector3 position_b_p6); - - - /// - /// Create a physics joint between two collision object components. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.create_joint({0}, {1}, {2}, {3}, {4}, {5}, {6})" - /// - public static extern void create_joint(double joint_type_p1, Url collisionobject_a_p2, Hash joint_id_p3, Vector3 position_a_p4, Url collisionobject_b_p5, Vector3 position_b_p6, ILuaTable properties_p7); - - - /// - /// Destroy an already physics joint. The joint has to be created before a - /// destroy can be issued. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.destroy_joint({0}, {1})" - /// - public static extern void destroy_joint(string collisionobject_p1, string joint_id_p2); - - - /// - /// Destroy an already physics joint. The joint has to be created before a - /// destroy can be issued. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.destroy_joint({0}, {1})" - /// - public static extern void destroy_joint(string collisionobject_p1, Hash joint_id_p2); - - - /// - /// Destroy an already physics joint. The joint has to be created before a - /// destroy can be issued. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.destroy_joint({0}, {1})" - /// - public static extern void destroy_joint(Hash collisionobject_p1, string joint_id_p2); - - - /// - /// Destroy an already physics joint. The joint has to be created before a - /// destroy can be issued. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.destroy_joint({0}, {1})" - /// - public static extern void destroy_joint(Hash collisionobject_p1, Hash joint_id_p2); - - - /// - /// Destroy an already physics joint. The joint has to be created before a - /// destroy can be issued. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.destroy_joint({0}, {1})" - /// - public static extern void destroy_joint(Url collisionobject_p1, string joint_id_p2); - - - /// - /// Destroy an already physics joint. The joint has to be created before a - /// destroy can be issued. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.destroy_joint({0}, {1})" - /// - public static extern void destroy_joint(Url collisionobject_p1, Hash joint_id_p2); - - - /// - /// Get a table for properties for a connected joint. The joint has to be created before - /// properties can be retrieved. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" - /// - public static extern ILuaTable get_joint_properties(string collisionobject_p1, string joint_id_p2); - - - /// - /// Get a table for properties for a connected joint. The joint has to be created before - /// properties can be retrieved. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" - /// - public static extern ILuaTable get_joint_properties(string collisionobject_p1, Hash joint_id_p2); - - - /// - /// Get a table for properties for a connected joint. The joint has to be created before - /// properties can be retrieved. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" - /// - public static extern ILuaTable get_joint_properties(Hash collisionobject_p1, string joint_id_p2); - - - /// - /// Get a table for properties for a connected joint. The joint has to be created before - /// properties can be retrieved. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" - /// - public static extern ILuaTable get_joint_properties(Hash collisionobject_p1, Hash joint_id_p2); - - - /// - /// Get a table for properties for a connected joint. The joint has to be created before - /// properties can be retrieved. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" - /// - public static extern ILuaTable get_joint_properties(Url collisionobject_p1, string joint_id_p2); - - - /// - /// Get a table for properties for a connected joint. The joint has to be created before - /// properties can be retrieved. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_properties({0}, {1})" - /// - public static extern ILuaTable get_joint_properties(Url collisionobject_p1, Hash joint_id_p2); - - - /// - /// Updates the properties for an already connected joint. The joint has to be created before - /// properties can be changed. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" - /// - public static extern void set_joint_properties(string collisionobject_p1, string joint_id_p2, ILuaTable properties_p3); - - - /// - /// Updates the properties for an already connected joint. The joint has to be created before - /// properties can be changed. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" - /// - public static extern void set_joint_properties(string collisionobject_p1, Hash joint_id_p2, ILuaTable properties_p3); - - - /// - /// Updates the properties for an already connected joint. The joint has to be created before - /// properties can be changed. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" - /// - public static extern void set_joint_properties(Hash collisionobject_p1, string joint_id_p2, ILuaTable properties_p3); - - - /// - /// Updates the properties for an already connected joint. The joint has to be created before - /// properties can be changed. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" - /// - public static extern void set_joint_properties(Hash collisionobject_p1, Hash joint_id_p2, ILuaTable properties_p3); - - - /// - /// Updates the properties for an already connected joint. The joint has to be created before - /// properties can be changed. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" - /// - public static extern void set_joint_properties(Url collisionobject_p1, string joint_id_p2, ILuaTable properties_p3); - - - /// - /// Updates the properties for an already connected joint. The joint has to be created before - /// properties can be changed. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.set_joint_properties({0}, {1}, {2})" - /// - public static extern void set_joint_properties(Url collisionobject_p1, Hash joint_id_p2, ILuaTable properties_p3); - - - /// - /// Get the reaction force for a joint. The joint has to be created before - /// the reaction force can be calculated. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" - /// - public static extern Vector3 get_joint_reaction_force(string collisionobject_p1, string joint_id_p2); - - - /// - /// Get the reaction force for a joint. The joint has to be created before - /// the reaction force can be calculated. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" - /// - public static extern Vector3 get_joint_reaction_force(string collisionobject_p1, Hash joint_id_p2); - - - /// - /// Get the reaction force for a joint. The joint has to be created before - /// the reaction force can be calculated. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" - /// - public static extern Vector3 get_joint_reaction_force(Hash collisionobject_p1, string joint_id_p2); - - - /// - /// Get the reaction force for a joint. The joint has to be created before - /// the reaction force can be calculated. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" - /// - public static extern Vector3 get_joint_reaction_force(Hash collisionobject_p1, Hash joint_id_p2); - - - /// - /// Get the reaction force for a joint. The joint has to be created before - /// the reaction force can be calculated. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" - /// - public static extern Vector3 get_joint_reaction_force(Url collisionobject_p1, string joint_id_p2); - - - /// - /// Get the reaction force for a joint. The joint has to be created before - /// the reaction force can be calculated. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_reaction_force({0}, {1})" - /// - public static extern Vector3 get_joint_reaction_force(Url collisionobject_p1, Hash joint_id_p2); - - - /// - /// Get the reaction torque for a joint. The joint has to be created before - /// the reaction torque can be calculated. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" - /// - public static extern double get_joint_reaction_torque(string collisionobject_p1, string joint_id_p2); - - - /// - /// Get the reaction torque for a joint. The joint has to be created before - /// the reaction torque can be calculated. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" - /// - public static extern double get_joint_reaction_torque(string collisionobject_p1, Hash joint_id_p2); - - - /// - /// Get the reaction torque for a joint. The joint has to be created before - /// the reaction torque can be calculated. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" - /// - public static extern double get_joint_reaction_torque(Hash collisionobject_p1, string joint_id_p2); - - - /// - /// Get the reaction torque for a joint. The joint has to be created before - /// the reaction torque can be calculated. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" - /// - public static extern double get_joint_reaction_torque(Hash collisionobject_p1, Hash joint_id_p2); - - - /// - /// Get the reaction torque for a joint. The joint has to be created before - /// the reaction torque can be calculated. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" - /// - public static extern double get_joint_reaction_torque(Url collisionobject_p1, string joint_id_p2); - - - /// - /// Get the reaction torque for a joint. The joint has to be created before - /// the reaction torque can be calculated. - /// Note: Currently only supported in 2D physics. - /// - /// @CSharpLua.Template = "physics.get_joint_reaction_torque({0}, {1})" - /// - public static extern double get_joint_reaction_torque(Url collisionobject_p1, Hash joint_id_p2); - - - /// - /// Set the gravity in runtime. The gravity change is not global, it will only affect - /// the collection that the function is called from. - /// Note: For 2D physics the z component of the gravity vector will be ignored. - /// - /// @CSharpLua.Template = "physics.set_gravity({0})" - /// - public static extern void set_gravity(Vector3 gravity_p1); - - - /// - /// Get the gravity in runtime. The gravity returned is not global, it will return - /// the gravity for the collection that the function is called from. - /// Note: For 2D physics the z component will always be zero. - /// - /// @CSharpLua.Template = "physics.get_gravity()" - /// - public static extern Vector3 get_gravity(); - - - /// - /// Flips the collision shapes horizontally for a collision object - /// - /// @CSharpLua.Template = "physics.set_hflip({0}, {1})" - /// - public static extern void set_hflip(string url_p1, bool flip_p2); - - - /// - /// Flips the collision shapes horizontally for a collision object - /// - /// @CSharpLua.Template = "physics.set_hflip({0}, {1})" - /// - public static extern void set_hflip(Hash url_p1, bool flip_p2); - - - /// - /// Flips the collision shapes horizontally for a collision object - /// - /// @CSharpLua.Template = "physics.set_hflip({0}, {1})" - /// - public static extern void set_hflip(Url url_p1, bool flip_p2); - - - /// - /// Flips the collision shapes vertically for a collision object - /// - /// @CSharpLua.Template = "physics.set_vflip({0}, {1})" - /// - public static extern void set_vflip(string url_p1, bool flip_p2); - - - /// - /// Flips the collision shapes vertically for a collision object - /// - /// @CSharpLua.Template = "physics.set_vflip({0}, {1})" - /// - public static extern void set_vflip(Hash url_p1, bool flip_p2); - - - /// - /// Flips the collision shapes vertically for a collision object - /// - /// @CSharpLua.Template = "physics.set_vflip({0}, {1})" - /// - public static extern void set_vflip(Url url_p1, bool flip_p2); - - - /// - /// Collision objects tend to fall asleep when inactive for a small period of time for - /// efficiency reasons. This function wakes them up. - /// - /// @CSharpLua.Template = "physics.wakeup({0})" - /// - public static extern void wakeup(string url_p1); - - - /// - /// Collision objects tend to fall asleep when inactive for a small period of time for - /// efficiency reasons. This function wakes them up. - /// - /// @CSharpLua.Template = "physics.wakeup({0})" - /// - public static extern void wakeup(Hash url_p1); - - - /// - /// Collision objects tend to fall asleep when inactive for a small period of time for - /// efficiency reasons. This function wakes them up. - /// - /// @CSharpLua.Template = "physics.wakeup({0})" - /// - public static extern void wakeup(Url url_p1); - - - /// - /// Updates the group property of a collision object to the specified - /// string value. The group name should exist i.e. have been used in - /// a collision object in the editor. - /// - /// @CSharpLua.Template = "physics.set_group({0}, {1})" - /// - public static extern void set_group(string url_p1, string group_p2); - - - /// - /// Updates the group property of a collision object to the specified - /// string value. The group name should exist i.e. have been used in - /// a collision object in the editor. - /// - /// @CSharpLua.Template = "physics.set_group({0}, {1})" - /// - public static extern void set_group(Hash url_p1, string group_p2); - - - /// - /// Updates the group property of a collision object to the specified - /// string value. The group name should exist i.e. have been used in - /// a collision object in the editor. - /// - /// @CSharpLua.Template = "physics.set_group({0}, {1})" - /// - public static extern void set_group(Url url_p1, string group_p2); - - - /// - /// Returns the group name of a collision object as a hash. - /// - /// @CSharpLua.Template = "physics.get_group({0})" - /// - public static extern Hash get_group(string url_p1); - - - /// - /// Returns the group name of a collision object as a hash. - /// - /// @CSharpLua.Template = "physics.get_group({0})" - /// - public static extern Hash get_group(Hash url_p1); - - - /// - /// Returns the group name of a collision object as a hash. - /// - /// @CSharpLua.Template = "physics.get_group({0})" - /// - public static extern Hash get_group(Url url_p1); - - - /// - /// Sets or clears the masking of a group (maskbit) in a collision object. - /// - /// @CSharpLua.Template = "physics.set_maskbit({0}, {1}, {2})" - /// - public static extern void set_maskbit(string url_p1, string group_p2, bool maskbit_p3); - - - /// - /// Sets or clears the masking of a group (maskbit) in a collision object. - /// - /// @CSharpLua.Template = "physics.set_maskbit({0}, {1}, {2})" - /// - public static extern void set_maskbit(Hash url_p1, string group_p2, bool maskbit_p3); - - - /// - /// Sets or clears the masking of a group (maskbit) in a collision object. - /// - /// @CSharpLua.Template = "physics.set_maskbit({0}, {1}, {2})" - /// - public static extern void set_maskbit(Url url_p1, string group_p2, bool maskbit_p3); - - - /// - /// Returns true if the specified group is set in the mask of a collision - /// object, false otherwise. - /// - /// @CSharpLua.Template = "physics.get_maskbit({0}, {1})" - /// - public static extern bool get_maskbit(string url_p1, string group_p2); - - - /// - /// Returns true if the specified group is set in the mask of a collision - /// object, false otherwise. - /// - /// @CSharpLua.Template = "physics.get_maskbit({0}, {1})" - /// - public static extern bool get_maskbit(Hash url_p1, string group_p2); - - - /// - /// Returns true if the specified group is set in the mask of a collision - /// object, false otherwise. - /// - /// @CSharpLua.Template = "physics.get_maskbit({0}, {1})" - /// - public static extern bool get_maskbit(Url url_p1, string group_p2); - - - #endregion Defold API -} diff --git a/src/defold/profiler.cs b/src/defold/profiler.cs deleted file mode 100644 index 7db7c7e..0000000 --- a/src/defold/profiler.cs +++ /dev/null @@ -1,143 +0,0 @@ -using System; -using support; -using types; - -/// -/// Profiler API documentation -/// -/// -public static class Profiler -{ - #region Defold API - /// - /// Get the amount of memory used (resident/working set) by the application in bytes, as reported by the OS. - /// This function is not available on HTML5. - /// The values are gathered from internal OS functions which correspond to the following; - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
OSValue
iOS
MacOS

Androd
Linux
Resident memory
WindowsWorking set
HTML5 Not available
- /// - /// @CSharpLua.Template = "profiler.get_memory_usage()" - ///
- public static extern double get_memory_usage(); - - - /// - /// Get the percent of CPU usage by the application, as reported by the OS. - /// This function is not available on HTML5. - /// For some platforms ( Android, Linux and Windows), this information is only available - /// by default in the debug version of the engine. It can be enabled in release version as well - /// by checking track_cpu under profiler in the game.project file. - /// (This means that the engine will sample the CPU usage in intervalls during execution even in release mode.) - /// - /// @CSharpLua.Template = "profiler.get_cpu_usage()" - /// - public static extern double get_cpu_usage(); - - - /// - /// Creates and shows or hides and destroys the on-sceen profiler ui - /// The profiler is a real-time tool that shows the numbers of milliseconds spent - /// in each scope per frame as well as counters. The profiler is very useful for - /// tracking down performance and resource problems. - /// - /// @CSharpLua.Template = "profiler.enable_ui({0})" - /// - public static extern void enable_ui(bool enabled_p1); - - - /// - /// Set the on-screen profile mode - run, pause, record or show peak frame - /// - /// @CSharpLua.Template = "profiler.set_ui_mode({0})" - /// - public static extern void set_ui_mode(ProfilerMode mode_p1); - - - /// - /// Set the on-screen profile view mode - minimized or expanded - /// - /// @CSharpLua.Template = "profiler.set_ui_view_mode({0})" - /// - public static extern void set_ui_view_mode(ProfilerViewMode mode_p1); - - - /// - /// Shows or hides the time the engine waits for vsync in the on-screen profiler - /// Each frame the engine waits for vsync and depending on your vsync settings and how much time - /// your game logic takes this time can dwarf the time in the game logic making it hard to - /// see details in the on-screen profiler graph and lists. - /// Also, by hiding this the FPS times in the header show the time spent each time excuding the - /// time spent waiting for vsync. This shows you how long time your game is spending actively - /// working each frame. - /// This setting also effects the display of recorded frames but does not affect the actual - /// recorded frames so it is possible to toggle this on and off when viewing recorded frames. - /// By default the vsync wait times is displayed in the profiler. - /// - /// @CSharpLua.Template = "profiler.set_ui_vsync_wait_visible({0})" - /// - public static extern void set_ui_vsync_wait_visible(bool visible_p1); - - - /// - /// Get the number of recorded frames in the on-screen profiler ui recording buffer - /// - /// @CSharpLua.Template = "profiler.recorded_frame_count()" - /// - public static extern double recorded_frame_count(); - - - /// - /// Pauses and displays a frame from the recording buffer in the on-screen profiler ui - /// The frame to show can either be an absolute frame or a relative frame to the current frame. - /// - /// @CSharpLua.Template = "profiler.view_recorded_frame({0})" - /// - public static extern void view_recorded_frame(ILuaTable frame_index_p1); - - - /// - /// Send a text to the profiler - /// - /// @CSharpLua.Template = "profiler.log_text({0})" - /// - public static extern void log_text(string text_p1); - - - /// - /// Starts a profile scope. - /// - /// @CSharpLua.Template = "profiler.scope_begin({0})" - /// - public static extern void scope_begin(string name_p1); - - - /// - /// End the current profile scope. - /// - /// @CSharpLua.Template = "profiler.scope_end()" - /// - public static extern void scope_end(); - - - #endregion Defold API -} diff --git a/src/defold/push.cs b/src/defold/push.cs deleted file mode 100644 index 182c415..0000000 --- a/src/defold/push.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using support; -using types; - -/// -/// Push notifications API documentation -/// -/// -public static class Push -{ - #region Defold API - #endregion Defold API -} diff --git a/src/defold/render.cs b/src/defold/render.cs deleted file mode 100644 index 414fc42..0000000 --- a/src/defold/render.cs +++ /dev/null @@ -1,518 +0,0 @@ -using System; -using support; -using types; - -/// -/// Rendering API documentation -/// -/// -public static class Render -{ - #region Defold API - #region Messages - /// - /// - public class draw_debug_text_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("draw_debug_text"); - public override Hash FetchCode() => __CODE__; - - public Vector3 position; - public string text; - public Vector4 color; - } - - - /// - /// - public class draw_line_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("draw_line"); - public override Hash FetchCode() => __CODE__; - - public Vector3 start_point; - public Vector3 end_point; - public Vector4 color; - } - - - /// - /// - public class window_resized_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("window_resized"); - public override Hash FetchCode() => __CODE__; - - public double height; - public double width; - } - - - /// - /// - public class resize_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("resize"); - public override Hash FetchCode() => __CODE__; - - public double height; - public double width; - } - - - /// - /// - public class clear_color_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("clear_color"); - public override Hash FetchCode() => __CODE__; - - public Vector4 color; - } - - - #endregion Messages - - - /// - /// Constant buffers are used to set shader program variables and are optionally passed to the render.draw() function. - /// The buffer's constant elements can be indexed like an ordinary Lua table, but you can't iterate over them with pairs() or ipairs(). - /// - /// @CSharpLua.Template = "render.constant_buffer()" - /// - public static extern LuaTable constant_buffer(); - - - /// - /// Enables a particular render state. The state will be enabled until disabled. - /// - /// @CSharpLua.Template = "render.enable_state({0})" - /// - public static extern void enable_state(RenderState state_p1); - - - /// - /// Disables a render state. - /// - /// @CSharpLua.Template = "render.disable_state({0})" - /// - public static extern void disable_state(RenderState state_p1); - - - /// - /// Set the render viewport to the specified rectangle. - /// - /// @CSharpLua.Template = "render.set_viewport({0}, {1}, {2}, {3})" - /// - public static extern void set_viewport(double x_p1, double y_p2, double width_p3, double height_p4); - - - /// - /// Disables a texture unit for a render target that has previourly been enabled. - /// - /// @CSharpLua.Template = "render.disable_texture({0})" - /// - public static extern void disable_texture(double unit_p1); - - - /// - /// Clear buffers in the currently enabled render target with specified value. If the render target has been created with multiple - /// color attachments, all buffers will be cleared with the same value. - /// - /// @CSharpLua.Template = "render.clear({0})" - /// - public static extern void clear(ILuaTable buffers_p1); - - - /// - /// Draws all objects that match a specified predicate. An optional constant buffer can be - /// provided to override the default constants. If no constants buffer is provided, a default - /// system constants buffer is used containing constants as defined in materials and set through - /// go.set (or particlefx.set_constant) on visual components. - /// - /// @CSharpLua.Template = "render.draw({0})" - /// - public static extern void draw(ILuaTable predicate_p1); - - - /// - /// Draws all objects that match a specified predicate. An optional constant buffer can be - /// provided to override the default constants. If no constants buffer is provided, a default - /// system constants buffer is used containing constants as defined in materials and set through - /// go.set (or particlefx.set_constant) on visual components. - /// - /// @CSharpLua.Template = "render.draw({0}, {1})" - /// - public static extern void draw(ILuaTable predicate_p1, ILuaTable options_p2); - - - /// - /// Draws all 3d debug graphics such as lines drawn with "draw_line" messages and physics visualization. - /// - /// @CSharpLua.Template = "render.draw_debug3d()" - /// - public static extern void draw_debug3d(); - - - /// - /// Draws all 3d debug graphics such as lines drawn with "draw_line" messages and physics visualization. - /// - /// @CSharpLua.Template = "render.draw_debug3d({0})" - /// - public static extern void draw_debug3d(ILuaTable options_p1); - - - /// - /// Sets the view matrix to use when rendering. - /// - /// @CSharpLua.Template = "render.set_view({0})" - /// - public static extern void set_view(Matrix4 matrix_p1); - - - /// - /// Sets the projection matrix to use when rendering. - /// - /// @CSharpLua.Template = "render.set_projection({0})" - /// - public static extern void set_projection(Matrix4 matrix_p1); - - - /// - /// Specifies the arithmetic used when computing pixel values that are written to the frame - /// buffer. In RGBA mode, pixels can be drawn using a function that blends the source RGBA - /// pixel values with the destination pixel values already in the frame buffer. - /// Blending is initially disabled. - /// source_factor specifies which method is used to scale the source color components. - /// destination_factor specifies which method is used to scale the destination color - /// components. - /// Source color components are referred to as (Rs,Gs,Bs,As). - /// Destination color components are referred to as (Rd,Gd,Bd,Ad). - /// The color specified by setting the blendcolor is referred to as (Rc,Gc,Bc,Ac). - /// The source scale factor is referred to as (sR,sG,sB,sA). - /// The destination scale factor is referred to as (dR,dG,dB,dA). - /// The color values have integer values between 0 and (kR,kG,kB,kA), where kc = 2mc - 1 and mc is the number of bitplanes for that color. I.e for 8 bit color depth, color values are between 0 and 255. - /// Available factor constants and corresponding scale factors: - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Factor constantScale factor (fR,fG,fB,fA)
render.BLEND_ZERO(0,0,0,0)
render.BLEND_ONE(1,1,1,1)
render.BLEND_SRC_COLOR(Rs/kR,Gs/kG,Bs/kB,As/kA)
render.BLEND_ONE_MINUS_SRC_COLOR(1,1,1,1) - (Rs/kR,Gs/kG,Bs/kB,As/kA)
render.BLEND_DST_COLOR(Rd/kR,Gd/kG,Bd/kB,Ad/kA)
render.BLEND_ONE_MINUS_DST_COLOR(1,1,1,1) - (Rd/kR,Gd/kG,Bd/kB,Ad/kA)
render.BLEND_SRC_ALPHA(As/kA,As/kA,As/kA,As/kA)
render.BLEND_ONE_MINUS_SRC_ALPHA(1,1,1,1) - (As/kA,As/kA,As/kA,As/kA)
render.BLEND_DST_ALPHA(Ad/kA,Ad/kA,Ad/kA,Ad/kA)
render.BLEND_ONE_MINUS_DST_ALPHA(1,1,1,1) - (Ad/kA,Ad/kA,Ad/kA,Ad/kA)
render.BLEND_CONSTANT_COLOR(Rc,Gc,Bc,Ac)
render.BLEND_ONE_MINUS_CONSTANT_COLOR(1,1,1,1) - (Rc,Gc,Bc,Ac)
render.BLEND_CONSTANT_ALPHA(Ac,Ac,Ac,Ac)
render.BLEND_ONE_MINUS_CONSTANT_ALPHA(1,1,1,1) - (Ac,Ac,Ac,Ac)
render.BLEND_SRC_ALPHA_SATURATE(i,i,i,1) where i = min(As, kA - Ad) /kA
- /// The blended RGBA values of a pixel comes from the following equations: - ///
    - ///
  • Rd = min(kR, Rs * sR + Rd * dR)
  • - ///
  • Gd = min(kG, Gs * sG + Gd * dG)
  • - ///
  • Bd = min(kB, Bs * sB + Bd * dB)
  • - ///
  • Ad = min(kA, As * sA + Ad * dA)
  • - ///
- /// Blend function (render.BLEND_SRC_ALPHA, render.BLEND_ONE_MINUS_SRC_ALPHA) is useful for - /// drawing with transparency when the drawn objects are sorted from farthest to nearest. - /// It is also useful for drawing antialiased points and lines in arbitrary order. - /// - /// @CSharpLua.Template = "render.set_blend_func({0}, {1})" - ///
- public static extern void set_blend_func(BlendFunction source_factor_p1, BlendFunction destination_factor_p2); - - - /// - /// Specifies whether the individual color components in the frame buffer is enabled for writing (true) or disabled (false). For example, if blue is false, nothing is written to the blue component of any pixel in any of the color buffers, regardless of the drawing operation attempted. Note that writing are either enabled or disabled for entire color components, not the individual bits of a component. - /// The component masks are all initially true. - /// - /// @CSharpLua.Template = "render.set_color_mask({0}, {1}, {2}, {3})" - /// - public static extern void set_color_mask(bool red_p1, bool green_p2, bool blue_p3, bool alpha_p4); - - - /// - /// Specifies whether the depth buffer is enabled for writing. The supplied mask governs - /// if depth buffer writing is enabled (true) or disabled (false). - /// The mask is initially true. - /// - /// @CSharpLua.Template = "render.set_depth_mask({0})" - /// - public static extern void set_depth_mask(bool depth_p1); - - - /// - /// The stencil mask controls the writing of individual bits in the stencil buffer. - /// The least significant n bits of the parameter mask, where n is the number of - /// bits in the stencil buffer, specify the mask. - /// Where a 1 bit appears in the mask, the corresponding - /// bit in the stencil buffer can be written. Where a 0 bit appears in the mask, - /// the corresponding bit in the stencil buffer is never written. - /// The mask is initially all 1's. - /// - /// @CSharpLua.Template = "render.set_stencil_mask({0})" - /// - public static extern void set_stencil_mask(double mask_p1); - - - /// - /// Specifies the function that should be used to compare each incoming pixel - /// depth value with the value present in the depth buffer. - /// The comparison is performed only if depth testing is enabled and specifies - /// the conditions under which a pixel will be drawn. - /// Function constants: - ///
    - ///
  • render.COMPARE_FUNC_NEVER (never passes)
  • - ///
  • render.COMPARE_FUNC_LESS (passes if the incoming depth value is less than the stored value)
  • - ///
  • render.COMPARE_FUNC_LEQUAL (passes if the incoming depth value is less than or equal to the stored value)
  • - ///
  • render.COMPARE_FUNC_GREATER (passes if the incoming depth value is greater than the stored value)
  • - ///
  • render.COMPARE_FUNC_GEQUAL (passes if the incoming depth value is greater than or equal to the stored value)
  • - ///
  • render.COMPARE_FUNC_EQUAL (passes if the incoming depth value is equal to the stored value)
  • - ///
  • render.COMPARE_FUNC_NOTEQUAL (passes if the incoming depth value is not equal to the stored value)
  • - ///
  • render.COMPARE_FUNC_ALWAYS (always passes)
  • - ///
- /// The depth function is initially set to render.COMPARE_FUNC_LESS. - /// - /// @CSharpLua.Template = "render.set_depth_func({0})" - ///
- public static extern void set_depth_func(DepthFunction func_p1); - - - /// - /// Stenciling is similar to depth-buffering as it enables and disables drawing on a - /// per-pixel basis. First, GL drawing primitives are drawn into the stencil planes. - /// Second, geometry and images are rendered but using the stencil planes to mask out - /// where to draw. - /// The stencil test discards a pixel based on the outcome of a comparison between the - /// reference value ref and the corresponding value in the stencil buffer. - /// func specifies the comparison function. See the table below for values. - /// The initial value is render.COMPARE_FUNC_ALWAYS. - /// ref specifies the reference value for the stencil test. The value is clamped to - /// the range [0, 2n-1], where n is the number of bitplanes in the stencil buffer. - /// The initial value is 0. - /// mask is ANDed with both the reference value and the stored stencil value when the test - /// is done. The initial value is all 1's. - /// Function constant: - ///
    - ///
  • render.COMPARE_FUNC_NEVER (never passes)
  • - ///
  • render.COMPARE_FUNC_LESS (passes if (ref & mask) < (stencil & mask))
  • - ///
  • render.COMPARE_FUNC_LEQUAL (passes if (ref & mask) <= (stencil & mask))
  • - ///
  • render.COMPARE_FUNC_GREATER (passes if (ref & mask) > (stencil & mask))
  • - ///
  • render.COMPARE_FUNC_GEQUAL (passes if (ref & mask) >= (stencil & mask))
  • - ///
  • render.COMPARE_FUNC_EQUAL (passes if (ref & mask) = (stencil & mask))
  • - ///
  • render.COMPARE_FUNC_NOTEQUAL (passes if (ref & mask) != (stencil & mask))
  • - ///
  • render.COMPARE_FUNC_ALWAYS (always passes)
  • - ///
- /// - /// @CSharpLua.Template = "render.set_stencil_func({0}, {1}, {2})" - ///
- public static extern void set_stencil_func(DepthFunction func_p1, double ref_p2, double mask_p3); - - - /// - /// The stencil test discards a pixel based on the outcome of a comparison between the - /// reference value ref and the corresponding value in the stencil buffer. - /// To control the test, call render.set_stencil_func. - /// This function takes three arguments that control what happens to the stored stencil - /// value while stenciling is enabled. If the stencil test fails, no change is made to the - /// pixel's color or depth buffers, and sfail specifies what happens to the stencil buffer - /// contents. - /// Operator constants: - ///
    - ///
  • render.STENCIL_OP_KEEP (keeps the current value)
  • - ///
  • render.STENCIL_OP_ZERO (sets the stencil buffer value to 0)
  • - ///
  • render.STENCIL_OP_REPLACE (sets the stencil buffer value to ref, as specified by render.set_stencil_func)
  • - ///
  • render.STENCIL_OP_INCR (increments the stencil buffer value and clamp to the maximum representable unsigned value)
  • - ///
  • render.STENCIL_OP_INCR_WRAP (increments the stencil buffer value and wrap to zero when incrementing the maximum representable unsigned value)
  • - ///
  • render.STENCIL_OP_DECR (decrements the current stencil buffer value and clamp to 0)
  • - ///
  • render.STENCIL_OP_DECR_WRAP (decrements the current stencil buffer value and wrap to the maximum representable unsigned value when decrementing zero)
  • - ///
  • render.STENCIL_OP_INVERT (bitwise inverts the current stencil buffer value)
  • - ///
- /// dppass and dpfail specify the stencil buffer actions depending on whether subsequent - /// depth buffer tests succeed (dppass) or fail (dpfail). - /// The initial value for all operators is render.STENCIL_OP_KEEP. - /// - /// @CSharpLua.Template = "render.set_stencil_op({0}, {1}, {2})" - ///
- public static extern void set_stencil_op(StencilOperator sfail_p1, StencilOperator dpfail_p2, StencilOperator dppass_p3); - - - /// - /// Specifies whether front- or back-facing polygons can be culled - /// when polygon culling is enabled. Polygon culling is initially disabled. - /// If mode is render.FACE_FRONT_AND_BACK, no polygons are drawn, but other - /// primitives such as points and lines are drawn. The initial value for - /// face_type is render.FACE_BACK. - /// - /// @CSharpLua.Template = "render.set_cull_face({0})" - /// - public static extern void set_cull_face(FaceType face_type_p1); - - - /// - /// Sets the scale and units used to calculate depth values. - /// If render.STATE_POLYGON_OFFSET_FILL is enabled, each fragment's depth value - /// is offset from its interpolated value (depending on the depth value of the - /// appropriate vertices). Polygon offset can be used when drawing decals, rendering - /// hidden-line images etc. - /// factor specifies a scale factor that is used to create a variable depth - /// offset for each polygon. The initial value is 0. - /// units is multiplied by an implementation-specific value to create a - /// constant depth offset. The initial value is 0. - /// The value of the offset is computed as factor × DZ + r × units - /// DZ is a measurement of the depth slope of the polygon which is the change in z (depth) - /// values divided by the change in either x or y coordinates, as you traverse a polygon. - /// The depth values are in window coordinates, clamped to the range [0, 1]. - /// r is the smallest value that is guaranteed to produce a resolvable difference. - /// It's value is an implementation-specific constant. - /// The offset is added before the depth test is performed and before the - /// value is written into the depth buffer. - /// - /// @CSharpLua.Template = "render.set_polygon_offset({0}, {1})" - /// - public static extern void set_polygon_offset(double factor_p1, double units_p2); - - - /// - /// Returns the logical window width that is set in the "game.project" settings. - /// Note that the actual window pixel size can change, either by device constraints - /// or user input. - /// - /// @CSharpLua.Template = "render.get_width()" - /// - public static extern double get_width(); - - - /// - /// Returns the logical window height that is set in the "game.project" settings. - /// Note that the actual window pixel size can change, either by device constraints - /// or user input. - /// - /// @CSharpLua.Template = "render.get_height()" - /// - public static extern double get_height(); - - - /// - /// Returns the actual physical window width. - /// Note that this value might differ from the logical width that is set in the - /// "game.project" settings. - /// - /// @CSharpLua.Template = "render.get_window_width()" - /// - public static extern double get_window_width(); - - - /// - /// Returns the actual physical window height. - /// Note that this value might differ from the logical height that is set in the - /// "game.project" settings. - /// - /// @CSharpLua.Template = "render.get_window_height()" - /// - public static extern double get_window_height(); - - - /// - /// This function returns a new render predicate for objects with materials matching - /// the provided material tags. The provided tags are combined into a bit mask - /// for the predicate. If multiple tags are provided, the predicate matches materials - /// with all tags ANDed together. - /// The current limit to the number of tags that can be defined is 64. - /// - /// @CSharpLua.Template = "render.predicate({0})" - /// - public static extern ILuaTable predicate(ILuaTable tags_p1); - - - /// - /// If another material was already enabled, it will be automatically disabled - /// and the specified material is used instead. - /// The name of the material must be specified in the ".render" resource set - /// in the "game.project" setting. - /// - /// @CSharpLua.Template = "render.enable_material({0})" - /// - public static extern void enable_material(string material_id_p1); - - - /// - /// If another material was already enabled, it will be automatically disabled - /// and the specified material is used instead. - /// The name of the material must be specified in the ".render" resource set - /// in the "game.project" setting. - /// - /// @CSharpLua.Template = "render.enable_material({0})" - /// - public static extern void enable_material(Hash material_id_p1); - - - /// - /// If a material is currently enabled, disable it. - /// The name of the material must be specified in the ".render" resource set - /// in the "game.project" setting. - /// - /// @CSharpLua.Template = "render.disable_material()" - /// - public static extern void disable_material(); - - - #endregion Defold API -} diff --git a/src/defold/resource.cs b/src/defold/resource.cs deleted file mode 100644 index a44ac83..0000000 --- a/src/defold/resource.cs +++ /dev/null @@ -1,338 +0,0 @@ -using System; -using support; -using types; - -/// -/// Resource API documentation -/// -/// -public static class Resource -{ - #region Defold API - /// - /// Constructor-like function with two purposes: - ///
    - ///
  • Load the specified resource as part of loading the script
  • - ///
  • Return a hash to the run-time version of the resource
  • - ///
- /// This function can only be called within go.property function calls. - /// - /// @CSharpLua.Template = "resource.material()" - ///
- public static extern Hash material(); - - - /// - /// Constructor-like function with two purposes: - ///
    - ///
  • Load the specified resource as part of loading the script
  • - ///
  • Return a hash to the run-time version of the resource
  • - ///
- /// This function can only be called within go.property function calls. - /// - /// @CSharpLua.Template = "resource.material({0})" - ///
- public static extern Hash material(string path_p1); - - - /// - /// Constructor-like function with two purposes: - ///
    - ///
  • Load the specified resource as part of loading the script
  • - ///
  • Return a hash to the run-time version of the resource
  • - ///
- /// This function can only be called within go.property function calls. - /// - /// @CSharpLua.Template = "resource.font()" - ///
- public static extern Hash font(); - - - /// - /// Constructor-like function with two purposes: - ///
    - ///
  • Load the specified resource as part of loading the script
  • - ///
  • Return a hash to the run-time version of the resource
  • - ///
- /// This function can only be called within go.property function calls. - /// - /// @CSharpLua.Template = "resource.font({0})" - ///
- public static extern Hash font(string path_p1); - - - /// - /// Constructor-like function with two purposes: - ///
    - ///
  • Load the specified resource as part of loading the script
  • - ///
  • Return a hash to the run-time version of the resource
  • - ///
- /// This function can only be called within go.property function calls. - /// - /// @CSharpLua.Template = "resource.texture()" - ///
- public static extern Hash texture(); - - - /// - /// Constructor-like function with two purposes: - ///
    - ///
  • Load the specified resource as part of loading the script
  • - ///
  • Return a hash to the run-time version of the resource
  • - ///
- /// This function can only be called within go.property function calls. - /// - /// @CSharpLua.Template = "resource.texture({0})" - ///
- public static extern Hash texture(string path_p1); - - - /// - /// Constructor-like function with two purposes: - ///
    - ///
  • Load the specified resource as part of loading the script
  • - ///
  • Return a hash to the run-time version of the resource
  • - ///
- /// This function can only be called within go.property function calls. - /// - /// @CSharpLua.Template = "resource.atlas()" - ///
- public static extern Hash atlas(); - - - /// - /// Constructor-like function with two purposes: - ///
    - ///
  • Load the specified resource as part of loading the script
  • - ///
  • Return a hash to the run-time version of the resource
  • - ///
- /// This function can only be called within go.property function calls. - /// - /// @CSharpLua.Template = "resource.atlas({0})" - ///
- public static extern Hash atlas(string path_p1); - - - /// - /// Constructor-like function with two purposes: - ///
    - ///
  • Load the specified resource as part of loading the script
  • - ///
  • Return a hash to the run-time version of the resource
  • - ///
- /// This function can only be called within go.property function calls. - /// - /// @CSharpLua.Template = "resource.buffer()" - ///
- public static extern Hash buffer(); - - - /// - /// Constructor-like function with two purposes: - ///
    - ///
  • Load the specified resource as part of loading the script
  • - ///
  • Return a hash to the run-time version of the resource
  • - ///
- /// This function can only be called within go.property function calls. - /// - /// @CSharpLua.Template = "resource.buffer({0})" - ///
- public static extern Hash buffer(string path_p1); - - - /// - /// Constructor-like function with two purposes: - ///
    - ///
  • Load the specified resource as part of loading the script
  • - ///
  • Return a hash to the run-time version of the resource
  • - ///
- /// This function can only be called within go.property function calls. - /// - /// @CSharpLua.Template = "resource.tile_source()" - ///
- public static extern Hash tile_source(); - - - /// - /// Constructor-like function with two purposes: - ///
    - ///
  • Load the specified resource as part of loading the script
  • - ///
  • Return a hash to the run-time version of the resource
  • - ///
- /// This function can only be called within go.property function calls. - /// - /// @CSharpLua.Template = "resource.tile_source({0})" - ///
- public static extern Hash tile_source(string path_p1); - - - /// - /// Sets the resource data for a specific resource - /// - /// @CSharpLua.Template = "resource.set({0}, {1})" - /// - public static extern void set(string path_p1, DataBuffer buffer_p2); - - - /// - /// Sets the resource data for a specific resource - /// - /// @CSharpLua.Template = "resource.set({0}, {1})" - /// - public static extern void set(Hash path_p1, DataBuffer buffer_p2); - - - /// - /// Loads the resource data for a specific resource. - /// - /// @CSharpLua.Template = "resource.load({0})" - /// - public static extern DataBuffer load(string path_p1); - - - /// - /// Sets the pixel data for a specific texture. - /// - /// @CSharpLua.Template = "resource.set_texture({0}, {1}, {2})" - /// - public static extern void set_texture(Hash path_p1, ILuaTable table_p2, DataBuffer buffer_p3); - - - /// - /// Sets the pixel data for a specific texture. - /// - /// @CSharpLua.Template = "resource.set_texture({0}, {1}, {2})" - /// - public static extern void set_texture(string path_p1, ILuaTable table_p2, DataBuffer buffer_p3); - - - /// - /// Update internal sound resource (wavc/oggc) with new data - /// - /// @CSharpLua.Template = "resource.set_sound({0}, {1})" - /// - public static extern void set_sound(Hash path_p1, string buffer_p2); - - - /// - /// Update internal sound resource (wavc/oggc) with new data - /// - /// @CSharpLua.Template = "resource.set_sound({0}, {1})" - /// - public static extern void set_sound(string path_p1, string buffer_p2); - - - /// - /// gets the buffer from a resource - /// - /// @CSharpLua.Template = "resource.get_buffer({0})" - /// - public static extern DataBuffer get_buffer(Hash path_p1); - - - /// - /// gets the buffer from a resource - /// - /// @CSharpLua.Template = "resource.get_buffer({0})" - /// - public static extern DataBuffer get_buffer(string path_p1); - - - /// - /// sets the buffer of a resource - /// - /// @CSharpLua.Template = "resource.set_buffer({0}, {1})" - /// - public static extern void set_buffer(Hash path_p1, DataBuffer buffer_p2); - - - /// - /// sets the buffer of a resource - /// - /// @CSharpLua.Template = "resource.set_buffer({0}, {1})" - /// - public static extern void set_buffer(string path_p1, DataBuffer buffer_p2); - - - /// - /// Gets the text metrics from a font - /// - /// @CSharpLua.Template = "resource.get_text_metrics({0}, {1})" - /// - public static extern ILuaTable get_text_metrics(Hash url_p1, string text_p2); - - - /// - /// Gets the text metrics from a font - /// - /// @CSharpLua.Template = "resource.get_text_metrics({0}, {1}, {2})" - /// - public static extern ILuaTable get_text_metrics(Hash url_p1, string text_p2, ILuaTable options_p3); - - - /// - /// Return a reference to the Manifest that is currently loaded. - /// - /// @CSharpLua.Template = "resource.get_current_manifest()" - /// - public static extern double get_current_manifest(); - - - /// - /// add a resource to the data archive and runtime index. The resource will be verified - /// internally before being added to the data archive. - /// - /// @CSharpLua.Template = "resource.store_resource({0}, {1}, {2}, {3})" - /// - public static extern void store_resource(double manifest_reference_p1, string data_p2, string hexdigest_p3, Action callback_p4); - - - /// - /// Create a new manifest from a buffer. The created manifest is verified - /// by ensuring that the manifest was signed using the bundled public/private - /// key-pair during the bundle process and that the manifest supports the current - /// running engine version. Once the manifest is verified it is stored on device. - /// The next time the engine starts (or is rebooted) it will look for the stored - /// manifest before loading resources. Storing a new manifest allows the - /// developer to update the game, modify existing resources, or add new - /// resources to the game through LiveUpdate. - /// - /// @CSharpLua.Template = "resource.store_manifest({0}, {1})" - /// - public static extern void store_manifest(string manifest_buffer_p1, Action callback_p2); - - - /// - /// Stores a zip file and uses it for live update content. The contents of the - /// zip file will be verified against the manifest to ensure file integrity. - /// It is possible to opt out of the resource verification using an option passed - /// to this function. - /// The path is stored in the (internal) live update location. - /// - /// @CSharpLua.Template = "resource.store_archive({0}, {1})" - /// - public static extern void store_archive(string path_p1, Action callback_p2); - - - /// - /// Stores a zip file and uses it for live update content. The contents of the - /// zip file will be verified against the manifest to ensure file integrity. - /// It is possible to opt out of the resource verification using an option passed - /// to this function. - /// The path is stored in the (internal) live update location. - /// - /// @CSharpLua.Template = "resource.store_archive({0}, {1}, {2})" - /// - public static extern void store_archive(string path_p1, Action callback_p2, ILuaTable options_p3); - - - /// - /// Is any liveupdate data mounted and currently in use? - /// This can be used to determine if a new manifest or zip file should be downloaded. - /// - /// @CSharpLua.Template = "resource.is_using_liveupdate_data()" - /// - public static extern bool is_using_liveupdate_data(); - - - #endregion Defold API -} diff --git a/src/defold/sound.cs b/src/defold/sound.cs deleted file mode 100644 index e724d5e..0000000 --- a/src/defold/sound.cs +++ /dev/null @@ -1,646 +0,0 @@ -using System; -using support; -using types; - -/// -/// Sound API documentation -/// -/// -public class Sound : BuiltInComponentBase -{ - #region Defold API - #region Messages - /// - /// - public class play_sound_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("play_sound"); - public override Hash FetchCode() => __CODE__; - - public double delay; - public double gain; - public double play_id; - } - - - /// - /// - public class stop_sound_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("stop_sound"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class set_gain_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("set_gain"); - public override Hash FetchCode() => __CODE__; - - public double gain; - } - - - /// - /// - public class sound_done_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("sound_done"); - public override Hash FetchCode() => __CODE__; - - public double play_id; - } - - - #endregion Messages - - - /// - /// Checks if background music is playing, e.g. from iTunes. - /// On non mobile platforms, - /// this function always return false. - /// On Android you can only get a correct reading - /// of this state if your game is not playing any sounds itself. This is a limitation - /// in the Android SDK. If your game is playing any sounds, even with a gain of zero, this - /// function will return false. - /// The best time to call this function is: - ///
    - ///
  • In the init function of your main collection script before any sounds are triggered
  • - ///
  • In a window listener callback when the window.WINDOW_EVENT_FOCUS_GAINED event is received
  • - ///
- /// Both those times will give you a correct reading of the state even when your application is - /// swapped out and in while playing sounds and it works equally well on Android and iOS. - /// - /// @CSharpLua.Template = "sound.is_music_playing()" - ///
- public static extern bool is_music_playing(); - - - /// - /// Get RMS (Root Mean Square) value from mixer group. This value is the - /// square root of the mean (average) value of the squared function of - /// the instantaneous values. - /// For instance: for a sinewave signal with a peak gain of -1.94 dB (0.8 linear), - /// the RMS is 0.8 × 1/sqrt(2) which is about 0.566. - /// Note the returned value might be an approximation and in particular - /// the effective window might be larger than specified. - /// - /// @CSharpLua.Template = "sound.get_rms({0}, {1})" - /// - public static extern double get_rms(string group_p1, double window_p2, out double rms_r_o1); - - - /// - /// Get RMS (Root Mean Square) value from mixer group. This value is the - /// square root of the mean (average) value of the squared function of - /// the instantaneous values. - /// For instance: for a sinewave signal with a peak gain of -1.94 dB (0.8 linear), - /// the RMS is 0.8 × 1/sqrt(2) which is about 0.566. - /// Note the returned value might be an approximation and in particular - /// the effective window might be larger than specified. - /// - /// @CSharpLua.Template = "sound.get_rms({0}, {1})" - /// - public static extern double get_rms(Hash group_p1, double window_p2, out double rms_r_o1); - - - /// - /// Get peak value from mixer group. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// Also note that the returned value might be an approximation and in particular - /// the effective window might be larger than specified. - /// - /// @CSharpLua.Template = "sound.get_peak({0}, {1})" - /// - public static extern double get_peak(string group_p1, double window_p2, out double peak_r_o1); - - - /// - /// Get peak value from mixer group. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// Also note that the returned value might be an approximation and in particular - /// the effective window might be larger than specified. - /// - /// @CSharpLua.Template = "sound.get_peak({0}, {1})" - /// - public static extern double get_peak(Hash group_p1, double window_p2, out double peak_r_o1); - - - /// - /// Set mixer group gain - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// - /// @CSharpLua.Template = "sound.set_group_gain({0}, {1})" - /// - public static extern void set_group_gain(string group_p1, double gain_p2); - - - /// - /// Set mixer group gain - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// - /// @CSharpLua.Template = "sound.set_group_gain({0}, {1})" - /// - public static extern void set_group_gain(Hash group_p1, double gain_p2); - - - /// - /// Get mixer group gain - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// - /// @CSharpLua.Template = "sound.get_group_gain({0})" - /// - public static extern double get_group_gain(string group_p1); - - - /// - /// Get mixer group gain - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// - /// @CSharpLua.Template = "sound.get_group_gain({0})" - /// - public static extern double get_group_gain(Hash group_p1); - - - /// - /// Get a table of all mixer group names (hashes). - /// - /// @CSharpLua.Template = "sound.get_groups()" - /// - public static extern ILuaTable get_groups(); - - - /// - /// Get a mixer group name as a string. - /// This function is to be used for debugging and - /// development tooling only. The function does a reverse hash lookup, which does not - /// return a proper string value when the game is built in release mode. - /// - /// @CSharpLua.Template = "sound.get_group_name({0})" - /// - public static extern string get_group_name(string group_p1); - - - /// - /// Get a mixer group name as a string. - /// This function is to be used for debugging and - /// development tooling only. The function does a reverse hash lookup, which does not - /// return a proper string value when the game is built in release mode. - /// - /// @CSharpLua.Template = "sound.get_group_name({0})" - /// - public static extern string get_group_name(Hash group_p1); - - - /// - /// Checks if a phone call is active. If there is an active phone call all - /// other sounds will be muted until the phone call is finished. - /// On non mobile platforms, - /// this function always return false. - /// - /// @CSharpLua.Template = "sound.is_phone_call_active()" - /// - public static extern bool is_phone_call_active(); - - - /// - /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. - /// - /// @CSharpLua.Template = "sound.play({0})" - /// - public static extern double play(string url_p1); - - - /// - /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. - /// - /// @CSharpLua.Template = "sound.play({0}, {1})" - /// - public static extern double play(string url_p1, ILuaTable play_properties_p2); - - - /// - /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. - /// - /// @CSharpLua.Template = "sound.play({0}, {1}, {2})" - /// - public static extern double play(string url_p1, ILuaTable play_properties_p2, Action complete_function_p3); - - - /// - /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. - /// - /// @CSharpLua.Template = "sound.play({0})" - /// - public static extern double play(Hash url_p1); - - - /// - /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. - /// - /// @CSharpLua.Template = "sound.play({0}, {1})" - /// - public static extern double play(Hash url_p1, ILuaTable play_properties_p2); - - - /// - /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. - /// - /// @CSharpLua.Template = "sound.play({0}, {1}, {2})" - /// - public static extern double play(Hash url_p1, ILuaTable play_properties_p2, Action complete_function_p3); - - - /// - /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. - /// - /// @CSharpLua.Template = "sound.play({0})" - /// - public static extern double play(Url url_p1); - - - /// - /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. - /// - /// @CSharpLua.Template = "sound.play({0}, {1})" - /// - public static extern double play(Url url_p1, ILuaTable play_properties_p2); - - - /// - /// Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. - /// - /// @CSharpLua.Template = "sound.play({0}, {1}, {2})" - /// - public static extern double play(Url url_p1, ILuaTable play_properties_p2, Action complete_function_p3); - - - /// - /// Stop playing all active voices - /// - /// @CSharpLua.Template = "sound.stop({0})" - /// - public static extern void stop(string url_p1); - - - /// - /// Stop playing all active voices - /// - /// @CSharpLua.Template = "sound.stop({0})" - /// - public static extern void stop(Hash url_p1); - - - /// - /// Stop playing all active voices - /// - /// @CSharpLua.Template = "sound.stop({0})" - /// - public static extern void stop(Url url_p1); - - - /// - /// Pause all active voices - /// - /// @CSharpLua.Template = "sound.pause({0}, {1})" - /// - public static extern void pause(string url_p1, bool pause_p2); - - - /// - /// Pause all active voices - /// - /// @CSharpLua.Template = "sound.pause({0}, {1})" - /// - public static extern void pause(Hash url_p1, bool pause_p2); - - - /// - /// Pause all active voices - /// - /// @CSharpLua.Template = "sound.pause({0}, {1})" - /// - public static extern void pause(Url url_p1, bool pause_p2); - - - /// - /// Set gain on all active playing voices of a sound. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// - /// @CSharpLua.Template = "sound.set_gain({0})" - /// - public static extern void set_gain(string url_p1); - - - /// - /// Set gain on all active playing voices of a sound. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// - /// @CSharpLua.Template = "sound.set_gain({0}, {1})" - /// - public static extern void set_gain(string url_p1, double gain_p2); - - - /// - /// Set gain on all active playing voices of a sound. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// - /// @CSharpLua.Template = "sound.set_gain({0})" - /// - public static extern void set_gain(Hash url_p1); - - - /// - /// Set gain on all active playing voices of a sound. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// - /// @CSharpLua.Template = "sound.set_gain({0}, {1})" - /// - public static extern void set_gain(Hash url_p1, double gain_p2); - - - /// - /// Set gain on all active playing voices of a sound. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// - /// @CSharpLua.Template = "sound.set_gain({0})" - /// - public static extern void set_gain(Url url_p1); - - - /// - /// Set gain on all active playing voices of a sound. - /// Note that gain is in linear scale, between 0 and 1. - /// To get the dB value from the gain, use the formula 20 * log(gain). - /// Inversely, to find the linear value from a dB value, use the formula - /// 10db/20. - /// - /// @CSharpLua.Template = "sound.set_gain({0}, {1})" - /// - public static extern void set_gain(Url url_p1, double gain_p2); - - - /// - /// Set panning on all active playing voices of a sound. - /// The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. - /// - /// @CSharpLua.Template = "sound.set_pan({0})" - /// - public static extern void set_pan(string url_p1); - - - /// - /// Set panning on all active playing voices of a sound. - /// The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. - /// - /// @CSharpLua.Template = "sound.set_pan({0}, {1})" - /// - public static extern void set_pan(string url_p1, double pan_p2); - - - /// - /// Set panning on all active playing voices of a sound. - /// The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. - /// - /// @CSharpLua.Template = "sound.set_pan({0})" - /// - public static extern void set_pan(Hash url_p1); - - - /// - /// Set panning on all active playing voices of a sound. - /// The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. - /// - /// @CSharpLua.Template = "sound.set_pan({0}, {1})" - /// - public static extern void set_pan(Hash url_p1, double pan_p2); - - - /// - /// Set panning on all active playing voices of a sound. - /// The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. - /// - /// @CSharpLua.Template = "sound.set_pan({0})" - /// - public static extern void set_pan(Url url_p1); - - - /// - /// Set panning on all active playing voices of a sound. - /// The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. - /// - /// @CSharpLua.Template = "sound.set_pan({0}, {1})" - /// - public static extern void set_pan(Url url_p1, double pan_p2); - - - #endregion Defold API - - - public int Play(string sound) - { - return (int)play(sound); - } - - - public int Play(Hash sound) - { - return (int)play(sound); - } - - - public int Play(Url sound) - { - return (int)play(sound); - } - - - public int Play(string sound, - double delay = 0, - double gain = 1, - double pan = 0, - double speed = 1, - Action onCompleteCallback = null) - { - LuaTable table = new LuaTable(); - table.Add("delay", delay); - table.Add("gain", gain); - table.Add("pan", pan); - table.Add("speed", speed); - - if (onCompleteCallback != null) - { - void callback(object o, Hash hash, dynamic arg3, Url arg4) - { - onCompleteCallback(this, hash, arg3["play_id"], arg4); - } - - return (int)play(sound, table, callback); - } - else - return (int)play(sound, table); - } - - public int Play(Hash sound, - double delay = 0, - double gain = 1, - double pan = 0, - double speed = 1, - Action onCompleteCallback = null) - { - LuaTable table = new LuaTable(); - table.Add("delay", delay); - table.Add("gain", gain); - table.Add("pan", pan); - table.Add("speed", speed); - - if (onCompleteCallback != null) - { - void callback(object o, Hash hash, dynamic arg3, Url arg4) - { - onCompleteCallback(this, hash, arg3["play_id"], arg4); - } - - return (int)play(sound, table, callback); - } - else - return (int)play(sound, table); - } - - public int Play(Url sound, - double delay = 0, - double gain = 1, - double pan = 0, - double speed = 1, - Action onCompleteCallback = null) - { - LuaTable table = new LuaTable(); - table.Add("delay", delay); - table.Add("gain", gain); - table.Add("pan", pan); - table.Add("speed", speed); - - if (onCompleteCallback != null) - { - void callback(object o, Hash hash, dynamic arg3, Url arg4) - { - onCompleteCallback(this, hash, arg3["play_id"], arg4); - } - - return (int)play(sound, table, callback); - } - else - return (int)play(sound, table); - } - - - public void Stop() - { - stop(this); - } - - - public void Pause(bool shouldPause = true) - { - pause(this, shouldPause); - } - - - public void Unpause() - { - pause(this, false); - } - - - public void SetGain(double gain) - { - set_gain(this, gain); - } - - - public void SetPan(double pan) - { - set_pan(this, pan); - } -} diff --git a/src/defold/sprite.cs b/src/defold/sprite.cs deleted file mode 100644 index ae8b9e3..0000000 --- a/src/defold/sprite.cs +++ /dev/null @@ -1,296 +0,0 @@ -using System; -using support; -using types; - -/// -/// Sprite API documentation -/// -/// -public class Sprite : BuiltInComponentBase -{ - #region Defold API - #region Messages - /// - /// - public class play_animation_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("play_animation"); - public override Hash FetchCode() => __CODE__; - - public Hash id; - } - - - /// - /// - public class animation_done_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("animation_done"); - public override Hash FetchCode() => __CODE__; - - public double current_tile; - public Hash id; - } - - - #endregion Messages - - - /// - /// Sets horizontal flipping of the provided sprite's animations. - /// The sprite is identified by its URL. - /// If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. - /// - /// @CSharpLua.Template = "sprite.set_hflip({0}, {1})" - /// - public static extern void set_hflip(string url_p1, bool flip_p2); - - - /// - /// Sets horizontal flipping of the provided sprite's animations. - /// The sprite is identified by its URL. - /// If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. - /// - /// @CSharpLua.Template = "sprite.set_hflip({0}, {1})" - /// - public static extern void set_hflip(Hash url_p1, bool flip_p2); - - - /// - /// Sets horizontal flipping of the provided sprite's animations. - /// The sprite is identified by its URL. - /// If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. - /// - /// @CSharpLua.Template = "sprite.set_hflip({0}, {1})" - /// - public static extern void set_hflip(Url url_p1, bool flip_p2); - - - /// - /// Sets vertical flipping of the provided sprite's animations. - /// The sprite is identified by its URL. - /// If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. - /// - /// @CSharpLua.Template = "sprite.set_vflip({0}, {1})" - /// - public static extern void set_vflip(string url_p1, bool flip_p2); - - - /// - /// Sets vertical flipping of the provided sprite's animations. - /// The sprite is identified by its URL. - /// If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. - /// - /// @CSharpLua.Template = "sprite.set_vflip({0}, {1})" - /// - public static extern void set_vflip(Hash url_p1, bool flip_p2); - - - /// - /// Sets vertical flipping of the provided sprite's animations. - /// The sprite is identified by its URL. - /// If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. - /// - /// @CSharpLua.Template = "sprite.set_vflip({0}, {1})" - /// - public static extern void set_vflip(Url url_p1, bool flip_p2); - - - /// - /// Play an animation on a sprite component from its tile set - /// An optional completion callback function can be provided that will be called when - /// the animation has completed playing. If no function is provided, - /// a animation_done message is sent to the script that started the animation. - /// - /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1})" - /// - public static extern void play_flipbook(string url_p1, Hash id_p2); - - - /// - /// Play an animation on a sprite component from its tile set - /// An optional completion callback function can be provided that will be called when - /// the animation has completed playing. If no function is provided, - /// a animation_done message is sent to the script that started the animation. - /// - /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2})" - /// - public static extern void play_flipbook(string url_p1, Hash id_p2, Action complete_function_p3); - - - /// - /// Play an animation on a sprite component from its tile set - /// An optional completion callback function can be provided that will be called when - /// the animation has completed playing. If no function is provided, - /// a animation_done message is sent to the script that started the animation. - /// - /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2}, {3})" - /// - public static extern void play_flipbook(string url_p1, Hash id_p2, Action complete_function_p3, ILuaTable play_properties_p4); - - - /// - /// Play an animation on a sprite component from its tile set - /// An optional completion callback function can be provided that will be called when - /// the animation has completed playing. If no function is provided, - /// a animation_done message is sent to the script that started the animation. - /// - /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1})" - /// - public static extern void play_flipbook(Hash url_p1, Hash id_p2); - - - /// - /// Play an animation on a sprite component from its tile set - /// An optional completion callback function can be provided that will be called when - /// the animation has completed playing. If no function is provided, - /// a animation_done message is sent to the script that started the animation. - /// - /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2})" - /// - public static extern void play_flipbook(Hash url_p1, Hash id_p2, Action complete_function_p3); - - - /// - /// Play an animation on a sprite component from its tile set - /// An optional completion callback function can be provided that will be called when - /// the animation has completed playing. If no function is provided, - /// a animation_done message is sent to the script that started the animation. - /// - /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2}, {3})" - /// - public static extern void play_flipbook(Hash url_p1, Hash id_p2, Action complete_function_p3, ILuaTable play_properties_p4); - - - /// - /// Play an animation on a sprite component from its tile set - /// An optional completion callback function can be provided that will be called when - /// the animation has completed playing. If no function is provided, - /// a animation_done message is sent to the script that started the animation. - /// - /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1})" - /// - public static extern void play_flipbook(Url url_p1, Hash id_p2); - - - /// - /// Play an animation on a sprite component from its tile set - /// An optional completion callback function can be provided that will be called when - /// the animation has completed playing. If no function is provided, - /// a animation_done message is sent to the script that started the animation. - /// - /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2})" - /// - public static extern void play_flipbook(Url url_p1, Hash id_p2, Action complete_function_p3); - - - /// - /// Play an animation on a sprite component from its tile set - /// An optional completion callback function can be provided that will be called when - /// the animation has completed playing. If no function is provided, - /// a animation_done message is sent to the script that started the animation. - /// - /// @CSharpLua.Template = "sprite.play_flipbook({0}, {1}, {2}, {3})" - /// - public static extern void play_flipbook(Url url_p1, Hash id_p2, Action complete_function_p3, ILuaTable play_properties_p4); - - - #endregion Defold API - - - private bool _cachedFlipHorizontal; - private bool _cachedFlipVertical; - - - public bool FlipHorizontal - { - get - { - return _cachedFlipHorizontal; - } - set - { - _cachedFlipHorizontal = value; - set_hflip(this, value); - } - } - - - public bool FlipVertical - { - get - { - return _cachedFlipVertical; - } - set - { - _cachedFlipVertical = value; - - set_vflip(this, value); - } - } - - - public Vector2 Size => (dynamic)Go.get(this, "size"); - - public Vector2 Scale - { - get => (dynamic)Go.get(this, "scale"); - set => Go.set(this, "scale", value); - } - - public Hash Image - { - get => (dynamic)Go.get(this, "image"); - set => Go.set(this, "image", value); - } - - public Hash Material - { - get => (dynamic)Go.get(this, "material"); - set => Go.set(this, "material", value); - } - - public double Cursor - { - get => (dynamic)Go.get(this, "cursor"); - set => Go.set(this, "cursor", value); - } - - public double PlaybackRate - { - get => (dynamic)Go.get(this, "playback_rate"); - set => Go.set(this, "playback_rate", value); - } - - public Hash Animation => (dynamic)Go.get(this, "animation"); - - - public void PlayFlipbook(Hash animation) - { - play_flipbook(this, animation); - } - - - public void PlayFlipbook(Hash animation, Action onComplete) - { - void callback(object target, Hash hash, ILuaTable table, Url url) - { - onComplete(this, hash, table, url); - } - - play_flipbook(this, animation, callback); - } - - - public void PlayFlipbook(Hash animation, Action onComplete, - ILuaTable playProperties) - { - void callback(object target, Hash hash, ILuaTable table, Url url) - { - onComplete(this, hash, table, url); - } - - play_flipbook(this, animation, callback, playProperties); - } -} diff --git a/src/defold/support/DoNotGenerateAttribute.cs b/src/defold/support/DoNotGenerateAttribute.cs deleted file mode 100644 index 25dc0ec..0000000 --- a/src/defold/support/DoNotGenerateAttribute.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace support -{ - [AttributeUsage(AttributeTargets.Class, Inherited = false)] - public class DoNotGenerateAttribute : Attribute - { - } -} \ No newline at end of file diff --git a/src/defold/sys.cs b/src/defold/sys.cs deleted file mode 100644 index 0fb8760..0000000 --- a/src/defold/sys.cs +++ /dev/null @@ -1,332 +0,0 @@ -using System; -using support; -using types; - -/// -/// System API documentation -/// -/// -public static class Sys -{ - #region Defold API - #region Messages - /// - /// - public class exit_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("exit"); - public override Hash FetchCode() => __CODE__; - - public double code; - } - - - /// - /// - public class toggle_profile_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("toggle_profile"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class toggle_physics_debug_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("toggle_physics_debug"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class start_record_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("start_record"); - public override Hash FetchCode() => __CODE__; - - public string file_name; - public double frame_period; - public double fps; - } - - - /// - /// - public class stop_record_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("stop_record"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class reboot_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("reboot"); - public override Hash FetchCode() => __CODE__; - - public string arg1; - public string arg2; - public string arg3; - public string arg4; - public string arg5; - public string arg6; - } - - - /// - /// - public class set_vsync_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("set_vsync"); - public override Hash FetchCode() => __CODE__; - - } - - - /// - /// - public class set_update_frequency_message : MessageImplementation - { - public static Hash __CODE__ = Defold.hash("set_update_frequency"); - public override Hash FetchCode() => __CODE__; - - } - - - #endregion Messages - - - /// - /// The table can later be loaded by sys.load. - /// Use sys.get_save_file to obtain a valid location for the file. - /// Internally, this function uses a workspace buffer sized output file sized 512kb. - /// This size reflects the output file size which must not exceed this limit. - /// Additionally, the total number of rows that any one table may contain is limited to 65536 - /// (i.e. a 16 bit range). When tables are used to represent arrays, the values of - /// keys are permitted to fall within a 32 bit range, supporting sparse arrays, however - /// the limit on the total number of rows remains in effect. - /// - /// @CSharpLua.Template = "sys.save({0}, {1})" - /// - public static extern bool save(string filename_p1, ILuaTable table_p2); - - - /// - /// If the file exists, it must have been created by sys.save to be loaded. - /// - /// @CSharpLua.Template = "sys.load({0})" - /// - public static extern ILuaTable load(string filename_p1); - - - /// - /// The save-file path is operating system specific and is typically located under the user's home directory. - /// - /// @CSharpLua.Template = "sys.get_save_file({0}, {1})" - /// - public static extern string get_save_file(string application_id_p1, string file_name_p2); - - - /// - /// The path from which the application is run. - /// - /// @CSharpLua.Template = "sys.get_application_path()" - /// - public static extern string get_application_path(); - - - /// - /// Get config value from the game.project configuration file. - /// In addition to the project file, configuration values can also be passed - /// to the runtime as command line arguments with the --config argument. - /// - /// @CSharpLua.Template = "sys.get_config({0})" - /// - public static extern string get_config(string key_p1); - - - /// - /// Get config value from the game.project configuration file with default value - /// - /// @CSharpLua.Template = "sys.get_config({0}, {1})" - /// - public static extern string get_config(string key_p1, string default_value_p2); - - - /// - /// Open URL in default application, typically a browser - /// - /// @CSharpLua.Template = "sys.open_url({0})" - /// - public static extern bool open_url(string url_p1); - - - /// - /// Open URL in default application, typically a browser - /// - /// @CSharpLua.Template = "sys.open_url({0}, {1})" - /// - public static extern bool open_url(string url_p1, ILuaTable attributes_p2); - - - /// - /// Loads a custom resource. Specify the full filename of the resource that you want - /// to load. When loaded, the file data is returned as a string. - /// If loading fails, the function returns nil plus the error message. - /// In order for the engine to include custom resources in the build process, you need - /// to specify them in the "custom_resources" key in your "game.project" settings file. - /// You can specify single resource files or directories. If a directory is included - /// in the resource list, all files and directories in that directory is recursively - /// included: - /// For example "main/data/,assets/level_data.json". - /// - /// @CSharpLua.Template = "sys.load_resource({0})" - /// - public static extern string load_resource(string filename_p1, out string error_o1); - - - /// - /// Returns a table with system information. - /// - /// @CSharpLua.Template = "sys.get_sys_info()" - /// - public static extern ILuaTable get_sys_info(); - - - /// - /// Returns a table with system information. - /// - /// @CSharpLua.Template = "sys.get_sys_info({0})" - /// - public static extern ILuaTable get_sys_info(ILuaTable options_p1); - - - /// - /// Returns a table with engine information. - /// - /// @CSharpLua.Template = "sys.get_engine_info()" - /// - public static extern ILuaTable get_engine_info(); - - - /// - /// Returns a table with application information for the requested app. - /// On iOS, the app_string is an url scheme for the app that is queried. Your - /// game needs to list the schemes that are queried in an LSApplicationQueriesSchemes array - /// in a custom "Info.plist". - /// On Android, the app_string is the package identifier for the app. - /// - /// @CSharpLua.Template = "sys.get_application_info({0})" - /// - public static extern ILuaTable get_application_info(string app_string_p1); - - - /// - /// Returns an array of tables with information on network interfaces. - /// - /// @CSharpLua.Template = "sys.get_ifaddrs()" - /// - public static extern ILuaTable get_ifaddrs(); - - - /// - /// Set the Lua error handler function. - /// The error handler is a function which is called whenever a lua runtime error occurs. - /// - /// @CSharpLua.Template = "sys.set_error_handler({0})" - /// - public static extern void set_error_handler(Action error_handler_p1); - - - /// - /// Sets the host that is used to check for network connectivity against. - /// - /// @CSharpLua.Template = "sys.set_connectivity_host({0})" - /// - public static extern void set_connectivity_host(string host_p1); - - - /// - /// Returns the current network connectivity status - /// on mobile platforms. - /// On desktop, this function always return sys.NETWORK_CONNECTED. - /// - /// @CSharpLua.Template = "sys.get_connectivity()" - /// - public static extern SysConnectivity get_connectivity(); - - - /// - /// Terminates the game application and reports the specified code to the OS. - /// - /// @CSharpLua.Template = "sys.exit({0})" - /// - public static extern void exit(double code_p1); - - - /// - /// Reboots the game engine with a specified set of arguments. - /// Arguments will be translated into command line arguments. Calling reboot - /// function is equivalent to starting the engine with the same arguments. - /// On startup the engine reads configuration from "game.project" in the - /// project root. - /// - /// @CSharpLua.Template = "sys.reboot({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern void reboot(string arg1_p1, string arg2_p2, string arg3_p3, string arg4_p4, string arg5_p5, string arg6_p6); - - - /// - /// Set the vsync swap interval. The interval with which to swap the front and back buffers - /// in sync with vertical blanks (v-blank), the hardware event where the screen image is updated - /// with data from the front buffer. A value of 1 swaps the buffers at every v-blank, a value of - /// 2 swaps the buffers every other v-blank and so on. A value of 0 disables waiting for v-blank - /// before swapping the buffers. Default value is 1. - /// When setting the swap interval to 0 and having vsync disabled in - /// "game.project", the engine will try to respect the set frame cap value from - /// "game.project" in software instead. - /// This setting may be overridden by driver settings. - /// - /// @CSharpLua.Template = "sys.set_vsync_swap_interval({0})" - /// - public static extern void set_vsync_swap_interval(double swap_interval_p1); - - - /// - /// Set game update-frequency (frame cap). This option is equivalent to display.update_frequency in - /// the "game.project" settings but set in run-time. If Vsync checked in "game.project", the rate will - /// be clamped to a swap interval that matches any detected main monitor refresh rate. If Vsync is - /// unchecked the engine will try to respect the rate in software using timers. There is no - /// guarantee that the frame cap will be achieved depending on platform specifics and hardware settings. - /// - /// @CSharpLua.Template = "sys.set_update_frequency({0})" - /// - public static extern void set_update_frequency(double frequency_p1); - - - /// - /// The buffer can later deserialized by sys.deserialize. - /// This method has all the same limitations as sys.save. - /// - /// @CSharpLua.Template = "sys.serialize({0})" - /// - public static extern string serialize(ILuaTable table_p1); - - - /// - /// deserializes buffer into a lua table - /// - /// @CSharpLua.Template = "sys.deserialize({0})" - /// - public static extern ILuaTable deserialize(string buffer_p1); - - - #endregion Defold API -} diff --git a/src/defold/tilemap.cs b/src/defold/tilemap.cs deleted file mode 100644 index e4ed034..0000000 --- a/src/defold/tilemap.cs +++ /dev/null @@ -1,581 +0,0 @@ -using System; -using support; -using types; - -/// -/// Tilemap API documentation -/// -/// -public class Tilemap : BuiltInComponentBase -{ - #region Defold API - /// - /// Replace a tile in a tile map with a new tile. - /// The coordinates of the tiles are indexed so that the "first" tile just - /// above and to the right of origin has coordinates 1,1. - /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. - ///
-	/// +-------+-------+------+------+
-	/// |  0,3  |  1,3  | 2,3  | 3,3  |
-	/// +-------+-------+------+------+
-	/// |  0,2  |  1,2  | 2,2  | 3,2  |
-	/// +-------+-------+------+------+
-	/// |  0,1  |  1,1  | 2,1  | 3,1  |
-	/// +-------O-------+------+------+
-	/// |  0,0  |  1,0  | 2,0  | 3,0  |
-	/// +-------+-------+------+------+
-	/// 
- /// The coordinates must be within the bounds of the tile map as it were created. - /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. - /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. - /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants - /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). - /// Flip always applies before rotation (clockwise). - /// - /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" - ///
- public static extern void set_tile(string url_p1, string layer_p2, double x_p3, double y_p4, double tile_p5); - - - /// - /// Replace a tile in a tile map with a new tile. - /// The coordinates of the tiles are indexed so that the "first" tile just - /// above and to the right of origin has coordinates 1,1. - /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. - ///
-	/// +-------+-------+------+------+
-	/// |  0,3  |  1,3  | 2,3  | 3,3  |
-	/// +-------+-------+------+------+
-	/// |  0,2  |  1,2  | 2,2  | 3,2  |
-	/// +-------+-------+------+------+
-	/// |  0,1  |  1,1  | 2,1  | 3,1  |
-	/// +-------O-------+------+------+
-	/// |  0,0  |  1,0  | 2,0  | 3,0  |
-	/// +-------+-------+------+------+
-	/// 
- /// The coordinates must be within the bounds of the tile map as it were created. - /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. - /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. - /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants - /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). - /// Flip always applies before rotation (clockwise). - /// - /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" - ///
- public static extern void set_tile(string url_p1, string layer_p2, double x_p3, double y_p4, double tile_p5, double transform_bitmask_p6); - - - /// - /// Replace a tile in a tile map with a new tile. - /// The coordinates of the tiles are indexed so that the "first" tile just - /// above and to the right of origin has coordinates 1,1. - /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. - ///
-	/// +-------+-------+------+------+
-	/// |  0,3  |  1,3  | 2,3  | 3,3  |
-	/// +-------+-------+------+------+
-	/// |  0,2  |  1,2  | 2,2  | 3,2  |
-	/// +-------+-------+------+------+
-	/// |  0,1  |  1,1  | 2,1  | 3,1  |
-	/// +-------O-------+------+------+
-	/// |  0,0  |  1,0  | 2,0  | 3,0  |
-	/// +-------+-------+------+------+
-	/// 
- /// The coordinates must be within the bounds of the tile map as it were created. - /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. - /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. - /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants - /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). - /// Flip always applies before rotation (clockwise). - /// - /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" - ///
- public static extern void set_tile(string url_p1, Hash layer_p2, double x_p3, double y_p4, double tile_p5); - - - /// - /// Replace a tile in a tile map with a new tile. - /// The coordinates of the tiles are indexed so that the "first" tile just - /// above and to the right of origin has coordinates 1,1. - /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. - ///
-	/// +-------+-------+------+------+
-	/// |  0,3  |  1,3  | 2,3  | 3,3  |
-	/// +-------+-------+------+------+
-	/// |  0,2  |  1,2  | 2,2  | 3,2  |
-	/// +-------+-------+------+------+
-	/// |  0,1  |  1,1  | 2,1  | 3,1  |
-	/// +-------O-------+------+------+
-	/// |  0,0  |  1,0  | 2,0  | 3,0  |
-	/// +-------+-------+------+------+
-	/// 
- /// The coordinates must be within the bounds of the tile map as it were created. - /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. - /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. - /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants - /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). - /// Flip always applies before rotation (clockwise). - /// - /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" - ///
- public static extern void set_tile(string url_p1, Hash layer_p2, double x_p3, double y_p4, double tile_p5, double transform_bitmask_p6); - - - /// - /// Replace a tile in a tile map with a new tile. - /// The coordinates of the tiles are indexed so that the "first" tile just - /// above and to the right of origin has coordinates 1,1. - /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. - ///
-	/// +-------+-------+------+------+
-	/// |  0,3  |  1,3  | 2,3  | 3,3  |
-	/// +-------+-------+------+------+
-	/// |  0,2  |  1,2  | 2,2  | 3,2  |
-	/// +-------+-------+------+------+
-	/// |  0,1  |  1,1  | 2,1  | 3,1  |
-	/// +-------O-------+------+------+
-	/// |  0,0  |  1,0  | 2,0  | 3,0  |
-	/// +-------+-------+------+------+
-	/// 
- /// The coordinates must be within the bounds of the tile map as it were created. - /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. - /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. - /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants - /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). - /// Flip always applies before rotation (clockwise). - /// - /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" - ///
- public static extern void set_tile(Hash url_p1, string layer_p2, double x_p3, double y_p4, double tile_p5); - - - /// - /// Replace a tile in a tile map with a new tile. - /// The coordinates of the tiles are indexed so that the "first" tile just - /// above and to the right of origin has coordinates 1,1. - /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. - ///
-	/// +-------+-------+------+------+
-	/// |  0,3  |  1,3  | 2,3  | 3,3  |
-	/// +-------+-------+------+------+
-	/// |  0,2  |  1,2  | 2,2  | 3,2  |
-	/// +-------+-------+------+------+
-	/// |  0,1  |  1,1  | 2,1  | 3,1  |
-	/// +-------O-------+------+------+
-	/// |  0,0  |  1,0  | 2,0  | 3,0  |
-	/// +-------+-------+------+------+
-	/// 
- /// The coordinates must be within the bounds of the tile map as it were created. - /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. - /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. - /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants - /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). - /// Flip always applies before rotation (clockwise). - /// - /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" - ///
- public static extern void set_tile(Hash url_p1, string layer_p2, double x_p3, double y_p4, double tile_p5, double transform_bitmask_p6); - - - /// - /// Replace a tile in a tile map with a new tile. - /// The coordinates of the tiles are indexed so that the "first" tile just - /// above and to the right of origin has coordinates 1,1. - /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. - ///
-	/// +-------+-------+------+------+
-	/// |  0,3  |  1,3  | 2,3  | 3,3  |
-	/// +-------+-------+------+------+
-	/// |  0,2  |  1,2  | 2,2  | 3,2  |
-	/// +-------+-------+------+------+
-	/// |  0,1  |  1,1  | 2,1  | 3,1  |
-	/// +-------O-------+------+------+
-	/// |  0,0  |  1,0  | 2,0  | 3,0  |
-	/// +-------+-------+------+------+
-	/// 
- /// The coordinates must be within the bounds of the tile map as it were created. - /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. - /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. - /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants - /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). - /// Flip always applies before rotation (clockwise). - /// - /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" - ///
- public static extern void set_tile(Hash url_p1, Hash layer_p2, double x_p3, double y_p4, double tile_p5); - - - /// - /// Replace a tile in a tile map with a new tile. - /// The coordinates of the tiles are indexed so that the "first" tile just - /// above and to the right of origin has coordinates 1,1. - /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. - ///
-	/// +-------+-------+------+------+
-	/// |  0,3  |  1,3  | 2,3  | 3,3  |
-	/// +-------+-------+------+------+
-	/// |  0,2  |  1,2  | 2,2  | 3,2  |
-	/// +-------+-------+------+------+
-	/// |  0,1  |  1,1  | 2,1  | 3,1  |
-	/// +-------O-------+------+------+
-	/// |  0,0  |  1,0  | 2,0  | 3,0  |
-	/// +-------+-------+------+------+
-	/// 
- /// The coordinates must be within the bounds of the tile map as it were created. - /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. - /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. - /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants - /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). - /// Flip always applies before rotation (clockwise). - /// - /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" - ///
- public static extern void set_tile(Hash url_p1, Hash layer_p2, double x_p3, double y_p4, double tile_p5, double transform_bitmask_p6); - - - /// - /// Replace a tile in a tile map with a new tile. - /// The coordinates of the tiles are indexed so that the "first" tile just - /// above and to the right of origin has coordinates 1,1. - /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. - ///
-	/// +-------+-------+------+------+
-	/// |  0,3  |  1,3  | 2,3  | 3,3  |
-	/// +-------+-------+------+------+
-	/// |  0,2  |  1,2  | 2,2  | 3,2  |
-	/// +-------+-------+------+------+
-	/// |  0,1  |  1,1  | 2,1  | 3,1  |
-	/// +-------O-------+------+------+
-	/// |  0,0  |  1,0  | 2,0  | 3,0  |
-	/// +-------+-------+------+------+
-	/// 
- /// The coordinates must be within the bounds of the tile map as it were created. - /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. - /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. - /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants - /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). - /// Flip always applies before rotation (clockwise). - /// - /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" - ///
- public static extern void set_tile(Url url_p1, string layer_p2, double x_p3, double y_p4, double tile_p5); - - - /// - /// Replace a tile in a tile map with a new tile. - /// The coordinates of the tiles are indexed so that the "first" tile just - /// above and to the right of origin has coordinates 1,1. - /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. - ///
-	/// +-------+-------+------+------+
-	/// |  0,3  |  1,3  | 2,3  | 3,3  |
-	/// +-------+-------+------+------+
-	/// |  0,2  |  1,2  | 2,2  | 3,2  |
-	/// +-------+-------+------+------+
-	/// |  0,1  |  1,1  | 2,1  | 3,1  |
-	/// +-------O-------+------+------+
-	/// |  0,0  |  1,0  | 2,0  | 3,0  |
-	/// +-------+-------+------+------+
-	/// 
- /// The coordinates must be within the bounds of the tile map as it were created. - /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. - /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. - /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants - /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). - /// Flip always applies before rotation (clockwise). - /// - /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" - ///
- public static extern void set_tile(Url url_p1, string layer_p2, double x_p3, double y_p4, double tile_p5, double transform_bitmask_p6); - - - /// - /// Replace a tile in a tile map with a new tile. - /// The coordinates of the tiles are indexed so that the "first" tile just - /// above and to the right of origin has coordinates 1,1. - /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. - ///
-	/// +-------+-------+------+------+
-	/// |  0,3  |  1,3  | 2,3  | 3,3  |
-	/// +-------+-------+------+------+
-	/// |  0,2  |  1,2  | 2,2  | 3,2  |
-	/// +-------+-------+------+------+
-	/// |  0,1  |  1,1  | 2,1  | 3,1  |
-	/// +-------O-------+------+------+
-	/// |  0,0  |  1,0  | 2,0  | 3,0  |
-	/// +-------+-------+------+------+
-	/// 
- /// The coordinates must be within the bounds of the tile map as it were created. - /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. - /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. - /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants - /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). - /// Flip always applies before rotation (clockwise). - /// - /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4})" - ///
- public static extern void set_tile(Url url_p1, Hash layer_p2, double x_p3, double y_p4, double tile_p5); - - - /// - /// Replace a tile in a tile map with a new tile. - /// The coordinates of the tiles are indexed so that the "first" tile just - /// above and to the right of origin has coordinates 1,1. - /// Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. - ///
-	/// +-------+-------+------+------+
-	/// |  0,3  |  1,3  | 2,3  | 3,3  |
-	/// +-------+-------+------+------+
-	/// |  0,2  |  1,2  | 2,2  | 3,2  |
-	/// +-------+-------+------+------+
-	/// |  0,1  |  1,1  | 2,1  | 3,1  |
-	/// +-------O-------+------+------+
-	/// |  0,0  |  1,0  | 2,0  | 3,0  |
-	/// +-------+-------+------+------+
-	/// 
- /// The coordinates must be within the bounds of the tile map as it were created. - /// That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. - /// To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. - /// Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants - /// (tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). - /// Flip always applies before rotation (clockwise). - /// - /// @CSharpLua.Template = "tilemap.set_tile({0}, {1}, {2}, {3}, {4}, {5})" - ///
- public static extern void set_tile(Url url_p1, Hash layer_p2, double x_p3, double y_p4, double tile_p5, double transform_bitmask_p6); - - - /// - /// Get the tile set at the specified position in the tilemap. - /// The position is identified by the tile index starting at origin - /// with index 1, 1. (see tilemap.set_tile()) - /// Which tile map and layer to query is identified by the URL and the - /// layer name parameters. - /// - /// @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" - /// - public static extern double get_tile(string url_p1, string layer_p2, double x_p3, double y_p4); - - - /// - /// Get the tile set at the specified position in the tilemap. - /// The position is identified by the tile index starting at origin - /// with index 1, 1. (see tilemap.set_tile()) - /// Which tile map and layer to query is identified by the URL and the - /// layer name parameters. - /// - /// @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" - /// - public static extern double get_tile(string url_p1, Hash layer_p2, double x_p3, double y_p4); - - - /// - /// Get the tile set at the specified position in the tilemap. - /// The position is identified by the tile index starting at origin - /// with index 1, 1. (see tilemap.set_tile()) - /// Which tile map and layer to query is identified by the URL and the - /// layer name parameters. - /// - /// @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" - /// - public static extern double get_tile(Hash url_p1, string layer_p2, double x_p3, double y_p4); - - - /// - /// Get the tile set at the specified position in the tilemap. - /// The position is identified by the tile index starting at origin - /// with index 1, 1. (see tilemap.set_tile()) - /// Which tile map and layer to query is identified by the URL and the - /// layer name parameters. - /// - /// @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" - /// - public static extern double get_tile(Hash url_p1, Hash layer_p2, double x_p3, double y_p4); - - - /// - /// Get the tile set at the specified position in the tilemap. - /// The position is identified by the tile index starting at origin - /// with index 1, 1. (see tilemap.set_tile()) - /// Which tile map and layer to query is identified by the URL and the - /// layer name parameters. - /// - /// @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" - /// - public static extern double get_tile(Url url_p1, string layer_p2, double x_p3, double y_p4); - - - /// - /// Get the tile set at the specified position in the tilemap. - /// The position is identified by the tile index starting at origin - /// with index 1, 1. (see tilemap.set_tile()) - /// Which tile map and layer to query is identified by the URL and the - /// layer name parameters. - /// - /// @CSharpLua.Template = "tilemap.get_tile({0}, {1}, {2}, {3})" - /// - public static extern double get_tile(Url url_p1, Hash layer_p2, double x_p3, double y_p4); - - - /// - /// Get the bounds for a tile map. This function returns multiple values: - /// The lower left corner index x and y coordinates (1-indexed), - /// the tile map width and the tile map height. - /// The resulting values take all tile map layers into account, meaning that - /// the bounds are calculated as if all layers were collapsed into one. - /// - /// @CSharpLua.Template = "tilemap.get_bounds({0})" - /// - public static extern double get_bounds(string url_p1, out double y_o1, out double w_o2, out double h_o3); - - - /// - /// Get the bounds for a tile map. This function returns multiple values: - /// The lower left corner index x and y coordinates (1-indexed), - /// the tile map width and the tile map height. - /// The resulting values take all tile map layers into account, meaning that - /// the bounds are calculated as if all layers were collapsed into one. - /// - /// @CSharpLua.Template = "tilemap.get_bounds({0})" - /// - public static extern double get_bounds(Hash url_p1, out double y_o1, out double w_o2, out double h_o3); - - - /// - /// Get the bounds for a tile map. This function returns multiple values: - /// The lower left corner index x and y coordinates (1-indexed), - /// the tile map width and the tile map height. - /// The resulting values take all tile map layers into account, meaning that - /// the bounds are calculated as if all layers were collapsed into one. - /// - /// @CSharpLua.Template = "tilemap.get_bounds({0})" - /// - public static extern double get_bounds(Url url_p1, out double y_o1, out double w_o2, out double h_o3); - - - /// - /// Sets the visibility of the tilemap layer - /// - /// @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" - /// - public static extern void set_visible(string url_p1, string layer_p2, bool visible_p3); - - - /// - /// Sets the visibility of the tilemap layer - /// - /// @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" - /// - public static extern void set_visible(string url_p1, Hash layer_p2, bool visible_p3); - - - /// - /// Sets the visibility of the tilemap layer - /// - /// @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" - /// - public static extern void set_visible(Hash url_p1, string layer_p2, bool visible_p3); - - - /// - /// Sets the visibility of the tilemap layer - /// - /// @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" - /// - public static extern void set_visible(Hash url_p1, Hash layer_p2, bool visible_p3); - - - /// - /// Sets the visibility of the tilemap layer - /// - /// @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" - /// - public static extern void set_visible(Url url_p1, string layer_p2, bool visible_p3); - - - /// - /// Sets the visibility of the tilemap layer - /// - /// @CSharpLua.Template = "tilemap.set_visible({0}, {1}, {2})" - /// - public static extern void set_visible(Url url_p1, Hash layer_p2, bool visible_p3); - - - #endregion Defold API - - - /// - /// Gets the bounds for the tilemap. Allocates memory, so use sparingly. - /// - /// - public Rect Bounds - { - get - { - var x = get_bounds(this, out var y, out var w, out var h); - var returnVal = new Rect(x, y, w, h); - return returnVal; - } - } - - - /// - /// Fetches the bounds without allocating memory - /// - /// - /// - /// - /// - public void GetBounds(out double x, out double y, out double width, out double height) - { - x = get_bounds(this, out y, out width, out height); - } - - - public int GetTile(int x, int y, string layer) - { - return (int)get_tile(this, layer, x, y); - } - - - public int GetTile(int x, int y, Hash layer) - { - return (int)get_tile(this, layer, x, y); - } - - - public void SetTile(int x, int y, int tile, string layer) - { - set_tile(this, layer, x, y, tile); - } - - - public void SetTile(int x, int y, int tile, string layer, TilemapTransforms transformBitmask) - { - set_tile(this, layer, x, y, tile, (int)transformBitmask); - } - - - public void SetTile(int x, int y, int tile, Hash layer) - { - set_tile(this, layer, x, y, tile); - } - - - public void SetTile(int x, int y, int tile, Hash layer, TilemapTransforms transformBitmask) - { - set_tile(this, layer, x, y, tile, (int)transformBitmask); - } - - - public void SetLayerVisible(string layer, bool visible = true) - { - set_visible(this, layer, visible); - } - - - public void SetLayerVisible(Hash layer, bool visible = true) - { - set_visible(this, layer, visible); - } -} diff --git a/src/defold/timer.cs b/src/defold/timer.cs deleted file mode 100644 index 8e525c4..0000000 --- a/src/defold/timer.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using support; -using types; - -/// -/// Timer API documentation -/// -/// -public static class Timer -{ - #region Defold API - /// - /// Adds a timer and returns a unique handle - /// You may create more timers from inside a timer callback. - /// Using a delay of 0 will result in a timer that triggers at the next frame just before - /// script update functions. - /// If you want a timer that triggers on each frame, set delay to 0.0f and repeat to true. - /// Timers created within a script will automatically die when the script is deleted. - /// - /// @CSharpLua.Template = "timer.delay({0}, {1}, {2})" - /// - public static extern Hash delay(double delay_p1, bool repeat_p2, Action callback_p3); - - - /// - /// You may cancel a timer from inside a timer callback. - /// Cancelling a timer that is already executed or cancelled is safe. - /// - /// @CSharpLua.Template = "timer.cancel({0})" - /// - public static extern bool cancel(Hash handle_p1); - - - /// - /// Manual triggering a callback for a timer. - /// - /// @CSharpLua.Template = "timer.trigger({0})" - /// - public static extern bool trigger(Hash handle_p1); - - - #endregion Defold API -} diff --git a/src/defold/types/ILuaTable.cs b/src/defold/types/ILuaTable.cs deleted file mode 100644 index 3f2e6d8..0000000 --- a/src/defold/types/ILuaTable.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace types -{ - /// - /// - public interface ILuaTable - { - } -} diff --git a/src/defold/types/ILuaType.cs b/src/defold/types/ILuaType.cs deleted file mode 100644 index 3967818..0000000 --- a/src/defold/types/ILuaType.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace types -{ - /// - /// - public interface ILuaType - { - } -} diff --git a/src/defold/types/LuaArray.cs b/src/defold/types/LuaArray.cs deleted file mode 100644 index ded32ce..0000000 --- a/src/defold/types/LuaArray.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace types -{ - /// - /// - public class LuaArray : LuaTableOf - { - /// - /// @CSharpLua.Template = "{}" - /// - public extern LuaArray(); - } -} diff --git a/src/defold/types/LuaArrayT.cs b/src/defold/types/LuaArrayT.cs deleted file mode 100644 index 98182f4..0000000 --- a/src/defold/types/LuaArrayT.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace types -{ - /// - /// - public class LuaArray : LuaTableOf - { - /// - /// @CSharpLua.Template = "{}" - /// - public extern LuaArray(); - } -} diff --git a/src/defold/types/LuaTable.cs b/src/defold/types/LuaTable.cs deleted file mode 100644 index 370a287..0000000 --- a/src/defold/types/LuaTable.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace types -{ - /// - /// - public class LuaTable : LuaTableOf, ILuaType - { - /// - /// @CSharpLua.Template = "{}" - /// - public extern LuaTable(); - } -} diff --git a/src/defold/types/LuaTableBase.cs b/src/defold/types/LuaTableBase.cs deleted file mode 100644 index 021d2c5..0000000 --- a/src/defold/types/LuaTableBase.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace types -{ - /// - /// - public abstract class LuaTableBase : ILuaTable - { - } -} diff --git a/src/defold/types/LuaTableOf.cs b/src/defold/types/LuaTableOf.cs deleted file mode 100644 index 1130755..0000000 --- a/src/defold/types/LuaTableOf.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; - -namespace types -{ - /// - /// - public class LuaTableOf : LuaTableBase - { - /// - /// @CSharpLua.Template = "{}" - /// - public extern LuaTableOf(); - - - /// - /// @CSharpLua.Template = "{this}[{0}] = {1}" - /// - public extern void Add(TKey key, TValue value); - - - /// - /// @CSharpLua.Template = "{this}.{0} = nil" - /// - public extern bool Remove(TKey key); - - - /// - /// @CSharpLua.Template = for k in next, {this} do rawset({this}, k, nil) end - /// - public extern void Clear(); - - - /// - /// @CSharpLua.Template = "{this}[{0}]" - /// - public extern bool ContainsKey(TKey key); - - /// - /// @CSharpLua.Template = "{this}[{0}]" - /// - public extern LuaType Get(TKey key); - - - /// - /// @CSharpLua.Template = "{this}[{0}] = {1}" - /// - public extern void Set(TKey key, TValue value); - } -} diff --git a/src/defold/types/TimeStepMode.cs b/src/defold/types/TimeStepMode.cs deleted file mode 100644 index feb4d1b..0000000 --- a/src/defold/types/TimeStepMode.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace types -{ - public enum TimeStepMode - { - Continuous = 0, - Discrete = 1 - } -} \ No newline at end of file diff --git a/src/defold/vmath.cs b/src/defold/vmath.cs deleted file mode 100644 index 8066bf0..0000000 --- a/src/defold/vmath.cs +++ /dev/null @@ -1,623 +0,0 @@ -using System; -using support; -using types; - -/// -/// Vector math API documentation -/// -/// -public static class Vmath -{ - #region Defold API - /// - /// Creates a new zero vector with all components set to 0. - /// - /// @CSharpLua.Template = "vmath.vector3()" - /// - public static extern Vector3 vector3(); - - - /// - /// Creates a new vector with all components set to the - /// supplied scalar value. - /// - /// @CSharpLua.Template = "vmath.vector3({0})" - /// - public static extern Vector3 vector3(double n_p1); - - - /// - /// Creates a new vector with all components set to the - /// corresponding values from the supplied vector. I.e. - /// This function creates a copy of the given vector. - /// - /// @CSharpLua.Template = "vmath.vector3({0})" - /// - public static extern Vector3 vector3(Vector3 v1_p1); - - - /// - /// Creates a new vector with the components set to the - /// supplied values. - /// - /// @CSharpLua.Template = "vmath.vector3({0}, {1}, {2})" - /// - public static extern Vector3 vector3(double x_p1, double y_p2, double z_p3); - - - /// - /// Creates a new zero vector with all components set to 0. - /// - /// @CSharpLua.Template = "vmath.vector4()" - /// - public static extern Vector4 vector4(); - - - /// - /// Creates a new vector with all components set to the - /// supplied scalar value. - /// - /// @CSharpLua.Template = "vmath.vector4({0})" - /// - public static extern Vector4 vector4(double n_p1); - - - /// - /// Creates a new vector with all components set to the - /// corresponding values from the supplied vector. I.e. - /// This function creates a copy of the given vector. - /// - /// @CSharpLua.Template = "vmath.vector4({0})" - /// - public static extern Vector4 vector4(Vector4 v1_p1); - - - /// - /// Creates a new vector with the components set to the - /// supplied values. - /// - /// @CSharpLua.Template = "vmath.vector4({0}, {1}, {2}, {3})" - /// - public static extern Vector4 vector4(double x_p1, double y_p2, double z_p3, double w_p4); - - - /// - /// Creates a new identity quaternion. The identity - /// quaternion is equal to: - /// vmath.quat(0, 0, 0, 1) - /// - /// @CSharpLua.Template = "vmath.quat()" - /// - public static extern Quaternion quat(); - - - /// - /// Creates a new quaternion with all components set to the - /// corresponding values from the supplied quaternion. I.e. - /// This function creates a copy of the given quaternion. - /// - /// @CSharpLua.Template = "vmath.quat({0})" - /// - public static extern Quaternion quat(Quaternion q1_p1); - - - /// - /// Creates a new quaternion with the components set - /// according to the supplied parameter values. - /// - /// @CSharpLua.Template = "vmath.quat({0}, {1}, {2}, {3})" - /// - public static extern Quaternion quat(double x_p1, double y_p2, double z_p3, double w_p4); - - - /// - /// The resulting quaternion describes the rotation that, - /// if applied to the first vector, would rotate the first - /// vector to the second. The two vectors must be unit - /// vectors (of length 1). - /// The result is undefined if the two vectors point in opposite directions - /// - /// @CSharpLua.Template = "vmath.quat_from_to({0}, {1})" - /// - public static extern Quaternion quat_from_to(Vector3 v1_p1, Vector3 v2_p2); - - - /// - /// The resulting quaternion describes a rotation of angle - /// radians around the axis described by the unit vector v. - /// - /// @CSharpLua.Template = "vmath.quat_axis_angle({0}, {1})" - /// - public static extern Quaternion quat_axis_angle(Vector3 v_p1, double angle_p2); - - - /// - /// The resulting quaternion describes the rotation from the - /// identity quaternion (no rotation) to the coordinate system - /// as described by the given x, y and z base unit vectors. - /// - /// @CSharpLua.Template = "vmath.quat_basis({0}, {1}, {2})" - /// - public static extern Quaternion quat_basis(Vector3 x_p1, Vector3 y_p2, Vector3 z_p3); - - - /// - /// The resulting quaternion describes a rotation of angle - /// radians around the x-axis. - /// - /// @CSharpLua.Template = "vmath.quat_rotation_x({0})" - /// - public static extern Quaternion quat_rotation_x(double angle_p1); - - - /// - /// The resulting quaternion describes a rotation of angle - /// radians around the y-axis. - /// - /// @CSharpLua.Template = "vmath.quat_rotation_y({0})" - /// - public static extern Quaternion quat_rotation_y(double angle_p1); - - - /// - /// The resulting quaternion describes a rotation of angle - /// radians around the z-axis. - /// - /// @CSharpLua.Template = "vmath.quat_rotation_z({0})" - /// - public static extern Quaternion quat_rotation_z(double angle_p1); - - - /// - /// The resulting identity matrix describes a transform with - /// no translation or rotation. - /// - /// @CSharpLua.Template = "vmath.matrix4()" - /// - public static extern Matrix4 matrix4(); - - - /// - /// Creates a new matrix with all components set to the - /// corresponding values from the supplied matrix. I.e. - /// the function creates a copy of the given matrix. - /// - /// @CSharpLua.Template = "vmath.matrix4({0})" - /// - public static extern Matrix4 matrix4(Matrix4 m1_p1); - - - /// - /// Constructs a frustum matrix from the given values. The left, right, - /// top and bottom coordinates of the view cone are expressed as distances - /// from the center of the near clipping plane. The near and far coordinates - /// are expressed as distances from the tip of the view frustum cone. - /// - /// @CSharpLua.Template = "vmath.matrix4_frustum({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern Matrix4 matrix4_frustum(double left_p1, double right_p2, double bottom_p3, double top_p4, double near_p5, double far_p6); - - - /// - /// The resulting matrix is created from the supplied look-at parameters. - /// This is useful for constructing a view matrix for a camera or - /// rendering in general. - /// - /// @CSharpLua.Template = "vmath.matrix4_look_at({0}, {1}, {2})" - /// - public static extern Matrix4 matrix4_look_at(Vector3 eye_p1, Vector3 look_at_p2, Vector3 up_p3); - - - /// - /// Creates an orthographic projection matrix. - /// This is useful to construct a projection matrix for a camera or rendering in general. - /// - /// @CSharpLua.Template = "vmath.matrix4_orthographic({0}, {1}, {2}, {3}, {4}, {5})" - /// - public static extern Matrix4 matrix4_orthographic(double left_p1, double right_p2, double bottom_p3, double top_p4, double near_p5, double far_p6); - - - /// - /// Creates a perspective projection matrix. - /// This is useful to construct a projection matrix for a camera or rendering in general. - /// - /// @CSharpLua.Template = "vmath.matrix4_perspective({0}, {1}, {2}, {3})" - /// - public static extern Matrix4 matrix4_perspective(double fov_p1, double aspect_p2, double near_p3, double far_p4); - - - /// - /// The resulting matrix describes the same rotation as the quaternion, but does not have any translation (also like the quaternion). - /// - /// @CSharpLua.Template = "vmath.matrix4_from_quat({0})" - /// - public static extern Matrix4 matrix4_from_quat(Quaternion q_p1); - - - /// - /// The resulting matrix describes a rotation around the axis by the specified angle. - /// - /// @CSharpLua.Template = "vmath.matrix4_axis_angle({0}, {1})" - /// - public static extern Matrix4 matrix4_axis_angle(Vector3 v_p1, double angle_p2); - - - /// - /// The resulting matrix describes a rotation around the x-axis - /// by the specified angle. - /// - /// @CSharpLua.Template = "vmath.matrix4_rotation_x({0})" - /// - public static extern Matrix4 matrix4_rotation_x(double angle_p1); - - - /// - /// The resulting matrix describes a rotation around the y-axis - /// by the specified angle. - /// - /// @CSharpLua.Template = "vmath.matrix4_rotation_y({0})" - /// - public static extern Matrix4 matrix4_rotation_y(double angle_p1); - - - /// - /// The resulting matrix describes a rotation around the z-axis - /// by the specified angle. - /// - /// @CSharpLua.Template = "vmath.matrix4_rotation_z({0})" - /// - public static extern Matrix4 matrix4_rotation_z(double angle_p1); - - - /// - /// The resulting matrix describes a translation of a point - /// in euclidean space. - /// - /// @CSharpLua.Template = "vmath.matrix4_translation({0})" - /// - public static extern Matrix4 matrix4_translation(Vector3 position_p1); - - - /// - /// The resulting matrix describes a translation of a point - /// in euclidean space. - /// - /// @CSharpLua.Template = "vmath.matrix4_translation({0})" - /// - public static extern Matrix4 matrix4_translation(Vector4 position_p1); - - - /// - /// The resulting matrix is the inverse of the supplied matrix. - /// For ortho-normal matrices, e.g. regular object transformation, - /// use vmath.ortho_inv() instead. - /// The specialized inverse for ortho-normalized matrices is much faster - /// than the general inverse. - /// - /// @CSharpLua.Template = "vmath.inv({0})" - /// - public static extern Matrix4 inv(Matrix4 m1_p1); - - - /// - /// The resulting matrix is the inverse of the supplied matrix. - /// The supplied matrix has to be an ortho-normal matrix, e.g. - /// describe a regular object transformation. - /// For matrices that are not ortho-normal - /// use the general inverse vmath.inv() instead. - /// - /// @CSharpLua.Template = "vmath.ortho_inv({0})" - /// - public static extern Matrix4 ortho_inv(Matrix4 m1_p1); - - - /// - /// The returned value is a scalar defined as: - /// P ⋅ Q = |P| |Q| cos θ - /// where θ is the angle between the vectors P and Q. - ///
    - ///
  • If the dot product is positive then the angle between the vectors is below 90 degrees.
  • - ///
  • If the dot product is zero the vectors are perpendicular (at right-angles to each other).
  • - ///
  • If the dot product is negative then the angle between the vectors is more than 90 degrees.
  • - ///
- /// - /// @CSharpLua.Template = "vmath.dot({0}, {1})" - ///
- public static extern double dot(Vector3 v1_p1, Vector3 v2_p2); - - - /// - /// The returned value is a scalar defined as: - /// P ⋅ Q = |P| |Q| cos θ - /// where θ is the angle between the vectors P and Q. - ///
    - ///
  • If the dot product is positive then the angle between the vectors is below 90 degrees.
  • - ///
  • If the dot product is zero the vectors are perpendicular (at right-angles to each other).
  • - ///
  • If the dot product is negative then the angle between the vectors is more than 90 degrees.
  • - ///
- /// - /// @CSharpLua.Template = "vmath.dot({0}, {1})" - ///
- public static extern double dot(Vector3 v1_p1, Vector4 v2_p2); - - - /// - /// The returned value is a scalar defined as: - /// P ⋅ Q = |P| |Q| cos θ - /// where θ is the angle between the vectors P and Q. - ///
    - ///
  • If the dot product is positive then the angle between the vectors is below 90 degrees.
  • - ///
  • If the dot product is zero the vectors are perpendicular (at right-angles to each other).
  • - ///
  • If the dot product is negative then the angle between the vectors is more than 90 degrees.
  • - ///
- /// - /// @CSharpLua.Template = "vmath.dot({0}, {1})" - ///
- public static extern double dot(Vector4 v1_p1, Vector3 v2_p2); - - - /// - /// The returned value is a scalar defined as: - /// P ⋅ Q = |P| |Q| cos θ - /// where θ is the angle between the vectors P and Q. - ///
    - ///
  • If the dot product is positive then the angle between the vectors is below 90 degrees.
  • - ///
  • If the dot product is zero the vectors are perpendicular (at right-angles to each other).
  • - ///
  • If the dot product is negative then the angle between the vectors is more than 90 degrees.
  • - ///
- /// - /// @CSharpLua.Template = "vmath.dot({0}, {1})" - ///
- public static extern double dot(Vector4 v1_p1, Vector4 v2_p2); - - - /// - /// Returns the squared length of the supplied vector or quaternion. - /// - /// @CSharpLua.Template = "vmath.length_sqr({0})" - /// - public static extern double length_sqr(Vector3 v_p1); - - - /// - /// Returns the squared length of the supplied vector or quaternion. - /// - /// @CSharpLua.Template = "vmath.length_sqr({0})" - /// - public static extern double length_sqr(Vector4 v_p1); - - - /// - /// Returns the squared length of the supplied vector or quaternion. - /// - /// @CSharpLua.Template = "vmath.length_sqr({0})" - /// - public static extern double length_sqr(Quaternion v_p1); - - - /// - /// Returns the length of the supplied vector or quaternion. - /// If you are comparing the lengths of vectors or quaternions, you should compare - /// the length squared instead as it is slightly more efficient to calculate - /// (it eliminates a square root calculation). - /// - /// @CSharpLua.Template = "vmath.length({0})" - /// - public static extern double length(Vector3 v_p1); - - - /// - /// Returns the length of the supplied vector or quaternion. - /// If you are comparing the lengths of vectors or quaternions, you should compare - /// the length squared instead as it is slightly more efficient to calculate - /// (it eliminates a square root calculation). - /// - /// @CSharpLua.Template = "vmath.length({0})" - /// - public static extern double length(Vector4 v_p1); - - - /// - /// Returns the length of the supplied vector or quaternion. - /// If you are comparing the lengths of vectors or quaternions, you should compare - /// the length squared instead as it is slightly more efficient to calculate - /// (it eliminates a square root calculation). - /// - /// @CSharpLua.Template = "vmath.length({0})" - /// - public static extern double length(Quaternion v_p1); - - - /// - /// Normalizes a vector, i.e. returns a new vector with the same - /// direction as the input vector, but with length 1. - /// The length of the vector must be above 0, otherwise a - /// division-by-zero will occur. - /// - /// @CSharpLua.Template = "vmath.normalize({0})" - /// - public static extern Vector3 normalize(Vector3 v1_p1); - - - /// - /// Normalizes a vector, i.e. returns a new vector with the same - /// direction as the input vector, but with length 1. - /// The length of the vector must be above 0, otherwise a - /// division-by-zero will occur. - /// - /// @CSharpLua.Template = "vmath.normalize({0})" - /// - public static extern Vector4 normalize(Vector4 v1_p1); - - - /// - /// Normalizes a vector, i.e. returns a new vector with the same - /// direction as the input vector, but with length 1. - /// The length of the vector must be above 0, otherwise a - /// division-by-zero will occur. - /// - /// @CSharpLua.Template = "vmath.normalize({0})" - /// - public static extern Quaternion normalize(Quaternion v1_p1); - - - /// - /// Given two linearly independent vectors P and Q, the cross product, - /// P × Q, is a vector that is perpendicular to both P and Q and - /// therefore normal to the plane containing them. - /// If the two vectors have the same direction (or have the exact - /// opposite direction from one another, i.e. are not linearly independent) - /// or if either one has zero length, then their cross product is zero. - /// - /// @CSharpLua.Template = "vmath.cross({0}, {1})" - /// - public static extern Vector3 cross(Vector3 v1_p1, Vector3 v2_p2); - - - /// - /// Linearly interpolate between two vectors. The function - /// treats the vectors as positions and interpolates between - /// the positions in a straight line. Lerp is useful to describe - /// transitions from one place to another over time. - /// The function does not clamp t between 0 and 1. - /// - /// @CSharpLua.Template = "vmath.lerp({0}, {1}, {2})" - /// - public static extern Vector3 lerp(double t_p1, Vector3 v1_p2, Vector3 v2_p3); - - - /// - /// Linearly interpolate between two vectors. The function - /// treats the vectors as positions and interpolates between - /// the positions in a straight line. Lerp is useful to describe - /// transitions from one place to another over time. - /// The function does not clamp t between 0 and 1. - /// - /// @CSharpLua.Template = "vmath.lerp({0}, {1}, {2})" - /// - public static extern Vector4 lerp(double t_p1, Vector4 v1_p2, Vector4 v2_p3); - - - /// - /// Linearly interpolate between two vectors. The function - /// treats the vectors as positions and interpolates between - /// the positions in a straight line. Lerp is useful to describe - /// transitions from one place to another over time. - /// The function does not clamp t between 0 and 1. - /// - /// @CSharpLua.Template = "vmath.lerp({0}, {1}, {2})" - /// - public static extern Quaternion lerp(double t_p1, Quaternion v1_p2, Quaternion v2_p3); - - - /// - /// Linearly interpolate between two vectors. The function - /// treats the vectors as positions and interpolates between - /// the positions in a straight line. Lerp is useful to describe - /// transitions from one place to another over time. - /// The function does not clamp t between 0 and 1. - /// - /// @CSharpLua.Template = "vmath.lerp({0}, {1}, {2})" - /// - public static extern double lerp(double t_p1, double v1_p2, double v2_p3); - - - /// - /// Spherically interpolates between two vectors. The difference to - /// lerp is that slerp treats the vectors as directions instead of - /// positions in space. - /// The direction of the returned vector is interpolated by the angle - /// and the magnitude is interpolated between the magnitudes of the - /// from and to vectors. - /// Slerp is computationally more expensive than lerp. - /// The function does not clamp t between 0 and 1. - /// - /// @CSharpLua.Template = "vmath.slerp({0}, {1}, {2})" - /// - public static extern Vector3 slerp(double t_p1, Vector3 v1_p2, Vector3 v2_p3); - - - /// - /// Spherically interpolates between two vectors. The difference to - /// lerp is that slerp treats the vectors as directions instead of - /// positions in space. - /// The direction of the returned vector is interpolated by the angle - /// and the magnitude is interpolated between the magnitudes of the - /// from and to vectors. - /// Slerp is computationally more expensive than lerp. - /// The function does not clamp t between 0 and 1. - /// - /// @CSharpLua.Template = "vmath.slerp({0}, {1}, {2})" - /// - public static extern Vector4 slerp(double t_p1, Vector4 v1_p2, Vector4 v2_p3); - - - /// - /// Spherically interpolates between two vectors. The difference to - /// lerp is that slerp treats the vectors as directions instead of - /// positions in space. - /// The direction of the returned vector is interpolated by the angle - /// and the magnitude is interpolated between the magnitudes of the - /// from and to vectors. - /// Slerp is computationally more expensive than lerp. - /// The function does not clamp t between 0 and 1. - /// - /// @CSharpLua.Template = "vmath.slerp({0}, {1}, {2})" - /// - public static extern Quaternion slerp(double t_p1, Quaternion v1_p2, Quaternion v2_p3); - - - /// - /// Calculates the conjugate of a quaternion. The result is a - /// quaternion with the same magnitudes but with the sign of - /// the imaginary (vector) parts changed: - /// q* = [w, -v] - /// - /// @CSharpLua.Template = "vmath.conj({0})" - /// - public static extern Quaternion conj(Quaternion q1_p1); - - - /// - /// Returns a new vector from the supplied vector that is - /// rotated by the rotation described by the supplied - /// quaternion. - /// - /// @CSharpLua.Template = "vmath.rotate({0}, {1})" - /// - public static extern Vector3 rotate(Quaternion q_p1, Vector3 v1_p2); - - - /// - /// Calculates the extent the projection of the first vector onto the second. - /// The returned value is a scalar p defined as: - /// p = |P| cos θ / |Q| - /// where θ is the angle between the vectors P and Q. - /// - /// @CSharpLua.Template = "vmath.project({0}, {1})" - /// - public static extern double project(Vector3 v1_p1, Vector3 v2_p2); - - - /// - /// Performs an element wise multiplication between two vectors of the same type - /// The returned value is a vector defined as (e.g. for a vector3): - /// v = vmath.mul_per_elem(a, b) = vmath.vector3(a.x * b.x, a.y * b.y, a.z * b.z) - /// - /// @CSharpLua.Template = "vmath.mul_per_elem({0}, {1})" - /// - public static extern Vector3 mul_per_elem(Vector3 v1_p1, Vector3 v2_p2); - - - /// - /// Performs an element wise multiplication between two vectors of the same type - /// The returned value is a vector defined as (e.g. for a vector3): - /// v = vmath.mul_per_elem(a, b) = vmath.vector3(a.x * b.x, a.y * b.y, a.z * b.z) - /// - /// @CSharpLua.Template = "vmath.mul_per_elem({0}, {1})" - /// - public static extern Vector4 mul_per_elem(Vector4 v1_p1, Vector4 v2_p2); - - - #endregion Defold API -} diff --git a/src/defold/webview.cs b/src/defold/webview.cs deleted file mode 100644 index c11b806..0000000 --- a/src/defold/webview.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using support; -using types; - -/// -/// Webview API documentation -/// -/// -public static class Webview -{ - #region Defold API - #endregion Defold API -} diff --git a/src/defold/window.cs b/src/defold/window.cs deleted file mode 100644 index 24b0f7b..0000000 --- a/src/defold/window.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using support; -using types; - -/// -/// Window API documentation -/// -/// -public static class Window -{ - #region Defold API - /// - /// Sets a window event listener. - /// - /// @CSharpLua.Template = "window.set_listener({0})" - /// - public static extern void set_listener(Action callback_p1); - - - /// - /// Set the locking state for current mouse cursor on a PC platform. - /// This function locks or unlocks the mouse cursor to the center point of the window. While the cursor is locked, - /// mouse position updates will still be sent to the scripts as usual. - /// - /// @CSharpLua.Template = "window.set_mouse_lock({0})" - /// - public static extern void set_mouse_lock(bool flag_p1); - - - /// - /// Sets the dimming mode on a mobile device. - /// The dimming mode specifies whether or not a mobile device should dim the screen after a period without user interaction. The dimming mode will only affect the mobile device while the game is in focus on the device, but not when the game is running in the background. - /// This function has no effect on platforms that does not support dimming. - /// - /// @CSharpLua.Template = "window.set_dim_mode({0})" - /// - public static extern void set_dim_mode(WindowDimming mode_p1); - - - /// - /// Returns the current dimming mode set on a mobile device. - /// The dimming mode specifies whether or not a mobile device should dim the screen after a period without user interaction. - /// On platforms that does not support dimming, window.DIMMING_UNKNOWN is always returned. - /// - /// @CSharpLua.Template = "window.get_dim_mode()" - /// - public static extern WindowDimming get_dim_mode(); - - - /// - /// This returns the current window size (width and height). - /// - /// @CSharpLua.Template = "window.get_size()" - /// - public static extern double get_size(out double height_o1); - - - /// - /// This returns the current lock state of the mouse cursor - /// - /// @CSharpLua.Template = "window.get_mouse_lock()" - /// - public static extern bool get_mouse_lock(); - - - #endregion Defold API -} diff --git a/src/defold/zlib.cs b/src/defold/zlib.cs deleted file mode 100644 index 042e277..0000000 --- a/src/defold/zlib.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using support; -using types; - -/// -/// Zlib compression API documentation -/// -/// -public static class Zlib -{ - #region Defold API - /// - /// A lua error is raised is on error - /// - /// @CSharpLua.Template = "zlib.inflate({0})" - /// - public static extern string inflate(string buf_p1); - - - /// - /// A lua error is raised is on error - /// - /// @CSharpLua.Template = "zlib.deflate({0})" - /// - public static extern string deflate(string buf_p1); - - - #endregion Defold API -}