74 lines
2.4 KiB
Lua
74 lines
2.4 KiB
Lua
function foo()
|
|
tree()
|
|
.node("p1", Quaternion(), Vector3(0, 0, -200))
|
|
.entity("b1", "residental-house1.glb")
|
|
.endnode()
|
|
.node("p2", Quaternion(), Vector3(0, 0, -150))
|
|
.entity("residental-house1.glb")
|
|
.endnode()
|
|
.node("p3", Quaternion(), Vector3(0, 0, -100))
|
|
.entity("residental-house1.glb")
|
|
.endnode()
|
|
.node("p4", Quaternion(), Vector3(0, 0, -50))
|
|
.entity("residental-house1.glb")
|
|
.endnode()
|
|
.node("p5", Quaternion(), Vector3(0, 0, 50))
|
|
.entity("residental-house1.glb")
|
|
.endnode()
|
|
.node("p6", Quaternion(), Vector3(0, 0, 100))
|
|
.entity("residental-house1.glb")
|
|
.endnode()
|
|
.node("p7", Quaternion(), Vector3(0, 0, 150))
|
|
.entity("residental-house2.glb")
|
|
.endnode()
|
|
.node("p8", Quaternion(), Vector3(0, 0, 200))
|
|
.entity("residental-house3.glb")
|
|
.endnode()
|
|
for x = -1000, 1000, 50 do
|
|
for z = -1000, 1000, 50 do
|
|
if not ((x >-100 and x < 100) and (z > -100 and z < 100)) then
|
|
tree()
|
|
.node("p00" .. tostring(x * 1000 + z), Quaternion(), Vector3(x, 0, z))
|
|
.entity("residental-house2.glb")
|
|
.endnode()
|
|
end
|
|
end
|
|
end
|
|
v = Vector3(0, 1, 2)
|
|
end
|
|
narration = {
|
|
position = 1,
|
|
narration_start = {
|
|
"The party was hot, girls were sexy the wine, beer and whisky were in \
|
|
enormous numbers. It was anniversary since you set sail with your friends. \
|
|
The sea was calm and everything promised you another great night.",
|
|
"The whole year with your friends on your ship over vast seas of the world in decay was almost over.\
|
|
It was so good year full of adventure, romance, indecency and luxury.",
|
|
"Your trusted friends decided that you have too much, they have too much of you and you owe them a lot.",
|
|
"They found you drunk in your room and moved to the deck and used ropes to \
|
|
restrain you and attach a bucket of stones or something else heavy to your body.",
|
|
"After a few hours passed two strong people pulled you to the side and \
|
|
dropped you into the sea. Last thing you heard before you hit the water was happy laugher..."
|
|
},
|
|
progress = function(this)
|
|
if #this.narration_start < this.position then
|
|
return ""
|
|
end
|
|
local ret = this.narration_start[this.position]
|
|
this.position = this.position + 1
|
|
return ret
|
|
end,
|
|
}
|
|
setup_handler(function(event)
|
|
print(event)
|
|
if event == "startup" then
|
|
main_menu()
|
|
elseif event == "narration_progress" then
|
|
narrate(narration:progress())
|
|
|
|
elseif event == "new_game" then
|
|
narrate(narration:progress())
|
|
end
|
|
end)
|
|
|