mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-01 15:50:11 -04:00
Fixed home page wizard scale.
This commit is contained in:
parent
5267febd8f
commit
053927eaec
2 changed files with 5 additions and 5 deletions
app
|
@ -24,5 +24,5 @@ block content
|
|||
|
||||
div.homepage_button
|
||||
a#beginner-campaign.btn.btn-warning.btn-large.highlight(href="/play/level/rescue-mission")
|
||||
canvas(width="100px", height="100px")
|
||||
canvas(width="125", height="150")
|
||||
span(data-i18n="home.play") Play
|
|
@ -36,7 +36,7 @@ module.exports = class HomeView extends View
|
|||
|
||||
initCanvas: =>
|
||||
@stage = new createjs.Stage($('#beginner-campaign canvas', @$el)[0])
|
||||
@createWizard -10, 2, 2.6
|
||||
@createWizard()
|
||||
|
||||
turnOnStageUpdates: ->
|
||||
clearInterval @turnOff
|
||||
|
@ -50,13 +50,13 @@ module.exports = class HomeView extends View
|
|||
@turnOff = null
|
||||
@turnOff = setInterval turnOffFunc, 2000
|
||||
|
||||
createWizard: (x=0, y=0, scale=1.0) ->
|
||||
createWizard: (scale=1.0) ->
|
||||
spriteOptions = thangID: "Beginner Wizard", resolutionFactor: scale
|
||||
@wizardSprite = new WizardSprite @wizardType, spriteOptions
|
||||
@wizardSprite.update()
|
||||
wizardDisplayObject = @wizardSprite.displayObject
|
||||
wizardDisplayObject.x = 50
|
||||
wizardDisplayObject.y = 85
|
||||
wizardDisplayObject.x = 120
|
||||
wizardDisplayObject.y = 35
|
||||
wizardDisplayObject.scaleX = wizardDisplayObject.scaleY = scale
|
||||
@stage.addChild wizardDisplayObject
|
||||
@stage.update()
|
||||
|
|
Loading…
Add table
Reference in a new issue