瀏覽代碼

World:get/setStepCount;

unknown 3 年之前
父節點
當前提交
f20546911d
共有 3 個文件被更改,包括 819 次插入2266 次删除
  1. 779 2266
      api/init.lua
  2. 20 0
      api/lovr/physics/World/getStepCount.lua
  3. 20 0
      api/lovr/physics/World/setStepCount.lua

File diff suppressed because it is too large
+ 779 - 2266
api/init.lua


+ 20 - 0
api/lovr/physics/World/getStepCount.lua

@@ -0,0 +1,20 @@
+return {
+  tag = 'worldProperties',
+  summary = 'Get the step count of the World.',
+  description = [[
+    Returns the step count of the World.  The step count influences how many steps are taken during
+    a call to `World:update`.  A higher number of steps will be slower, but more accurate.  The
+    default step count is 20.
+  ]],
+  arguments = {
+    {
+      name = 'steps',
+      type = 'number',
+      description = 'The step count.'
+    }
+  },
+  returns = {},
+  related = {
+    'World:update'
+  }
+}

+ 20 - 0
api/lovr/physics/World/setStepCount.lua

@@ -0,0 +1,20 @@
+return {
+  tag = 'worldProperties',
+  summary = 'Set the step count of the World.',
+  description = [[
+    Sets the step count of the World.  The step count influences how many steps are taken during a
+    call to `World:update`.  A higher number of steps will be slower, but more accurate.  The
+    default step count is 20.
+  ]],
+  arguments = {
+    {
+      name = 'steps',
+      type = 'number',
+      description = 'The new step count.'
+    }
+  },
+  returns = {},
+  related = {
+    'World:update'
+  }
+}

Some files were not shown because too many files changed in this diff