Properly tracking first-frame team gold. Slightly more visible team gold on hover.

This commit is contained in:
Nick Winter 2014-04-27 20:11:11 -07:00
parent a7179ae3b2
commit fc6ad1dd01
2 changed files with 9 additions and 0 deletions
app
lib/surface
styles/play/level

View file

@ -596,6 +596,8 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
# rather than an each-thang-that-shows-gold-per-team thing.
return if @thang.gold is @lastGold
gold = Math.floor @thang.gold
if @thang.world.age is 0
gold = @thang.world.initialTeamGold[@thang.team].gold
return if gold is @lastGold
@lastGold = gold
Backbone.Mediator.publish 'surface:gold-changed', {team: @thang.team, gold: gold, goldEarned: Math.floor(@thang.goldEarned)}

View file

@ -1,4 +1,5 @@
@import "app/styles/mixins"
@import "app/styles/bootstrap/mixins"
#gold-view
position: absolute
@ -6,6 +7,12 @@
top: 42px
user-select: none
-webkit-user-select: none
@include transition(background-color .2s linear)
padding: 4px
border-radius: 4px
&:hover
background-color: rgba(255, 255, 255, 0.75)
.team-gold
font-size: 16px