         I.age += 1
 
       draw()
-   
+
     canvas = I.canvas || $("<canvas />").powerCanvas()
-  
+
     self = Core(I).extend
       add: (entityData) ->
+        self.trigger "beforeAdd", entityData
+
         obj = GameObject.construct entityData
-        
+
         if intervalId && !I.paused
           queuedObjects.push obj
         else

          intervalId = setInterval(() ->
            step()
          , 1000 / I.FPS)
        
      stop: () ->
        clearInterval(intervalId)
        intervalId = null
        
      play: ->
        I.paused = false
        
      pause: ->
        I.paused = true
        
      paused: ->
        I.paused
        
      setFramerate: (newFPS) ->
        I.FPS = newFPS
        self.stop()
        self.start()
    
    self.attrAccessor "ambientLight"
    self.attrAccessor "backgroundColor"
    self.attrAccessor "cameraTransform"

    intervalId = null

    queuedObjects = []

    update = ->
      I.objects = I.objects.select (object) ->
        object.update()

      I.objects = I.objects.concat(queuedObjects)
      queuedObjects = []

      self.trigger "update"

    draw = ->
