   initGoalState: (state, whos, progressObjectName) ->
     # 'whos' is an array of goal 'who' values.
     # This inits the progress object for the goal tracking.
+    
     arrays = (prop for prop in whos when prop?.length)
     return unless arrays.length
     state[progressObjectName] = {}

        keyFrame: 0 # when it became a 'success' or 'failure'
      }
      @initGoalState(state, [goal.killThangs, goal.saveThangs], 'killed')
      @initGoalState(state, [goal.getToLocations?.who, goal.keepFromLocations?.who], 'arrived')
      @initGoalState(state, [goal.leaveOffSides?.who, goal.keepFromLeavingOffSides?.who], 'left')
      @initGoalState(state, [goal.collectThangs?.who, goal.keepFromCollectingThangs?.who], 'collected')

  onThangTouchedGoal: (e, frameNumber) ->
    for goal in @goals ? []
      @checkArrived(goal.id, goal.getToLocations.who, goal.getToLocations.targets, e.actor, e.touched.id, frameNumber) if goal.getToLocations?
      if goal.getAllToLocations?    
        for getTo in goal.getAllToLocations
          @checkArrived(goal.id, getTo.getToLocation.who, getTo.getToLocation.targets, e.actor, e.touched.id, frameNumber)
      @checkArrived(goal.id, goal.keepFromLocations.who, goal.keepFromLocations.targets, e.actor, e.touched.id, frameNumber) if goal.keepFromLocations?
      if goal.keepAllFromLocations? 
        for keepFrom in goal.keepAllFromLocations
          @checkArrived(goal.id, keepFrom.keepFromLocation.who , keepFrom.keepFromLocation.targets, e.actor, e.touched.id, frameNumber )

  checkArrived: (goalID, who, targets, thang, touchedID, frameNumber) ->
    return unless touchedID in targets
