Fixed the goal manager from polluting the goals in the level with the isPositive property.

This commit is contained in:
Scott Erickson 2014-02-13 15:50:53 -08:00
parent ad0590f9ba
commit b8051689b3

View file

@ -90,6 +90,7 @@ module.exports = class GoalManager extends CocoClass
# IMPLEMENTATION DETAILS
addGoal: (goal) ->
goal = _.cloneDeep(goal)
goal.id = @nextGoalID++ if not goal.id
return if @goalStates[goal.id]?
@goals.push(goal)