jmjpro / tg-galapago

Port of the Galapago game to HTML5
0 stars 0 forks source link

refactor screen cleanup (animation) #377

Closed jmjpro closed 11 years ago

jmjpro commented 11 years ago

Ensure via a global variable/singleton class that animation is only running one one screen at a time.

coderatwork commented 11 years ago

Pls do a first level review.. Needs to test and I will review as well

jmjpro commented 11 years ago

Bob & Cervantes animation still runs after level timeout: image

jmjpro commented 11 years ago

The LevelAnimation class can still be instantiated after though you've created getInstance(). If we go to the Singleton with a cached static property example here http://robdodson.me/blog/2012/08/08/javascript-design-patterns-singleton/ we can have a singleton and instantiate via the constructor.

coderatwork commented 11 years ago

PR comments implemented

jmjpro commented 11 years ago

looks good. please merge to develop.

coderatwork commented 11 years ago

merged