public void update(long deltaMs) {
        ArrayList<BaseProcess> toAttach = new ArrayList<BaseProcess>();
        
        Iterator<BaseProcess> it = processes.iterator();
        
        while(it.hasNext()) {
            BaseProcess current = it.next();
            
            if(current.getState() == BaseProcess.ProcessState.UNINITIALIZED) {
                current.init();
            }
            
            if(current.getState() == BaseProcess.ProcessState.RUNNING) {
                current.update(deltaMs);
            }
            
            if(current.isDead()) {
                switch(current.getState()) {
                    case SUCCEEDED:
                        current.onSuccess();
                        BaseProcess child = current.getChild();
                        if(child != null) {
                            toAttach.add(child);
                        }
                        break;
                    case FAILED:
                        current.onFail();
                        break;
                    case ABORTED:
                        current.onAbort();
                        break;
                }
                it.remove();
            }
        }
        
        for(BaseProcess p : toAttach) {
            attachProcess(p);
        }
    }