Fixed issue with IndieSprites no longer coloring properly.
This commit is contained in:
parent
a5912c8e40
commit
3e9adf6b1a
4 changed files with 5 additions and 3 deletions
app
|
@ -26,6 +26,8 @@ module.exports = IndieSprite = class IndieSprite extends CocoSprite
|
||||||
thang.getActionName = -> thang.action
|
thang.getActionName = -> thang.action
|
||||||
thang.acts = true
|
thang.acts = true
|
||||||
thang.isSelectable = true
|
thang.isSelectable = true
|
||||||
|
thang.team = options.team
|
||||||
|
thang.teamColors = options.teamColors
|
||||||
thang
|
thang
|
||||||
|
|
||||||
onNoteGroupStarted: => @scriptRunning = true
|
onNoteGroupStarted: => @scriptRunning = true
|
||||||
|
|
|
@ -111,7 +111,7 @@ module.exports = class SpriteBoss extends CocoClass
|
||||||
unless thangType = @thangTypeFor indieSprite.thangType
|
unless thangType = @thangTypeFor indieSprite.thangType
|
||||||
console.warn "Need to convert #{indieSprite.id}'s ThangType #{indieSprite.thangType} to a ThangType reference. Until then, #{indieSprite.id} won't show up."
|
console.warn "Need to convert #{indieSprite.id}'s ThangType #{indieSprite.thangType} to a ThangType reference. Until then, #{indieSprite.id} won't show up."
|
||||||
return
|
return
|
||||||
sprite = new IndieSprite thangType, @createSpriteOptions {thangID: indieSprite.id, pos: indieSprite.pos, sprites: @sprites, colorConfig: indieSprite.colorConfig}
|
sprite = new IndieSprite thangType, @createSpriteOptions {thangID: indieSprite.id, pos: indieSprite.pos, sprites: @sprites, team: indieSprite.team, teamColors: @world.getTeamColors()}
|
||||||
@addSprite sprite, sprite.thang.id
|
@addSprite sprite, sprite.thang.id
|
||||||
|
|
||||||
createOpponentWizard: (opponent) ->
|
createOpponentWizard: (opponent) ->
|
||||||
|
|
|
@ -167,7 +167,7 @@ module.exports = class Thang
|
||||||
{CN: @constructor.className, id: @id}
|
{CN: @constructor.className, id: @id}
|
||||||
|
|
||||||
getSpriteOptions: ->
|
getSpriteOptions: ->
|
||||||
colorConfigs = @world?.getTeamColors() or {}
|
colorConfigs = @teamColors or @world?.getTeamColors() or {}
|
||||||
options = {colorConfig: {}}
|
options = {colorConfig: {}}
|
||||||
if @team and teamColor = colorConfigs[@team]
|
if @team and teamColor = colorConfigs[@team]
|
||||||
options.colorConfig.team = teamColor
|
options.colorConfig.team = teamColor
|
||||||
|
|
|
@ -197,7 +197,7 @@ module.exports = class LevelHUDView extends CocoView
|
||||||
@lastResponses = null
|
@lastResponses = null
|
||||||
@bubble.append($("<h3>#{@speaker ? 'Captain Anya'}</h3>"))
|
@bubble.append($("<h3>#{@speaker ? 'Captain Anya'}</h3>"))
|
||||||
@animator = new DialogueAnimator(message, @bubble)
|
@animator = new DialogueAnimator(message, @bubble)
|
||||||
@messageInterval = setInterval(@addMoreMessage, 1000 / 30)
|
@messageInterval = setInterval(@addMoreMessage, 1000 / 30) # 30 FPS
|
||||||
|
|
||||||
addMoreMessage: =>
|
addMoreMessage: =>
|
||||||
if @animator.done()
|
if @animator.done()
|
||||||
|
|
Reference in a new issue