udefine(['mixedice', './addable', './base', './group', './updateable'], function(mixedice, addable, Base, Group, updateable) {
  'use strict';

  var Behavior = function(descriptor) {
    Base.extend([this, Behavior.prototype], 'Behavior', descriptor);

    this.gameObject = null;

    updateable.call(this);
  };

  Behavior.prototype.addBehavior = function() {
    this.queue.push(addable(Behavior, this.children, function(child) {
      child.gameObject = this.gameObject;
    }).apply(this, arguments));
  };

  Behavior.store = {};

  Behavior.define = function(name, factory) {
    Behavior.store[name] = factory;
  };

  return Behavior;
});

@@ -137,16 +137,143 @@
 rict';%0A%0A
+  // Behaviors only provide logic. There is no rendering involved.%0A  // Behaviors can attach any number of behaviors to itself%0A
   var Be
@@ -300,24 +300,24 @@
 scriptor) %7B%0A
-
     Base.ext
@@ -374,16 +374,59 @@
 ptor);%0A%0A
+    // Reference to the game object itself%0A
     this
@@ -446,16 +446,43 @@
  null;%0A%0A
+    // Mix in %60updateable%60%0A
     upda
@@ -550,24 +550,97 @@
 unction() %7B%0A
+    // When a behavior is added, the reference to the game object is set%0A
     this.que
@@ -770,32 +770,98 @@
 uments));%0A  %7D;%0A%0A
+  // Behaviors can be defined and are stored on the object itself%0A
   Behavior.store

Add behavior documentation