Browse Source

Joint:isEnabled; Joint:setEnabled;

bjorn 5 years ago
parent
commit
fd44b479fe
3 changed files with 62 additions and 0 deletions
  1. 38 0
      api/init.lua
  2. 12 0
      api/lovr/physics/Joint/isEnabled.lua
  3. 12 0
      api/lovr/physics/Joint/setEnabled.lua

+ 38 - 0
api/init.lua

@@ -21049,6 +21049,44 @@ return {
                 }
               }
             },
+            {
+              name = "isEnabled",
+              summary = "Check if the Joint is enabled.",
+              description = "Returns whether the Joint is enabled.",
+              key = "Joint:isEnabled",
+              module = "lovr.physics",
+              variants = {
+                {
+                  arguments = {},
+                  returns = {
+                    {
+                      name = "enabled",
+                      type = "boolean",
+                      description = "Whether the Joint is enabled."
+                    }
+                  }
+                }
+              }
+            },
+            {
+              name = "setEnabled",
+              summary = "Enable or disable the Joint.",
+              description = "Enable or disable the Joint.",
+              key = "Joint:setEnabled",
+              module = "lovr.physics",
+              variants = {
+                {
+                  arguments = {
+                    {
+                      name = "enabled",
+                      type = "boolean",
+                      description = "Whether the Joint should be enabled."
+                    }
+                  },
+                  returns = {}
+                }
+              }
+            },
             {
               name = "setUserData",
               summary = "Set the Joint's user data.",

+ 12 - 0
api/lovr/physics/Joint/isEnabled.lua

@@ -0,0 +1,12 @@
+return {
+  summary = 'Check if the Joint is enabled.',
+  description = 'Returns whether the Joint is enabled.',
+  arguments = {},
+  returns = {
+    {
+      name = 'enabled',
+      type = 'boolean',
+      description = 'Whether the Joint is enabled.'
+    }
+  }
+}

+ 12 - 0
api/lovr/physics/Joint/setEnabled.lua

@@ -0,0 +1,12 @@
+return {
+  summary = 'Enable or disable the Joint.',
+  description = 'Enable or disable the Joint.',
+  arguments = {
+    {
+      name = 'enabled',
+      type = 'boolean',
+      description = 'Whether the Joint should be enabled.'
+    }
+  },
+  returns = {}
+}