Skip to content

Instantly share code, notes, and snippets.

@lucas-jones
Created February 14, 2015 03:04
Show Gist options
  • Save lucas-jones/3d07288567aef8aabe4e to your computer and use it in GitHub Desktop.
Save lucas-jones/3d07288567aef8aabe4e to your computer and use it in GitHub Desktop.
Networking Idea
function createGameObject<T>(string id, object data, string ?parentId)
{
var parent = (parentId == null) ? stage : networkObject.get(parentId);
var gameObject = new T(id, data);
networkObjects.set(id, gameObject);
parent.addNode(gameObject);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment