mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Set up the WorldMapView to update the gem count when a player purchases gems or items.
This commit is contained in:
parent
ad35109878
commit
c3eecd15be
2 changed files with 3 additions and 1 deletions
|
@ -64,7 +64,7 @@
|
|||
|
||||
.user-status.header-font
|
||||
span.gem.gem-20
|
||||
span.spr= me.gems()
|
||||
span#gems-count.spr= me.gems()
|
||||
span.spl.spr(data-i18n="general.player_level")
|
||||
span.spr= me.level()
|
||||
if me.get('anonymous')
|
||||
|
|
|
@ -46,6 +46,8 @@ module.exports = class WorldMapView extends RootView
|
|||
@playMusicTimeout = _.delay (=> @playMusic() unless @destroyed), musicDelay
|
||||
@preloadTopHeroes()
|
||||
@hadEverChosenHero = me.get('heroConfig')?.thangType
|
||||
@listenTo me, 'change:purchased', -> @renderSelectors('#gems-count')
|
||||
@listenTo me, 'change:spent', -> @renderSelectors('#gems-count')
|
||||
window.tracker?.trackEvent 'World Map', Action: 'Loaded'
|
||||
|
||||
destroy: ->
|
||||
|
|
Loading…
Reference in a new issue