Adding topological sort to Scene tick