mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-19 17:39:56 -04:00
Properly tracking first-frame team gold. Slightly more visible team gold on hover.
This commit is contained in:
parent
a7179ae3b2
commit
fc6ad1dd01
2 changed files with 9 additions and 0 deletions
app
|
@ -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)}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue