mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-13 22:49:51 -04:00
Merge branch 'master' of https://github.com/codecombat/codecombat
This commit is contained in:
commit
d2345432ff
7 changed files with 13 additions and 5 deletions
|
@ -64,7 +64,7 @@ self.transferableSupported = transferableSupported = ->
|
|||
if args.level
|
||||
self.world.loadFromLevel args.level, true
|
||||
self.goalManager = new GoalManager self.world
|
||||
self.goalManager.setGoals args.goals
|
||||
self.goalManager.setGoals args.level?.goals or args.goals
|
||||
self.goalManager.setCode args.userCodeMap
|
||||
self.goalManager.worldGenerationWillBegin()
|
||||
self.world.setGoalManager self.goalManager
|
||||
|
|
|
@ -15,7 +15,7 @@ module.exports = class GoalManager extends CocoClass
|
|||
|
||||
nextGoalID: 0
|
||||
|
||||
constructor: (@world) ->
|
||||
constructor: (@world, @initialGoals) ->
|
||||
super()
|
||||
@init()
|
||||
|
||||
|
@ -25,6 +25,7 @@ module.exports = class GoalManager extends CocoClass
|
|||
@userCodeMap = {} # @userCodeMap.thangID.methodName.aether.raw = codeString
|
||||
@thangTeams = {}
|
||||
@initThangTeams()
|
||||
@addGoal goal for goal in @initialGoals if @initialGoals
|
||||
|
||||
initThangTeams: ->
|
||||
return unless @world
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
position: relative
|
||||
top: 3px
|
||||
|
||||
#marker-button
|
||||
#marker-button, #end-button
|
||||
float: right
|
||||
margin-right: 10px
|
||||
position: relative
|
||||
|
|
|
@ -39,6 +39,9 @@ block content
|
|||
button.btn.btn-small.btn-primary#marker-button
|
||||
i.icon-map-marker
|
||||
|
||||
button.btn.btn-small.btn-primary#end-button
|
||||
i.icon-stop
|
||||
|
||||
div.slider-cell
|
||||
| Rotation:
|
||||
span.rotation-label
|
||||
|
|
|
@ -29,6 +29,7 @@ module.exports = class ThangTypeEditView extends View
|
|||
'change #real-upload-button': 'animationFileChosen'
|
||||
'change #animations-select': 'showAnimation'
|
||||
'click #marker-button': 'toggleDots'
|
||||
'click #end-button': 'endAnimation'
|
||||
|
||||
subscriptions:
|
||||
'save-new-version': 'saveNewThangType'
|
||||
|
@ -130,6 +131,9 @@ module.exports = class ThangTypeEditView extends View
|
|||
@aboveHeadDot.y = CENTER.y + aboveHead.y * @scale
|
||||
@stage.addChild(@groundDot, @torsoDot, @mouthDot, @aboveHeadDot)
|
||||
|
||||
endAnimation: ->
|
||||
@currentSprite?.queueAction('idle')
|
||||
|
||||
updateGrid: ->
|
||||
grid = new createjs.Container()
|
||||
line = new createjs.Shape()
|
||||
|
|
|
@ -327,7 +327,7 @@ module.exports = class PlayLevelView extends View
|
|||
@surface.camera.zoomTo({x:0, y:0}, 0.1, 0)
|
||||
|
||||
initGoalManager: ->
|
||||
@goalManager = new GoalManager(@world)
|
||||
@goalManager = new GoalManager(@world, @level.get('goals'))
|
||||
@god.goalManager = @goalManager
|
||||
|
||||
initScriptManager: ->
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
"mongoose": "3.8.x",
|
||||
"mongoose-text-search": "~0.0.2",
|
||||
"request": "2.12.x",
|
||||
"tv4": "1.0.x",
|
||||
"tv4": "1.0.11",
|
||||
"lodash": "~2.0.0",
|
||||
"underscore.string": "2.3.x",
|
||||
"async": "0.2.x",
|
||||
|
|
Loading…
Reference in a new issue