mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
feat: loading entities (WIP)
This commit is contained in:
parent
08cc78289d
commit
c8666910ce
16 changed files with 129 additions and 38 deletions
|
|
@ -6,15 +6,21 @@ inair = true
|
|||
ready = false
|
||||
target = -1
|
||||
|
||||
local dropitem = ARGS.item
|
||||
ARGS = ARGS or {}
|
||||
local dropitem = ARGS.item or {}
|
||||
if SAVED_DATA.item then
|
||||
dropitem.id = item.index(SAVED_DATA.item)
|
||||
dropitem.count = SAVED_DATA.count
|
||||
end
|
||||
|
||||
local scale = {1, 1, 1}
|
||||
local rotation = mat4.rotate({
|
||||
math.random(), math.random(), math.random()
|
||||
}, 360)
|
||||
|
||||
function on_save()
|
||||
SAVED_DATA.test = 5
|
||||
print("SAVE ENTITY")
|
||||
SAVED_DATA.item = item.name(dropitem.id)
|
||||
SAVED_DATA.count = dropitem.count
|
||||
end
|
||||
|
||||
do -- setup visuals
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue