From 5cf37d17961dee245c8ed472c87ab945385fe110 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Fri, 13 Feb 2015 04:09:40 -0800 Subject: [PATCH] A few tweaks to visuals on PlayHeroesModal hero previews. --- app/views/play/modal/PlayHeroesModal.coffee | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/play/modal/PlayHeroesModal.coffee b/app/views/play/modal/PlayHeroesModal.coffee index 96d96fd02..20f11ea5e 100644 --- a/app/views/play/modal/PlayHeroesModal.coffee +++ b/app/views/play/modal/PlayHeroesModal.coffee @@ -172,10 +172,14 @@ module.exports = class PlayHeroesModal extends ModalView layer.on 'new-spritesheet', -> #- maybe put some more normalization here? m = multiplier - m *= 0.75 if fullHero.get('slug') in ['knight', 'samurai', 'librarian'] # these heroes are larger for some reason, shrink 'em + m *= 0.75 if fullHero.get('slug') in ['knight', 'samurai', 'librarian', 'sorcerer'] # these heroes are larger for some reason, shrink 'em layer.container.scaleX = layer.container.scaleY = m layer.container.children[0].x = 160/m layer.container.children[0].y = 250/m + if fullHero.get('slug') in ['forest-archer', 'librarian', 'sorcerer', 'potion-master'] + layer.container.children[0].y -= 3 + if fullHero.get('slug') in ['librarian', 'sorcerer', 'potion-master'] + layer.container.children[0].x -= 3 stage = new createjs.SpriteStage(canvas[0]) @stages[heroIndex] = stage @@ -194,7 +198,7 @@ module.exports = class PlayHeroesModal extends ModalView animateHeroes: => return unless @visibleHero heroIndex = Math.max 0, _.findIndex(@heroes.models, ((hero) => hero.get('original') is @visibleHero.get('original'))) - animation = _.sample(['attack', 'idle', 'move_side', 'move_fore']) + animation = _.sample(['attack', 'move_side', 'move_fore']) # Must be in LayerAdapter default actions. @stages[heroIndex]?.children?[0]?.children?[0]?.gotoAndPlay? animation playSelectionSound: (hero) ->