Hi all,
I am new to developing and coding in general but for years I have wanted to make my own mobile app.
I have had this killer idea and have been struggling to find someone to help me out on it.
Anyways, long story short, someone hard started a similar project using Corona and abandoned it. So I am trying to pick it up, make it my own, and teach myself to code along the way.
I noticed that the previous person was using a custom way to switch scenes? or maybe it’s just an old way of doing it. In any case I am trying to port it to storyboard but I keep running into issues as in, there are functions designed around these “scenes” and their state and I’m not sure how to accomplish the same thing in storyboard. Is someone able to shed some light?
Here is a snippit of code I am trying to port.
- Please note that this snippit of code is taken from the “mainScene.lua” file. thi is where majority of the code is.
scenes.\_RUNTIMES['main'] = function()
scenes['main']:insert(menus[global.menuMode])
menus[global.menuMode]:insert(1,hudObj.menuBG)
if not(pDigimal.type == 'dead') then
if pDigimal.hasHappiness then
hudObj.happiness.isVisible = true
hudObj.happinessFaded.isVisible = true
hud.happiness(true)
else
hudObj.happiness.isVisible = false
hudObj.happinessFaded.isVisible = false
end
if pDigimal.hasHunger then
hud.hunger(true)
hudObj.hungerFaded.isVisible = true
hudObj.hunger.isVisible = true
hudObj.buttons.feed.isVisible = true
else
hudObj.buttons.feed.isVisible = false
hudObj.hungerFaded.isVisible = false
hudObj.hunger.isVisible = false
end
evolveDigimal()
else
guiGroup.isVisible = false
end
if pDigimal.happiness == -1 and pDigimal.hunger == -1 then
if deathCounter then
if (os.time() - deathCounter) \> 10 then
if not(pDigimal.type == 'dead') then action.die() end
end
else
deathCounter = os.time()
end
end
if global.feeding then
action.feed()
end
if global.menuOpen then end
end
The other thing that is confusing me is the global.menu stuff and the hudObj stuff.
I understand that this is no easy task and all files would need to be looked at to find the links and whatever but if someone wants to help me with this project i’d really appreciate it! I’ve been dying to make an app like this and I am hoping that I can get this working.
Thanks.
William. [import]uid: 88841 topic_id: 28666 reply_id: 328666[/import]