Skip to content

Instantly share code, notes, and snippets.

@mikelovesrobots
Created April 5, 2012 07:26
Show Gist options
  • Save mikelovesrobots/2308747 to your computer and use it in GitHub Desktop.
Save mikelovesrobots/2308747 to your computer and use it in GitHub Desktop.
// the node OOP-way
function Awake () {
var networkConnector = NetworkConnector(isHost());
networkConnector.connect(function() {
spawnPlayer();
});
}
// the unity3d-ish way
function Awake() {
setupNetworking(isHost());
}
function onConnect() {
spawnPlayer()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment