mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Merge branch 'main' into animation
This commit is contained in:
commit
83e7f1d5f5
24 changed files with 284 additions and 208 deletions
|
|
@ -132,7 +132,7 @@ return {
|
|||
goto continue
|
||||
end
|
||||
for _, component in ipairs(entity.ordered_components) do
|
||||
local callback = component.on_update
|
||||
local callback = rawget(component, "on_update")
|
||||
if not component.__disabled and callback then
|
||||
local _, err = pcall(callback, tps)
|
||||
if err then
|
||||
|
|
@ -146,7 +146,7 @@ return {
|
|||
physics_update = function(delta)
|
||||
for uid, entity in pairs(entities) do
|
||||
for _, component in ipairs(entity.ordered_components) do
|
||||
local callback = component.on_physics_update
|
||||
local callback = rawget(component, "on_physics_update")
|
||||
if not component.__disabled and callback then
|
||||
local result, err = pcall(callback, delta)
|
||||
if err then
|
||||
|
|
@ -159,7 +159,7 @@ return {
|
|||
render = function(delta)
|
||||
for _,entity in pairs(entities) do
|
||||
for _, component in ipairs(entity.ordered_components) do
|
||||
local callback = component.on_render
|
||||
local callback = rawget(component, "on_render")
|
||||
if not component.__disabled and callback then
|
||||
local _, err = pcall(callback, delta)
|
||||
if err then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue