Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements #6

Merged
merged 2 commits into from
Aug 15, 2018
Merged

Improvements #6

merged 2 commits into from
Aug 15, 2018

Conversation

AyoubGharbi
Copy link
Collaborator

@AyoubGharbi AyoubGharbi commented Aug 15, 2018

  • Added new callbacks feature.
  • Refactored ResumeGame call in UIManager.

(As I said, the way callbacks are developed currently is bad because there is no test to unsubscribe from every 'not needed' one, and that cause a lot of problems in transitions and popping up screens when you don't want to. Instead, I have introduced a new way to make things cleaner, Check Scripts/Utils new folder.
I have implemented it in coins only for now, but should be integrated in all our callback calls).

This is my personal callbacks component that I have developed, called property, you subscribe to a data type , a class, everything you want, and you don't care about callbacks management, it's will be done automatically.
I tested it on the coins logic and it's working well.
I changed the resumegame from being inside every close screen call to only resume game when closing the pause screen.
@hasanbayatme
Copy link
Member

Great work, thanks for the improvements! keep up the good work!

@hasanbayatme hasanbayatme merged commit 19ff9f6 into BayatGames:master Aug 15, 2018
@hasanbayatme hasanbayatme self-assigned this Aug 15, 2018
@hasanbayatme hasanbayatme requested review from hasanbayatme and removed request for hasanbayatme August 15, 2018 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants