mirror of
https://github.com/Reuh/ubiquitousse.git
synced 2025-10-28 01:29:31 +00:00
Custom dofile
This commit is contained in:
parent
c7e72a0295
commit
5961b217c5
1 changed files with 6 additions and 2 deletions
|
|
@ -45,6 +45,10 @@ scene = {
|
||||||
-- @impl ubiquitousse
|
-- @impl ubiquitousse
|
||||||
prefix = "",
|
prefix = "",
|
||||||
|
|
||||||
|
--- Function which load a scene file
|
||||||
|
-- @impl ubiquitousse
|
||||||
|
dofile = dofile,
|
||||||
|
|
||||||
--- Creates and returns a new Scene object.
|
--- Creates and returns a new Scene object.
|
||||||
-- @tparam[opt="unamed"] string name the new scene name
|
-- @tparam[opt="unamed"] string name the new scene name
|
||||||
-- @impl ubiquitousse
|
-- @impl ubiquitousse
|
||||||
|
|
@ -74,7 +78,7 @@ scene = {
|
||||||
-- @impl ubiquitousse
|
-- @impl ubiquitousse
|
||||||
switch = function(scenePath, ...)
|
switch = function(scenePath, ...)
|
||||||
local previous = scene.current
|
local previous = scene.current
|
||||||
scene.current = dofile(getPath(scene.prefix..scenePath))
|
scene.current = scene.dofile(getPath(scene.prefix..scenePath))
|
||||||
scene.current.name = scenePath
|
scene.current.name = scenePath
|
||||||
if previous then previous:exit() end
|
if previous then previous:exit() end
|
||||||
scene.current:enter(...)
|
scene.current:enter(...)
|
||||||
|
|
@ -90,7 +94,7 @@ scene = {
|
||||||
-- @impl ubiquitousse
|
-- @impl ubiquitousse
|
||||||
push = function(scenePath, ...)
|
push = function(scenePath, ...)
|
||||||
local previous = scene.current
|
local previous = scene.current
|
||||||
scene.current = dofile(getPath(scene.prefix..scenePath))
|
scene.current = scene.dofile(getPath(scene.prefix..scenePath))
|
||||||
scene.current.name = scenePath
|
scene.current.name = scenePath
|
||||||
if previous then previous:suspend() end
|
if previous then previous:suspend() end
|
||||||
scene.current:enter(...)
|
scene.current:enter(...)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue