mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 14:03:28 -04:00
Fixed a few bugs.
This commit is contained in:
parent
2ef7bff2c5
commit
cd3bf4d0db
4 changed files with 7 additions and 7 deletions
app
|
@ -24,8 +24,8 @@ module.exports = class CoordinateGrid extends CocoClass
|
|||
toString: -> '<CoordinateGrid>'
|
||||
|
||||
build: (worldSize) ->
|
||||
worldWidth = worldSize[0] ? 80
|
||||
worldHeight = worldSize[1] ? 68
|
||||
worldWidth = worldSize[0] or 80
|
||||
worldHeight = worldSize[1] or 68
|
||||
@gridContainer = new createjs.Container()
|
||||
@gridShape = new createjs.Shape()
|
||||
@gridContainer.addChild @gridShape
|
||||
|
|
|
@ -224,7 +224,7 @@ module.exports = class SpriteBoss extends CocoClass
|
|||
for slot, itemID of thang.inventoryIDs
|
||||
item = @world.getThangByID itemID
|
||||
unless item.equipped
|
||||
#console.log thang.id, 'equipping', item, 'in', thang.slot, 'Surface-side'
|
||||
console.log thang.id, 'equipping', item, 'in', thang.slot, 'Surface-side, but it cannot equip?' unless item.equip
|
||||
item.equip()
|
||||
itemsJustEquipped.push item
|
||||
return itemsJustEquipped
|
||||
|
|
|
@ -496,8 +496,8 @@ module.exports = Surface = class Surface extends CocoClass
|
|||
event =
|
||||
deltaX: e.deltaX
|
||||
deltaY: e.deltaY
|
||||
screenPos: @mouseScreenPos
|
||||
canvas: @canvas
|
||||
event.screenPos = @mouseScreenPos if @mouseScreenPos
|
||||
Backbone.Mediator.publish 'surface:mouse-scrolled', event unless @disabled
|
||||
|
||||
hookUpChooseControls: ->
|
||||
|
|
|
@ -143,11 +143,11 @@ module.exports = # /app/lib/surface
|
|||
|
||||
'surface:stage-mouse-up': c.object {required: ['onBackground', 'originalEvent']},
|
||||
onBackground: {type: 'boolean'}
|
||||
x: {type: 'number'}
|
||||
y: {type: 'number'}
|
||||
x: {type: ['number', 'undefined']}
|
||||
y: {type: ['number', 'undefined']}
|
||||
originalEvent: {type: 'object'}
|
||||
|
||||
'surface:mouse-scrolled': c.object {required: ['deltaX', 'deltaY', 'screenPos', 'canvas']},
|
||||
'surface:mouse-scrolled': c.object {required: ['deltaX', 'deltaY', 'canvas']},
|
||||
deltaX: {type: 'number'}
|
||||
deltaY: {type: 'number'}
|
||||
screenPos: c.object {required: ['x', 'y']},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue