Example #1
0
 /** Clean up resources for this component's entity. */
 protected void cleanupEntity() {
   detachFromParentEntity();
   if (gui != null) {
     gui.detachEventListeners(entity);
   }
   cleanupSceneGraph();
   entity = null;
 }
Example #2
0
 /** Clean up resources. */
 public void cleanup() {
   view = null;
   cleanupEntity();
   if (gui != null) {
     gui.cleanup();
     gui = null;
   }
 }
Example #3
0
  /** Initialize this component's entity. */
  protected void initEntity() {

    // Create this component's entity and parent it
    entity = new Entity("Entity for frame component " + name);

    // Create this component scene graph (l2c -> geometry)
    initSceneGraph();

    // Make the entity pickable
    View2DCell.entityMakePickable(entity);

    // Attach gui event listeners for this component
    if (gui != null) {
      gui.attachEventListeners(entity);
    }

    attachToParentEntity();
  }