Created
February 14, 2015 03:04
-
-
Save lucas-jones/3d07288567aef8aabe4e to your computer and use it in GitHub Desktop.
Networking Idea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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