mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 10:06:08 -05:00
Made some tips show up more rarely.
This commit is contained in:
parent
7555dce172
commit
db4ae0cd2d
1 changed files with 4 additions and 2 deletions
|
@ -10,9 +10,11 @@ module.exports = class LevelLoadingView extends View
|
|||
'level-loader:progress-changed': 'onLevelLoaderProgressChanged'
|
||||
|
||||
afterRender: ->
|
||||
tips = @$el.find('.tip').addClass('secret')
|
||||
@$el.find('.tip.rare').remove() if _.random(1, 10) < 9
|
||||
tips = @$el.find('.tip').addClass('to-remove')
|
||||
tip = _.sample(tips)
|
||||
$(tip).removeClass('secret')
|
||||
$(tip).removeClass('to-remove')
|
||||
@$el.find('.to-remove').remove()
|
||||
|
||||
onLevelLoaderProgressChanged: (e) ->
|
||||
@progress = e.progress
|
||||
|
|
Loading…
Reference in a new issue