MetalES / Project-Zelda

Project Zelda, made using Solarus
12 stars 1 forks source link

Unify the time system #60

Closed MetalES closed 7 years ago

MetalES commented 7 years ago

Everyfing is cleaned, but, unifying code is a good approach for whoever want to use the game for it's own game.

This is my idea.

The tone manager and the clock code are separated objects as for now, their similitude is that they are linked through the game object. Both have time related code, tone manager have time:set() and time_flow:set(), clock script have things to manage these.

My idea is to create a time_manager script which will englobe all of time related functions and that will connect these 2 scripts together, easier for the documentation and cleaner.

Because time function was spreaded around the tone manager and the clock script, which might not be convenient

These bellow will be unused but might serve for others

MetalES commented 7 years ago

Alse, move the time variable

game.minute should be game.time.minute