   #
   constructor: (opts={}) ->
     group    = opts.group || @constructor.group
-    @group   = group or fail("#{@constructor.name}#new", "entity must have a group")
+    @group   = group or fail("#{@class()}#new", "entity must have a group")
     @scene   = opts.scene
     @solid   = if opts.solid?   then opts.solid   else true
     @gravity = if opts.gravity? then opts.gravity else true



  setAnimation: (name) ->
    @currentAnimation = @animations[name] or fail("#{@constructor.name}#setAnimation", "Couldn't find animation with name #{name}")


  clearAnimation: ->


    @animations       = []
    @currentAnimation = null


  # Return the name of this instance's entity class as a string
  # ex: `(new EvilNinja).class() => 'EvilNinja'`
  class: -> @constructor.name


  # Apply gravitational effects any directional changes each frame, and resolve any
