Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

Game on real time
Started by orion.hola Nov 24 2018 12:19 AM

1 reply to this topic
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 1 posts
  • Corona SDK

It is necessary to write the dependence of the application from real time. When closing the application, the timer should not stop.
For example: every 10 minutes the background should change or the hunger value should decrease every minute (the timer does not stop when the application is turned off)
I am a beginner and do not know how to create this function.



Нужно написать зависимость приложения от реального времени. При закрытии приложения таймер не должен останавливаться.
Например: каждые 10 минут должен меняться фон или значение голода должно уменьшаться каждую минуту (таймер не останавливается при выключении приложения)
Я новичок и не знаю, как прописать данную функцию


[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Corona Geek

  • 1,761 posts
  • Corona SDK

When the user suspends or quits the app, save the time to a file. When the app resumes or is reopened, compare this to the current time to calculate how much time elapsed, and therefore how much to reduce hunger by.